b0e77e4eb3b8fcca9616b821b6f2f2ccf6f10b50
[supertux.git] / TODO
1 SuperTux TODO
2 =============
3
4 This is a list of tasks and issues that might be worth to implement or
5 fix. This list is however not an authorative list of things that must
6 be done, its a collection of random things that pop up during
7 development, therefore not everything in here might be well thought
8 out or worth to implement. Use your brain before implementing anything
9 on this list and always think about how useful a new feature would be
10 in the context of the whole game or if a potential performance
11 enhanchment, actually enhanchmes anything at all.
12
13 Coding Standard Stuff
14 =====================
15
16 * remove overuse of multi-inheritance 
17
18 * remove overuse of friend'ship
19
20 * maybe mark interfaces as interfaces (ISerializable or SerializableInterface)
21
22 * split files with multiple classes into multiple files with one class each
23
24 * Decide what to do with magic constants of objects (static vs anonymous namespace vs lisp property)
25
26 * check the code with Valgrind and profilers
27
28 * use Vector in Physics for 'a' and 'v'
29
30 * replace random generator with C++11 stuff
31
32 * md5.hpp and random_generator.hpp could go to external/
33
34 * write/finish scripts to automatically:
35
36   - make all includes relative to top level dir
37
38   - sort includes (.hpp file, then system includes, then other project files)
39
40   - include guards proper and of the form HEADER_SUPERTUX_${PATH_TO_FILE}_HPP
41
42   - remove trailing whitespace
43
44 TODO
45 ====
46
47 * implement a system that allows to attach comments to specific regions in a level
48
49 * implement a tool to "screenshot" a complete level
50
51 * GameObject::RemoveListenerListEntry: Ughs, somebody trying to
52   implement a list class within in the GameObject?!
53
54 * make gravity constant
55
56 * rename Vector -> Vector2f
57
58 * get rid of SCREEN_WIDTH/SCREEN_HEIGHT overuse, give them a proper name at least
59
60 * resolution menu entry moves the wrong way around
61
62 * having dictionary_manager in Lisp is extremely ugly
63
64 * enforce proper naming of files to match their class (SomeClass -> some_class.?pp or so)
65
66 * file naming is inconsistent: some times we use '_' to separate
67   words, sometimes we don't
68
69 * more moving directories around?
70
71 addon/  
72 audio/  
73 control/
74 gui/    
75 lisp/   
76 math/
77 physfs/ 
78 sprite/ 
79 util/
80 video/
81 squirrel/
82   for generic squirrel code
83 supertux/
84   worldmap/
85   trigger/
86   scripting/
87     for scripting wrapper code
88   badguy/
89   object/
90
91 * implement PNG screenshot
92
93 * having hitbox in Sprite is fugly
94
95 * add code that compares the last Log line with the current, if they
96   are the same reject them and just output something like:
97
98   * last line has been repeated X times
99
100 * implement: http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
101
102 * peaking up/down doesn't work properly
103
104 * peaking left/right should make Tux look into that direction (up/down to, needs new sprites)
105
106 * cleanup scripting interface
107
108 * replace cloud tiles with decals
109
110 * add support for automatic scrolling backgrounds
111
112 * add direct reading of Vector2f to Reader/lisp
113
114 * refactor Camera code, break ugly long functions into pieces and such
115
116 * allow fully custom magnification levels from command line (maybe GUI
117   to if there is a proper/easy way to let the user enter numbers)
118   (--magnification or -g WIDTHxHEIGHT:ASPECTX:ASPECTY@MAGNIFICATION)
119
120 * use AnchorPoint in Background instead of Alignment
121
122 * allow gradients to parallax scroll like Background (make it optional)
123
124 * add multicolored gradients (see Windstille source code, which can deal with Gimp gradients)
125
126 * fix alpha blending in the SDL renderer, currently all sprites (Tux,
127   etc.) appear transparent
128
129 * shadow font glyphs bleed into other glyphs
130
131 * sprite/sprite.cpp: frame should never get out of range:
132
133   if((int)frame >= get_frames() || (int)frame < 0)
134     log_warning << "frame out of range: " << (int)frame << "/" << get_frames() << " at " << get_name() << "/" << get_action() << std::endl;
135
136 * Surface::hflip() is used exactly once, should probally be part of the constructor
137 \f
138 Scenegraph and Physics Engine Restructuring
139 ===========================================
140
141 * random idea to restructure engine stuff (might lead to nicer code
142   and easier scriptability (and a need to rewrite lots of stuff...):
143
144 class SomeBadGuy : public PhysicsCallbackListener // or use boost::function
145 {
146 private:
147       PhysicsPtr box;
148       SpritePtr sprite;
149         
150 public:
151       SomeBadGuy(Engine& engine)  
152       {
153          box    = engine.physics().create_box(Rectf(0,0,32,32));
154          box->register_listener(this);
155          sprite = engine.graphics().create_and_add_sprite("Foobar");
156       }
157
158       void update(float delta)
159       {
160          // not much to do, as most stuff is done internally in the engine
161          if (dead)
162          {
163                   sprite->replace_with("Foobar_dead");
164          }
165          else
166          {
167                 sprite->hide();
168                 sprite->set_pos(box->get_pos());
169         }
170       }
171
172       // no more draw(), done by the scene graph
173
174       void on_collision(CollisionData data)
175       {
176         // respond
177       }
178 };
179
180 Random Notes
181 ============
182
183 * calculate the size of an background image that should fill the screen:
184
185   image_size = (1 - parallax_speed) * screen_size + level_size * parallax_speed
186
187 def calc(parallax, screen, tiles):
188     return (1 - parallax) * screen + parallax * tiles * 32
189
190 \f
191 Supported Resolutions
192 =====================
193
194 SuperTux shall support resolutions from 640x480 to 1280x800 at a magnification of 1x.
195 For resolutions higher, such as 2560x1600, upscaling will be used.
196 For resolutions smaller, like 320x240 downscaling will be used.
197
198 Higher resolution graphics for 2x maginification might be provided.
199 Lower res graphics for 0.5x maginification might be provided as well.
200
201 Resolution and magnification can be freely configured by the user within the given limits.
202
203 In tiles this means we have 40x25 (=1280x800px) tiles per screen.
204 \f
205 Graphic Tasks
206 =============
207
208 * animate cave background torch: data/images/tiles/background/backgroundtile3.png
209
210 * do parallax tiles
211
212 * remove lightmap tiles
213
214 * redraw/replace data/images/tiles/waterfall/
215 \f
216 Music Recode
217 ============
218
219 Currently the music makes up a large chunk of the total tarball
220 size. Compression could fix this:
221
222   ,-- Size of data/music/*.ogg
223   V
224 40MB - Current quality in SVN
225 24MB - Default oggenc quality (3)
226 14MB - oggenc at 0 quality
227 10MB - oggenc at -1 quality
228
229 No audible difference on my sound setup. -- grumbel
230 \f
231 # EOF #