Recast 'Living in a Fridge' in the darksnow2 tileset, added some slick ice and a...
[supertux.git] / TODO
diff --git a/TODO b/TODO
index c735da1..efaf691 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,10 +1,17 @@
-Note: Controversial list of things currently broken and controversial
-solutions for them.
+SuperTux TODO
+=============
 
-Coding Standard
-===============
+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.
 
-* use SCons instead of CMake
+Coding Standard Stuff
+=====================
 
 * make code clean: "-O2", "-g3",
                      "-ansi",
@@ -20,11 +27,6 @@ Coding Standard
                      "-Winit-self", # only works with >= -O1
                      "-Wno-unused-parameter",
 
-* do not use raw pointer, especially not for Sprite and Surface
-
-* only do one variable initialization per line, not multiple as its
-  currently often done in initialization list
-
 * remove overuse of multi-inheritance 
 
 * remove overuse of friend'ship
@@ -33,69 +35,54 @@ Coding Standard
 
 * split files with multiple classes into multiple files with one class each
 
+* Decide what to do with magic constants of objects (static vs anonymous namespace vs lisp property)
 
-TODO
-====
-
-* GameObject::RemoveListenerListEntry: Ughs, somebody trying to
-  implement a list class within in the GameObject?!
-
-* replace random generator with mersene twister and/or move to external/
-
-* check the code with Valgrind
-
-* static vs anonymous namespace
+* check the code with Valgrind and profilers
 
 * use Vector in Physics for 'a' and 'v'
 
-* add --datadir DIR (data/) and --userdir DIR (~/.supertux/)
+* replace random generator with mersenne twister and/or move to external/ (maybe use boost's random stuff)
 
-* make gravity a constant
+* md5.hpp and random_generator.hpp could go to external/
 
-* 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
+* write/finish scripts to automatically:
 
-* write scripts for include sorting and include guard checking that
-  can be run automatically
+  - make all includes relative to top level dir
 
-* md5.hpp and random_generator.hpp could go to external/
+  - sort includes (.hpp file, then system includes, then other project files)
 
-* rename Vector -> Vector2f
+  - include guards proper and of the form HEADER_SUPERTUX_${PATH_TO_FILE}_HPP
 
-* get rid of global SDL_Screen* screen variable
+TODO
+====
 
-* identify all global variables and make them ugly (g_ or globals::)
+* implement a system that allows to attach comments to specific regions in a level
 
-* get rid of SCREEN_WIDTH/SCREEN_HEIGHT
+* implement a tool to "screenshot" a complete level
 
-* is version.h actually needed?
+* GameObject::RemoveListenerListEntry: Ughs, somebody trying to
+  implement a list class within in the GameObject?!
 
-* resolution menu entry moves the wrong way around
+* add --datadir DIR (data/) and --userdir DIR (~/.supertux/), allow multiple --datadir's
 
-* write scripts to automatically check for:
+* make gravity constant
 
-  - all includes are relative to top level dir
+* rename Vector -> Vector2f
 
-  - include guards are proper
+* get rid of global SDL_Screen* screen variable
 
-* move SVN to http://code.google.com (maybe one day)
+* get rid of SCREEN_WIDTH/SCREEN_HEIGHT overuse, give them a proper name at least
 
-* move bugtracker to http://code.google.com (much simpler, less useless)
+* 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 DEBUG and conditional compilation, these should be
-  reserved for a few tiny cases, not spread all over the code
+* enforce proper naming of files to match their class (SomeClass -> some_class.?pp or so)
 
-* split particlesystem_interactive
+* file naming is inconsistent: some times we use '_' to separate
+  words, sometimes we don't
 
-* Renderer::apply_config() needs to handle fullscreen switching
-
-* collect all manager classe into globals.hpp
+* collect all manager classes into globals.hpp
 
 * more moving directories around?
 
@@ -109,50 +96,189 @@ physfs/
 sprite/        
 util/
 video/
+squirrel/
+  for generic squirrel code
 supertux/
   worldmap/
   trigger/
   scripting/
+    for scripting wrapper code
   badguy/
   object/
 
 * implement PNG screenshot
 
-* GL_ARB_texture_non_power_of_two returns 1 on MatroxG450, while it
-  returns "Missing" in glew info, something wrong
+* having hitbox in Sprite is fugly
+
+* write decal object that doesn't have hitbox
+
+* 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
+
+* 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)
+
+* keep possible future SDL1.3 upgrade in mind (what has changed?)
+
+* cleanup scripting interface
+
+* replace cloud tiles with decals
+
+* 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
+      }
+};
+
+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
 
-SuperTux Editor
-===============
+\f
+Supported Resolutions
+=====================
 
-* +/- zoom buttons do not zoom to the center of the screen
+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.
 
-* Object Tool should behave more like Inkscape:
+Higher resolution graphics for 2x maginification might be provided.
+Lower res graphics for 0.5x maginification might be provided as well.
 
-  - LMB on an object to select
-  - LMB on the background to start a select-rectangle
-  - LMB+move to drag objects it around
-  - Shift+LMB to add an object to the selection
-  - RMB for context menu
+Resolution and magnification can be freely configured by the user within the given limits.
 
-* Select Tool should be removed (identical to Object Tool)
+In tiles this means we have 40x25 (=1280x800px) tiles per screen.
+\f
+Graphic Tasks
+=============
 
-* replace tool crashes:
+* animate cave background torch: data/images/tiles/background/backgroundtile3.png
 
-  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
-System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
-  at System.Collections.Generic.Dictionary`2[System.Object,System.Single].get_Item (System.Object key) [0x00000] 
-  at LayerListWidget.VisibilityDataFunc (Gtk.TreeViewColumn Column, Gtk.CellRenderer Renderer, TreeModel Model, TreeIter Iter) [0x00000] 
-  at GtkSharp.TreeCellDataFuncWrapper.NativeCallback (IntPtr tree_column, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data) [0x00000] 
-   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
-   at GtkSharp.TreeCellDataFuncWrapper.NativeCallback(IntPtr tree_column, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data)
-   at Gtk.Application.gtk_main()
-   at Gtk.Application.Run()
-   at Application.Main(System.String[] args)
+* do parallax tiles
 
-* Replace Tool should document its functions in a status bar message
+* remove lightmap tiles
 
-* Path Tool doesn't seem to do anything
+* redraw/replace data/images/tiles/waterfall/
+\f
+Music Recode
+============
 
-* Tiles Tool doesn't display the current tile
+Currently the music makes up a large chunk of the total tarball
+size. Compression could fix this:
 
+  ,-- Size of data/music/*.ogg
+  V
+40MB - Current quality in SVN
+24MB - Default oggenc quality (3)
+14MB - oggenc at 0 quality
+10MB - oggenc at -1 quality
+
+No audible difference on my sound setup. -- grumbel
+\f
 # EOF #