Fetching contributors…
Cannot retrieve contributors at this time
177 lines (138 sloc) 5.42 KB

Things To Do

Game loop

Provide a game loop structure that responds to input events, updates the game state, renders the scene. Use a fixed update timestep and cap the maximum FPS.

Game scenes

Games can be broken up into many chunks, called scenes. Examples would be a main menu, a world map, a battle screen, etc.

  • [X] Create a <scene> type that encapsulates input/render/update callbacks
  • [X] Macro for declaratively defining a scene
  • [X] Scene switching


Provide hooks to respond to keyboard, mouse, and joystick events. Wrap SDL keycode, mouse button, etc. constants in our own enumeration.

  • [X] Keyboard
  • [X] Mouse
  • [X] Window (active, resize, quit)
  • [ ] Joystick


Encapsulates an image and all of its transformations: position, rotation, scale, color, etc.

  • [X] Use FreeImage
  • [X] Add support for texture regions
  • [X] Add support for animations
  • [X] Use a sprite batch when drawing if one is currently bound

Sprite batches

Efficiently render a large number of sprites. Only change OpenGL context when necessary. For example, don’t change texture when rendering several sprites in a row that use the same one.

  • [X] Add basic batching for non-scaled, non-rotated sprites
  • [X] Add transformation logic for scaling and rotating
  • [X] Add support for colors
  • [ ] Add support for different blending modes


Break an image up into many small pieces. Useful for creating maps.

  • [X] Algorithm to split texture into tiles
  • [X] <tileset> type


Create a data type to represent an animated sequence of textures and/or texture regions.

Tile maps

  • [ ] Create a generic tilemap module
  • [ ] Create a loader for Tiled .tmx map files.

Scene graph

A tree structure that is traversed when rendering a game scene. The graph is composed of groups and nodes. Transformations are accumulated as the tree is walked.


Provide a way for users to easily script 2D games using coroutines and a scheduler.

  • [X] Coroutines
  • [X] Agenda

Vectors and matrices

Vectors and matrices are needed constantly for games. Provide an easy-to-use module that provides procedures for common vector/matrix math operations

  • [X] Vectors
  • [ ] Matrices


  • [X] Write wrappers for needed FTGL functions
  • [X] Write font rendering procedures


Provide helpful wrappers around SDL sound procedures?

A* pathfinding

A* is a commonly used pathfinding algorithm for games. Pathfinding is such a common task that it would be nice to provide users with a generic implementation.

Bounding box collision detection

Most games need simple bounding box collision detection. Provide an efficient implementation that uses quad trees.

  • [X] Rect module
  • [ ] Quadtree module

Particle systems

Provide a highly configurible particle simulation system.

  • [ ] Investigate ways to make it fast. Might have to resort to a C shared library to avoid GC overhead.

Asset Management

Provide a generic system for loading assets (images, sounds, fonts, etc.) and storing them in a cache. Explore using weak keys so that assets are removed from the cache when they are no longer referenced.

  • [ ] Create asset cache
  • [ ] Investigate automatic asset reloading.


Provide a library of coroutines that perform commonly used time-based actions such as linear interpolation. It would be nice to have a way to make these easily composable as well.

  • [X] Make actions composable
  • [X] Linear interpolation (lerp)
  • [ ] Move to/move by


Provide an Emacs-like way of defining key combinations so that multi-button input is easy for users.

The more I think about what I want, the more I realize that I am describing a system that uses functional reactive programming.

  • [ ] Abstract away input methods Controls can be bound to keys, mouse, whatever
  • [ ] Basic sequences Press A then B
  • [ ] Simultaneous key presses Press A and B at the same time
  • [ ] Composing sequences Press A then B + C
  • [ ] Timeouts Press A then B then C within 15 frames time
  • [ ] Sequences with actions along the way Press A to kick, then forward + B to uppercut, within 30 frames time.

GUI widgets

Provide a set of common graphical widgets such as buttons, scroll bars, and sliders.


Provide a REPL that plays nice with the game loop. Easier said than done.

  • [X] Modify Guile’s REPL to work with the game loop
    • Short-term solution that mostly works
  • [ ] Write a new REPL that runs in the current thread
    • Use coroutines
    • Read user input from a separate thread so as to not block the main thread

0.1 Release

An official 0.1 alpha release with basic, minimal functionality will provide a good place for people other than me to try out guile-2d and perhaps even start to hack on it.

  • [X] Font rendering with FTGL
  • [X] Resolve issues with FIGL
  • [X] Texinfo documentation
  • [X] Clean up docstrings
  • [X] Autotools build files
  • [X] Fix animation bug

0.2 Release

  • [ ] New REPL server
  • [ ] Screencast
  • [ ] Keymaps
  • [X] Better scene management
  • [ ] More documentation