typo
[supertux.git] / TODO
diff --git a/TODO b/TODO
index 17a8a54..b0540b2 100644 (file)
--- a/TODO
+++ b/TODO
+SuperTux TODO
+=============
 
-- To do for Milestone1 -
-http://super-tux.sf.net/
-
-Last update: May 3, 2004
-
-These are mostly bugs:
-
-Todo
-----
-H: high priority
-L: low priority
-
-[H] Frame ratio code has been changed and so the animation may need tuning.
-    Somebody do some testing and change the definitions regarding this.
-[M] When aborting a level, lives and score should remain the same as they
-    were before. Solution: make more dependency between the game engine and worldmap
-    or just backup those variables before starting a level.
-[L] time runs while being in in-game menu, at least a bit (jump, go to
-   menu, wait a bit, leave menu, Tux will 'flip' to the ground,
-   instead of fall, pause mode doesn't seem to have this problem, only
-   menu)
-[L] titlescreen level doesn't seamlessly wrap around, might be due to the new
-    scrolling code or due to the worldmap doing the drawing
-[L] Backscroll is really messed up right now :)
-[L] change lispreader to throw exceptions instead of simply assert() on
-    syntax error
-[L] tux sometimes makes short jumps in the endsequence, mostly when
-    going through the goal with a small jump, might be old_up related
-[L] fadein/out for intro/extro would be nice
-[L] when bumping a special with 2 blocks at once, it won't change direction
-[L] tux get killed if he kicks a iceblock while at the same time
-   bouncing on the roof
-[L] in the "Welcome to Antarctica" level, the blocks next to the first growup
-    look like there are 2 blocks above each other when bumping against them as
-    small tux...
-[L] Enemies should turn upside down after being hit by an kicked
-   iceblock
-
-
-Stuff for past milestone1:
---------------------------
-Note that this list is far from complete, but lists some bugs that we don't want
-to touch before milestone1 at the moment.
-- You shouldn't be able to stand on invisible blocks, before you bumped them
-- bombs should explode directly when hit by another bomb or a mr.iceblock
-- we only have a global counter for multiple coin blocks. This should be handled
-  per block.
-- We should reduced the width of tux collision rectangle so that he falls easier
-  between 1 tile wide holes.
-- The enabled/disabled icon in the options shouldn't be a cross. Some people
-  think the options are disabled because they're crossed. Better use a green
-  check mark.
-
-Fixed
------
-
-- leveleditor lacks enemies support - fixed
-- points aren't reset when gameover
-- when jumping into the exit with a star, the endgame music will change back to
-  levelmusic after a short time
-- when jupming against the 2nd multiple coin block in a level only 1 coin will
-  come out.
-- when you interrupted the intro (by going to credits for example) and go back
-  to it, tux doesn't jump anymore
-- supertux crashs from time to time - fixed
-- mriceblock doesn't fall down when being squished in the air - fixed
-- It's not possible to duck while jumping - fixed
-- Intro/Extro textspeed is CPU dependent - fixed
-- sometimes the level restarts/you die after collecing a growup - fixed
-- mriceblock doesn't disapear after being kicked my another iceblock,
-  not sure when exactly it happens, might depend on direction or so - fixed
-- Life counter should be decreased once the die-animation starts,
-   not when it ends - fixed
-- background in underground levels scrolls far too slow, makes them
-   hardly playable, since once too easily get focused on the
-   background instead of the playfield - fixed
-- tux can be killed by back bouncing iceblocks in the exit sequence
-   (all enemies should be removed/turned to coins once the exit
-   sequence started) - fixed
-- leveleditor crashs when pressing the button with the levelsettings - fixed
\ No newline at end of file
+This is a list of tasks and issues that might be worth to implement or
+fix. This list is however not an authorative list of things that must
+be done, its a collection of random things that pop up during
+development, therefore not everything in here might be well thought
+out or worth to implement. Use your brain before implementing anything
+on this list and always think about how useful a new feature would be
+in the context of the whole game or if a potential performance
+enhanchment, actually enhanchmes anything at all.
+
+Coding Standard Stuff
+=====================
+
+* make code clean: "-O2", "-g3",
+                     "-ansi",
+                     "-pedantic",
+                     "-Wall",
+                     "-Wextra",
+                     "-Wnon-virtual-dtor",
+                     "-Weffc++",
+                     "-Wconversion",
+                     "-Werror",
+                     "-Wshadow",
+                     "-Wcast-qual",
+                     "-Winit-self", # only works with >= -O1
+                     "-Wno-unused-parameter",
+
+* remove overuse of multi-inheritance 
+
+* remove overuse of friend'ship
+
+* maybe mark interfaces as interfaces (ISerializable or SerializableInterface)
+
+* split files with multiple classes into multiple files with one class each
+
+* static vs anonymous namespace
+
+* check the code with Valgrind
+
+* use Vector in Physics for 'a' and 'v'
+
+* replace random generator with mersene twister and/or move to external/
+
+* write/finish scripts for include sorting and include guard checking that
+  can be run automatically
+
+* md5.hpp and random_generator.hpp could go to external/
+
+* write scripts to automatically check for:
+
+  - all includes are relative to top level dir
+
+  - include guards are proper
+
+TODO
+====
+
+* GameObject::RemoveListenerListEntry: Ughs, somebody trying to
+  implement a list class within in the GameObject?!
+
+* add --datadir DIR (data/) and --userdir DIR (~/.supertux/)
+
+* make gravity a constant
+
+* funky side effect of too much global variables: when having a
+  savegame with large or firetux and then starting that game, Tux in
+  the menu background will grow and be visible that way for a fraction
+  of a second
+
+* rename Vector -> Vector2f
+
+* get rid of global SDL_Screen* screen variable
+
+* identify all global variables and make them ugly (g_ or globals::)
+
+* get rid of SCREEN_WIDTH/SCREEN_HEIGHT
+
+* is version.h actually needed?
+
+* resolution menu entry moves the wrong way around
+
+* having dictionary_manager in Lisp is extremely ugly
+
+* enforce proper naming of files to match their class
+
+* get rid of NDEBUG and conditional compilation, these should be
+  reserved for a few tiny cases, not spread all over the code
+
+* split particlesystem_interactive
+
+* collect all manager classe into globals.hpp
+
+* more moving directories around?
+
+addon/ 
+audio/ 
+control/
+gui/   
+lisp/  
+math/
+physfs/        
+sprite/        
+util/
+video/
+squirrel/
+  for generic squirrel code
+supertux/
+  worldmap/
+  trigger/
+  scripting/
+    for scripting wrapper code
+  badguy/
+  object/
+
+* implement PNG screenshot
+
+* having hitbox in Sprite is fugly
+
+* write decal object
+
+* implement surface and/or sprite scaling (MipMaps?)
+
+* add code that compares the last Log line with the current, if they
+  are the same reject them and just output something like:
+
+  * last line has been repeated X times
+
+* file naming is inconsistent: some times we use '_' to separate
+  words, sometimes we don't
+
+* implement: http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
+
+* workaround for Ubuntu pulseaudio/OpenAL brokeness:
+
+$ cat ~/.alsoftrc
+drivers = oss
+
+* peaking up/down doesn't work properly
+
+* peaking left/right should make Tux look into that direction (up/down to, needs new sprites)
+
+* add pipe graphics that makes a 90 degree turn
+
+* keep possible future SDL1.3 upgrade in mind
+
+* cleanup scripting interface
+
+* remove cloud tiles, replace with decal
+
+* option menu has text overlap in "aspect ratio"
+
+* jumping up from an enemy doesn't make a sound
+
+* add support for automatic scrolling backgrounds
+
+* add direct reading of Vector2f to Reader/lisp
+
+* replace bell with 'reset block', that starts to glow once bumped
+  into (or something different)
+
+* refactor Camera code, break ugly long functions into pieces and such
+
+* allow fully custom magnification levels from command line (maybe GUI
+  to if there is a proper/easy way to let the user enter numbers)
+  (--magnification or -g WIDTHxHEIGHT:ASPECTX:ASPECTY@MAGNIFICATION)
+
+* use AnchorPoint in Background instead of Alignment
+
+* allow gradients to parallax scroll like Background (make it optional)
+
+* add multicolored gradients (see Windstille source code, which can deal with Gimp gradients)
+
+* fix alpha blending in the SDL renderer, currently all sprites (Tux,
+  etc.) appear transparent
+
+* position of statistics text on the worldmap doesn't scale properly with resolution it seems
+
+* gluBuild2DMipmaps leads to blurriness, maybe lack of magic offset
+  (0.375f, 0.375f, 0.0f) or something else
+
+* font system has blending artifacts at non-1x magnifications, need to
+  have an transparent pixel between letters
+
+* add a (border #t) flag to fonts, that allows to use fonts which have
+  a 1px transparent border around glyphs, which is needed to get rid
+  of blending artifacts in OpenGL
+
+* mouse cursor has blend artifact on high magnification
+
+* shadow font glyphs bleed into other glyphs
+
+* in DrawingRequest "void* request_data;" is only free'ed, but the
+  destructor never gets called
+
+* sprite/sprite.cpp: frame should never get out of range:
+
+  if((int)frame >= get_frames() || (int)frame < 0)
+    log_warning << "frame out of range: " << (int)frame << "/" << get_frames() << " at " << get_name() << "/" << get_action() << std::endl;
+
+* Surface::hflip() is used exactly once, should probally be part of the constructor
+\f
+Scenegraph and Physics Engine Restructuring
+===========================================
+
+* random idea to restructure engine stuff (might lead to nicer code
+  and easier scriptability and a need to rewrite lots of stuff...):
+
+class SomeBadGuy : public PhysicsCallbackListener // or use boost::function
+{
+private:
+      PhysicsPtr box;
+      SpritePtr sprite;
+        
+public:
+      SomeBadGuy(Engine& engine)  
+      {
+         box    = engine.physics().create_box(Rectf(0,0,32,32));
+         box->register_listener(this);
+         sprite = engine.graphics().create_and_add_sprite("Foobar");
+      }
+
+      void update(float delta)
+      {
+         // not much to do, as most stuff is done internally in the engine
+         if (dead)
+         {
+                  sprite->replace_with("Foobar_dead");
+         }
+         else
+         {
+                sprite->hide();
+                sprite->set_pos(box->get_pos());
+        }
+      }
+
+      // no more draw(), done by the scene graph
+
+      void on_collision(CollisionData data)
+      {
+        // respond
+      }
+};
+\f
+Subversion->Git/Mercurial/Bzr Move
+==================================
+
+* right now a switch doesn't seem to be worth it
+
+* core issue right now isn't SVN, but old SVN version on lethargik.org
+  (lacks merge tracking and issues with viewvc)
+
+* cleanup SVN to make import into other version control systems possible:
+
+ - Should we merge trunk/supertux-milestone1 and trunk/supertux when switching to Git/Hg/...?
+
+Mistakes: incorrect branch creation: r5201-5207
+
+tags/start           # unknown
+tags/supertux        # unknown
+tags/supertux_0_1_0
+tags/supertux_0_1_1
+tags/supertux_0_1_2
+tags/supertux_0_1_3
+
+branches/cobble      # unknown
+branches/milestone1  # unknown
+branches/new-collision-detection # unknown
+branches/README      # documentation that will be lost in conversion
+branches/supertux    # unknown
+branches/supertux_0_1_1_branch
+branches/supertux-box2d  # mathnerd (trash)
+branches/supertux-editor-newdrawing # editor
+branches/supertux-editor-newdrawing2 # editor
+branches/supertux-milestone1-olpc    # supertux-milestone1
+branches/supertux-milestone2-grumbel # supertux
+branches/supertux-nogl               # supertux(?)
+branches/supertux-sharp              # another supertux editor
+branches/unison-video                # ???
+branches/vendor                      # ??? CVS crap
+
+trunk/cobble          # some editor?
+trunk/CVSROOT         # ??? CVS crap
+trunk/htdocs          # htdocs
+trunk/jnrcol
+trunk/media
+trunk/SDL_tty
+trunk/setup2x
+trunk/supertux
+trunk/supertux-editor
+trunk/supertux-milestone1
+trunk/supertux-portable
+trunk/supertux-sharp
+trunk/wiz-test
+
+
+Potential Git Issues
+====================
+
+* lack of sparse/narrow/shallow checkout, this means initial checkout
+  will be 200MB instead of 100MB
+
+* no free hoster that allows >1GB repositories (haven't checked all,
+  but those I did came out way short) -> could use lethargik.org
+
+* some free hosters that might allow >1GB repositories don't allow
+  having multiple repositories
+
+* git submodule doesn't seem to be quite ready to replace our
+  trunk/supertux, trunk/supertux-editor, trunk/media/, ... layout as
+  it for example doesn't support automatic tracking of HEAD from the
+  remote repositories, it also feels rather hacky and not properly
+  integrated into git
+
+* lack of metadata versioning, if you delete a branch in git that you
+  haven't merged, then its gone after the next gc/repack (+ two weeks
+  time limit it seems), in SVN on the other side you can checkout the
+  way the tree was at a specific date, its impossible to lose history
+  unless you hack the repository
+
+svn2bzr.py
+==========
+
+Committed revision 5727
+Committed revision 5728
+Committed revision 5729
+Committed revision 5730
+Traceback (most recent call last):
+  File "./svn2bzr.py", line 194, in <module>
+    main()
+  File "./svn2bzr.py", line 187, in main
+    log=log)
+  File "./svn2bzr.py", line 88, in svn2bzr
+    creator.run()
+  File "/mnt/bzr/svn2bzr/branchcreator.py", line 622, in run
+    entries = self.filter_entries(entries)
+  File "/mnt/bzr/svn2bzr/branchcreator.py", line 671, in filter_entries
+    entries = self.filter_moves(entries)
+  File "/mnt/bzr/svn2bzr/branchcreator.py", line 727, in filter_moves
+    entries = self.filter_simult_fren_dirmove(entries)
+  File "/mnt/bzr/svn2bzr/branchcreator.py", line 784, in filter_simult_fren_dirmove
+    newfname = svnrelpath(newdpth, newfpth)
+  File "/mnt/bzr/svn2bzr/branchcreator.py", line 60, in svnrelpath
+    raise errors.PathNotChild(path, base)
+bzrlib.errors.PathNotChild: Path "trunk/media/images/creatures/mr_cherry/cherrybomb.xcf" is not a child of path "trunk/media/images/creatures/mr_bomb"
+\f
+Random Notes
+============
+
+* calculate the size of an background image that should fill the screen:
+
+  image_size = (1 - parallax_speed) * screen_size + level_size * parallax_speed
+
+def calc(parallax, screen, tiles):
+    return (1 - parallax) * screen + parallax * tiles * 32
+
+\f
+Supported Resolution
+====================
+
+SuperTux shall support resolutions from 640x480 to 1280x800 at a magnification of 1x.
+For resolutions higher, such as 2560x1600, upscaling will be used.
+For resolutions smaller, like 320x240 downscaling will be used.
+
+Higher resolution graphics for 2x maginification might be provided.
+Lower res graphics for 0.5x maginification might be provided as well.
+
+Resolution and magnification can be freely configured by the user within the given limits.
+
+In tiles this means we have 40x25 (=1280x800px) tiles per screen.
+
+# EOF #