TODO updates
[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 * static vs anonymous namespace
39
40 * check the code with Valgrind
41
42 * use Vector in Physics for 'a' and 'v'
43
44 * replace random generator with mersene twister and/or move to external/
45
46 * write/finish scripts for include sorting and include guard checking that
47   can be run automatically
48
49 * md5.hpp and random_generator.hpp could go to external/
50
51 * write scripts to automatically check for:
52
53   - all includes are relative to top level dir
54
55   - include guards are proper
56
57 TODO
58 ====
59
60 * GameObject::RemoveListenerListEntry: Ughs, somebody trying to
61   implement a list class within in the GameObject?!
62
63 * add --datadir DIR (data/) and --userdir DIR (~/.supertux/)
64
65 * make gravity a constant
66
67 * funky side effect of too much global variables: when having a
68   savegame with large or firetux and then starting that game, Tux in
69   the menu background will grow and be visible that way for a fraction
70   of a second
71
72 * rename Vector -> Vector2f
73
74 * get rid of global SDL_Screen* screen variable
75
76 * identify all global variables and make them ugly (g_ or globals::)
77
78 * get rid of SCREEN_WIDTH/SCREEN_HEIGHT
79
80 * is version.h actually needed?
81
82 * resolution menu entry moves the wrong way around
83
84 * having dictionary_manager in Lisp is extremely ugly
85
86 * enforce proper naming of files to match their class
87
88 * get rid of NDEBUG and conditional compilation, these should be
89   reserved for a few tiny cases, not spread all over the code
90
91 * split particlesystem_interactive
92
93 * Renderer::apply_config() needs to handle fullscreen switching
94
95 * collect all manager classe into globals.hpp
96
97 * more moving directories around?
98
99 addon/  
100 audio/  
101 control/
102 gui/    
103 lisp/   
104 math/
105 physfs/ 
106 sprite/ 
107 util/
108 video/
109 squirrel/
110   for generic squirrel code
111 supertux/
112   worldmap/
113   trigger/
114   scripting/
115     for scripting wrapper code
116   badguy/
117   object/
118
119 * implement PNG screenshot
120
121 * GL_ARB_texture_non_power_of_two returns 1 on MatroxG450, while it
122   returns "Missing" in glewinfo, something wrong
123
124 * having hitbox in Sprite is fugly
125
126 * write decal object
127
128 * implement surface and/or sprite scaling (MipMaps?)
129
130 * add code that compares the last Log line with the current, if they
131   are the same reject them and just output something like:
132
133   * last line has been repeated X times
134
135 * file naming is inconsistent: some times we use '_' to separate
136   words, sometimes we don't
137
138 * implement: http://standards.freedesktop.org/menu-spec/menu-spec-latest.html
139
140 * workaround for Ubuntu pulseaudio/OpenAL brokeness:
141
142 $ cat ~/.alsoftrc
143 drivers = oss
144
145 * peaking up/down doesn't work properly
146
147 * peaking left/right should make Tux look into that direction (up/down to, needs new sprites)
148
149 * add pipe graphics that makes a 90 degree turn
150
151 * keep possible future SDL1.3 upgrade in mind
152
153 * cleanup scripting interface
154
155 * remove cloud tiles, replace with decal
156
157 * option menu has text overlap in "aspect ratio"
158
159 * jumping up from an enemy doesn't make a sound
160
161 * add support for automatic scrolling backgrounds
162
163 * add direct reading of Vector2f
164
165 * replace bell with 'reset block', that starts to glow once bumped into
166
167 * enable mipmapping
168
169 * refactor Camera code, break ugly long functions into pieces and such
170
171 * allow fully custom magnification levels from command line (maybe GUI
172  do if there is a proper/easy way to let the user enter numbers)
173  (--magnification or -g WIDTHxHEIGHT:ASPECTX:ASPECTY@MAGNIFICATION)
174 \f
175 Scenegraph and Physics Engine Restructuring
176 ===========================================
177
178 * random idea to restructure engine stuff (might lead to nicer code
179   and easier scriptability and a need to rewrite lots of stuff...):
180
181 class SomeBadGuy : public PhysicsCallbackListener // or use boost::function
182 {
183 private:
184       PhysicsPtr box;
185       SpritePtr sprite;
186         
187 public:
188       SomeBadGuy(Engine& engine)  
189       {
190          box    = engine.physics().create_box(Rectf(0,0,32,32));
191          box->register_listener(this);
192          sprite = engine.graphics().create_and_add_sprite("Foobar");
193       }
194
195       void update(float delta)
196       {
197          // not much to do, as most stuff is done internally in the engine
198          if (dead)
199          {
200                   sprite->replace_with("Foobar_dead");
201          }
202          else
203          {
204                 sprite->hide();
205                 sprite->set_pos(box->get_pos());
206         }
207       }
208
209       // no more draw(), done by the scene graph
210
211       void on_collision(CollisionData data)
212       {
213         // respond
214       }
215 };
216 \f
217 Subversion->Git/Mercurial/Bzr Move
218 ==================================
219
220 * right now a switch doesn't seem to be worth it
221
222 * core issue right now isn't SVN, but old SVN version on lethargik.org
223   (lacks merge tracking and issues with viewvc)
224
225 * cleanup SVN to make import into other version control systems possible:
226
227  - Should we merge trunk/supertux-milestone1 and trunk/supertux when switching to Git/Hg/...?
228
229 Mistakes: incorrect branch creation: r5201-5207
230
231 tags/start           # unknown
232 tags/supertux        # unknown
233 tags/supertux_0_1_0
234 tags/supertux_0_1_1
235 tags/supertux_0_1_2
236 tags/supertux_0_1_3
237
238 branches/cobble      # unknown
239 branches/milestone1  # unknown
240 branches/new-collision-detection # unknown
241 branches/README      # documentation that will be lost in conversion
242 branches/supertux    # unknown
243 branches/supertux_0_1_1_branch
244 branches/supertux-box2d  # mathnerd (trash)
245 branches/supertux-editor-newdrawing # editor
246 branches/supertux-editor-newdrawing2 # editor
247 branches/supertux-milestone1-olpc    # supertux-milestone1
248 branches/supertux-milestone2-grumbel # supertux
249 branches/supertux-nogl               # supertux(?)
250 branches/supertux-sharp              # another supertux editor
251 branches/unison-video                # ???
252 branches/vendor                      # ??? CVS crap
253
254 trunk/cobble          # some editor?
255 trunk/CVSROOT         # ??? CVS crap
256 trunk/htdocs          # htdocs
257 trunk/jnrcol
258 trunk/media
259 trunk/SDL_tty
260 trunk/setup2x
261 trunk/supertux
262 trunk/supertux-editor
263 trunk/supertux-milestone1
264 trunk/supertux-portable
265 trunk/supertux-sharp
266 trunk/wiz-test
267
268
269 Potential Git Issues
270 ====================
271
272 * lack of sparse/narrow/shallow checkout, this means initial checkout
273   will be 200MB instead of 100MB
274
275 * no free hoster that allows >1GB repositories (haven't checked all,
276   but those I did came out way short) -> could use lethargik.org
277
278 * some free hosters that might allow >1GB repositories don't allow
279   having multiple repositories
280
281 * git submodule doesn't seem to be quite ready to replace our
282   trunk/supertux, trunk/supertux-editor, trunk/media/, ... layout as
283   it for example doesn't support automatic tracking of HEAD from the
284   remote repositories, it also feels rather hacky and not properly
285   integrated into git
286
287 * lack of metadata versioning, if you delete a branch in git that you
288   haven't merged, then its gone after the next gc/repack (+ two weeks
289   time limit it seems), in SVN on the other side you can checkout the
290   way the tree was at a specific date, its impossible to lose history
291   unless you hack the repository
292
293 svn2bzr.py
294 ==========
295
296 Committed revision 5727
297 Committed revision 5728
298 Committed revision 5729
299 Committed revision 5730
300 Traceback (most recent call last):
301   File "./svn2bzr.py", line 194, in <module>
302     main()
303   File "./svn2bzr.py", line 187, in main
304     log=log)
305   File "./svn2bzr.py", line 88, in svn2bzr
306     creator.run()
307   File "/mnt/bzr/svn2bzr/branchcreator.py", line 622, in run
308     entries = self.filter_entries(entries)
309   File "/mnt/bzr/svn2bzr/branchcreator.py", line 671, in filter_entries
310     entries = self.filter_moves(entries)
311   File "/mnt/bzr/svn2bzr/branchcreator.py", line 727, in filter_moves
312     entries = self.filter_simult_fren_dirmove(entries)
313   File "/mnt/bzr/svn2bzr/branchcreator.py", line 784, in filter_simult_fren_dirmove
314     newfname = svnrelpath(newdpth, newfpth)
315   File "/mnt/bzr/svn2bzr/branchcreator.py", line 60, in svnrelpath
316     raise errors.PathNotChild(path, base)
317 bzrlib.errors.PathNotChild: Path "trunk/media/images/creatures/mr_cherry/cherrybomb.xcf" is not a child of path "trunk/media/images/creatures/mr_bomb"
318 \f
319 Random Notes
320 ============
321
322 * calculate the size of an background image that should fill the screen:
323
324   image_size = (1 - parallax_speed) * screen_size + level_size * parallax_speed
325
326 # EOF #