Fixed a counting bug when using butt-jump on a multi-hit bonus block
[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 * make code clean: "-O2", "-g3",
17                      "-ansi",
18                      "-pedantic",
19                      "-Wall",
20                      "-Wextra",
21                      "-Wnon-virtual-dtor",
22                      "-Weffc++",
23                      "-Wconversion",
24                      "-Werror",
25                      "-Wshadow",
26                      "-Wcast-qual",
27                      "-Winit-self", # only works with >= -O1
28                      "-Wno-unused-parameter",
29
30 * remove overuse of multi-inheritance 
31
32 * remove overuse of friend'ship
33
34 * maybe mark interfaces as interfaces (ISerializable or SerializableInterface)
35
36 * split files with multiple classes into multiple files with one class each
37
38 * Decide what to do with magic constants of objects (static vs anonymous namespace vs lisp property)
39
40 * check the code with Valgrind and profilers
41
42 * use Vector in Physics for 'a' and 'v'
43
44 * replace random generator with mersenne twister and/or move to external/ (maybe use boost's random stuff)
45
46 * md5.hpp and random_generator.hpp could go to external/
47
48 * write/finish scripts to automatically:
49
50   - make all includes relative to top level dir
51
52   - sort includes (.hpp file, then system includes, then other project files)
53
54   - include guards proper and of the form HEADER_SUPERTUX_${PATH_TO_FILE}_HPP
55
56 TODO
57 ====
58
59 * implement a system that allows to attach comments to specific regions in a level
60
61 * implement a tool to "screenshot" a complete level
62
63 * GameObject::RemoveListenerListEntry: Ughs, somebody trying to
64   implement a list class within in the GameObject?!
65
66 * add --datadir DIR (data/) and --userdir DIR (~/.supertux/), allow multiple --datadir's
67
68 * make gravity constant
69
70 * rename Vector -> Vector2f
71
72 * get rid of global SDL_Screen* screen variable
73
74 * get rid of SCREEN_WIDTH/SCREEN_HEIGHT overuse, give them a proper name at least
75
76 * resolution menu entry moves the wrong way around
77
78 * having dictionary_manager in Lisp is extremely ugly
79
80 * enforce proper naming of files to match their class (SomeClass -> some_class.?pp or so)
81
82 * file naming is inconsistent: some times we use '_' to separate
83   words, sometimes we don't
84
85 * collect all manager classes into globals.hpp
86
87 * more moving directories around?
88
89 addon/  
90 audio/  
91 control/
92 gui/    
93 lisp/   
94 math/
95 physfs/ 
96 sprite/ 
97 util/
98 video/
99 squirrel/
100   for generic squirrel code
101 supertux/
102   worldmap/
103   trigger/
104   scripting/
105     for scripting wrapper code
106   badguy/
107   object/
108
109 * implement PNG screenshot
110
111 * having hitbox in Sprite is fugly
112
113 * write decal object that doesn't have hitbox
114
115 * implement surface and/or sprite scaling (MipMaps?)
116
117 * add code that compares the last Log line with the current, if they
118   are the same reject them and just output something like:
119
120   * last line has been repeated X times
121
122 * implement: http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
123
124 * workaround for Ubuntu pulseaudio/OpenAL brokeness:
125
126 $ cat ~/.alsoftrc
127 drivers = oss
128
129 * peaking up/down doesn't work properly
130
131 * peaking left/right should make Tux look into that direction (up/down to, needs new sprites)
132
133 * keep possible future SDL1.3 upgrade in mind (what has changed?)
134
135 * cleanup scripting interface
136
137 * replace cloud tiles with decals
138
139 * option menu has text overlap in "aspect ratio"
140
141 * jumping up from an enemy doesn't make a sound?
142
143 * add support for automatic scrolling backgrounds
144
145 * add direct reading of Vector2f to Reader/lisp
146
147 * replace bell with 'reset block', that starts to glow once bumped
148   into (or something different)
149
150 * refactor Camera code, break ugly long functions into pieces and such
151
152 * allow fully custom magnification levels from command line (maybe GUI
153   to if there is a proper/easy way to let the user enter numbers)
154   (--magnification or -g WIDTHxHEIGHT:ASPECTX:ASPECTY@MAGNIFICATION)
155
156 * use AnchorPoint in Background instead of Alignment
157
158 * allow gradients to parallax scroll like Background (make it optional)
159
160 * add multicolored gradients (see Windstille source code, which can deal with Gimp gradients)
161
162 * fix alpha blending in the SDL renderer, currently all sprites (Tux,
163   etc.) appear transparent
164
165 * position of statistics text on the worldmap doesn't scale properly with resolution it seems
166
167 * gluBuild2DMipmaps leads to blurriness, maybe lack of magic offset
168   (0.375f, 0.375f, 0.0f) or something else
169
170 * font system has blending artifacts at non-1x magnifications, need to
171   have an transparent pixel between letters
172
173 * add a (border #t) flag to fonts, that allows to use fonts which have
174   a 1px transparent border around glyphs, which is needed to get rid
175   of blending artifacts in OpenGL
176
177 * mouse cursor has blend artifact on high magnification
178
179 * shadow font glyphs bleed into other glyphs
180
181 * in DrawingRequest "void* request_data;" is only free'ed, but the
182   destructor never gets called
183
184 * sprite/sprite.cpp: frame should never get out of range:
185
186   if((int)frame >= get_frames() || (int)frame < 0)
187     log_warning << "frame out of range: " << (int)frame << "/" << get_frames() << " at " << get_name() << "/" << get_action() << std::endl;
188
189 * Surface::hflip() is used exactly once, should probally be part of the constructor
190 \f
191 Scenegraph and Physics Engine Restructuring
192 ===========================================
193
194 * random idea to restructure engine stuff (might lead to nicer code
195   and easier scriptability (and a need to rewrite lots of stuff...):
196
197 class SomeBadGuy : public PhysicsCallbackListener // or use boost::function
198 {
199 private:
200       PhysicsPtr box;
201       SpritePtr sprite;
202         
203 public:
204       SomeBadGuy(Engine& engine)  
205       {
206          box    = engine.physics().create_box(Rectf(0,0,32,32));
207          box->register_listener(this);
208          sprite = engine.graphics().create_and_add_sprite("Foobar");
209       }
210
211       void update(float delta)
212       {
213          // not much to do, as most stuff is done internally in the engine
214          if (dead)
215          {
216                   sprite->replace_with("Foobar_dead");
217          }
218          else
219          {
220                 sprite->hide();
221                 sprite->set_pos(box->get_pos());
222         }
223       }
224
225       // no more draw(), done by the scene graph
226
227       void on_collision(CollisionData data)
228       {
229         // respond
230       }
231 };
232
233 Random Notes
234 ============
235
236 * calculate the size of an background image that should fill the screen:
237
238   image_size = (1 - parallax_speed) * screen_size + level_size * parallax_speed
239
240 def calc(parallax, screen, tiles):
241     return (1 - parallax) * screen + parallax * tiles * 32
242
243 \f
244 Supported Resolutions
245 =====================
246
247 SuperTux shall support resolutions from 640x480 to 1280x800 at a magnification of 1x.
248 For resolutions higher, such as 2560x1600, upscaling will be used.
249 For resolutions smaller, like 320x240 downscaling will be used.
250
251 Higher resolution graphics for 2x maginification might be provided.
252 Lower res graphics for 0.5x maginification might be provided as well.
253
254 Resolution and magnification can be freely configured by the user within the given limits.
255
256 In tiles this means we have 40x25 (=1280x800px) tiles per screen.
257 \f
258 Graphic Tasks
259 =============
260
261 * animate cave background torch: data/images/tiles/background/backgroundtile3.png
262
263 * do parallax tiles
264
265 * remove lightmap tiles
266
267 * redraw/replace data/images/tiles/waterfall/
268 \f
269 Music Recode
270 ============
271
272 Currently the music makes up a large chunk of the total tarball
273 size. Compression could fix this:
274
275   ,-- Size of data/music/*.ogg
276   V
277 40MB - Current quality in SVN
278 24MB - Default oggenc quality (3)
279 14MB - oggenc at 0 quality
280 10MB - oggenc at -1 quality
281
282 No audible difference on my sound setup. -- grumbel
283 \f
284 # EOF #