summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.org196
1 files changed, 107 insertions, 89 deletions
diff --git a/TODO.org b/TODO.org
index 5476bb9..3e8baee 100644
--- a/TODO.org
+++ b/TODO.org
@@ -1,11 +1,19 @@
* Features
-** DONE Game loop
+** TODO [#A] Smooth animation helper
+ Remove the temporal aliasing in animation by interpolating between
+ current and previous state of animated objects.
+
+** TODO [#A] Actors and scripts
+ Provide a purely functional means of scripting objects using a
+ monadic combinator interface.
+
+** DONE [#A] 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.
-** DONE Input
+** DONE [#A] Input
Provide hooks to respond to keyboard, mouse, and joystick events.
Wrap SDL keycode, mouse button, etc. constants in our own
enumeration.
@@ -15,7 +23,7 @@
- [X] Window (active, resize, quit)
- [X] Joystick
-** DONE Sprites
+** DONE [#A] Sprites
Encapsulates an image and all of its transformations: position,
rotation, scale, color, etc.
@@ -24,7 +32,7 @@
- [X] Add support for animations
- [X] Use a sprite batch when drawing if one is currently bound
-** DONE Sprite batches
+** DONE [#A] 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.
@@ -34,33 +42,20 @@
- See: https://www.opengl.org/wiki/Buffer_Object_Streaming
- See: https://bitbucket.org/rude/love/src/d95dfb67079a60f8de64304dac9002544695f1bb/src/modules/graphics/opengl/SpriteBatch.cpp?at=default
-** DONE Tilesets
+** DONE [#A] Tilesets
Break an image up into many small pieces. Useful for creating maps.
- [X] Algorithm to split texture into tiles
- [X] <tileset> type
-** DONE Animations
- Create a data type to represent an animated sequence of textures
- and/or texture regions.
-
-** TODO Tile maps
- - [ ] Create a generic tilemap module
- - [ ] Create a loader for Tiled .tmx map files.
-
-** DONE 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.
-
-** DONE Scripting
- Provide a way for users to easily script 2D games using coroutines
- and a scheduler.
+** DONE [#A] Coroutines
+ Provide a way for users to easily script asynchronous behaviors
+ using coroutines and a scheduler.
- [X] Coroutines
- [X] Agenda
-** DONE Vectors and matrices
+** DONE [#A] 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
@@ -68,19 +63,67 @@
- [X] Vectors
- [X] Matrices
-** DONE Fonts
+** DONE [#A] Fonts
- [X] Write wrappers for needed FTGL functions
- [X] Write font rendering procedures
-** DONE Sound
+** DONE [#A] Sound
Provide helpful wrappers around SDL sound procedures?
-** TODO A* pathfinding
+** DONE [#A] REPL
+ 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
+ - [X] 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
+ - Will be available in Guile 2.0.10!
+
+** DONE [#A] Upgrade to SDL2
+ - Write necessary bindings and release [[https://git.dthompson.us/guile-sdl2.git][guile-sdl2]].
+ - Replace freeimage with sdl_image 2.0
+
+** TODO [#B] Bitmap font rendering from tileset
+ Some fonts aren't available in TTF format, only as a tileset image.
+ It would very useful for 2D games to be able to render these. Even
+ better if the font rendering procedures are made polymorphic to
+ handle this new type of font.
+
+** TODO [#B] Geometry combinators
+ A functional interface for composing complex geometry from the
+ simple building block of triangles. A square is 2 triangles, a
+ cube is 6 squares, etc. A triangle has 3 vertices with a
+ particular winding.
+
+** TODO [#B] 3D model file loader
+ Use guile-assimp to support loading many 3D model file formats.
+
+** TODO [#B] Multi-pass rendering pipelines
+ It's possible to do multi-pass rendering now by binding
+ framebuffers, shaders, etc. and running the same rendering code
+ again, but there's probably some nicer abstraction that could clean
+ this up.
+
+** DONE [#B] Animations
+ Create a data type to represent an animated sequence of textures
+ and/or texture regions.
+
+** DONE [#B] Asset Management
+ - [X] Live asset reloading
+
+** TODO [#C] Tile maps
+ - [ ] Create a generic tilemap module
+ - [ ] Create a loader for Tiled .tmx map files.
+
+** TODO [#C] 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.
-** TODO Bounding box collision detection
+** TODO [#C] Bounding box collision detection
Most games need simple bounding box collision detection. Provide an
efficient implementation that uses quad trees.
@@ -88,16 +131,13 @@
- [ ] Quadtree module (needs more thought, a purely functional data
structure would be preferable)
-** TODO Particle systems
+** TODO [#C] Particle systems
Provide a highly configurible particle simulation system.
- [ ] Investigate ways to make it fast. Use guile-compost for
performance reasons.
-** DONE Asset Management
- - [X] Live asset reloading
-
-** TODO Keymaps
+** TODO [#C] Keymaps
Provide an Emacs-like way of defining key combinations so that
multi-button input is easy for users.
@@ -115,86 +155,44 @@
Press A to kick, then forward + B to uppercut, within 30 frames
time.
-** TODO GUI widgets
+** TODO [#C] GUI widgets
Provide a set of common graphical widgets such as buttons, scroll
bars, and sliders.
-** DONE REPL
- 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
- - [X] 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
- - Will be available in Guile 2.0.10!
-
-** TODO Shaders
+** TODO [#C] Shaders
- [X] Shader data type
- [ ] Scheme -> GLSL compiler
Port http://wiki.call-cc.org/eggref/4/glls to guile?
-** DONE Upgrade to SDL2
- - Write necessary bindings and release [[https://git.dthompson.us/guile-sdl2.git][guile-sdl2]].
- - Replace freeimage with sdl_image 2.0
-
-** TODO "Nine patches"
+** TODO [#C] "Nine patches"
Images that have a resizable central area but fixed width/height
edges. See [[https://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch][this Android document]] for details.
-** TODO Job control for agenda
+** TODO [#C] Job control for agenda
Allow for pausing and cancelling jobs.
-** TODO Async/threaded signals?
+** TODO [#C] Async/threaded signals?
Not sure how to do this as some things, such as SDL and OpenGL
calls, *must* be done in the main thread. Maybe signals should
just stay synchronous.
-** TODO Smooth animation helper
- Remove the temporal aliasing in animation by interpolating between
- current and previous state of animated objects.
-
-** TODO Bitmap font rendering from tileset
- Some fonts aren't available in TTF format, only as a tileset image.
- It would very useful for 2D games to be able to render these. Even
- better if the font rendering procedures are made polymorphic to
- handle this new type of font.
-
-** TODO Geometry combinators
- A functional interface for composing complex geometry from the
- simple building block of triangles. A square is 2 triangles, a
- cube is 6 squares, etc. A triangle has 3 vertices with a
- particular winding.
-
-** TODO 3D model file loader
- Use guile-assimp to support loading many 3D model file formats.
-
-** TODO Lighting
+** TODO [#C] Lighting
Ambient, point, directional, etc.
-** TODO Multi-pass rendering pipelines
- It's possible to do multi-pass rendering now by binding
- framebuffers, shaders, etc. and running the same rendering code
- again, but there's probably some nicer abstraction that could clean
- this up.
-
-** TODO Instanced rendering
+** TODO [#C] Instanced rendering
A nice optimization when rendering the same mesh a bunch of times.
* Improvements
-** TODO [#A] Clean up imperative rendering API
- The functional, monadic rendering API is nice and clean, but the
- low-level imperative API is very messy. Perhaps it could use some
- syntactic sugar for all of the "call-with-foo" forms. Also, a
- naming convention needs to clearly differentiate procedures/macros
- in the imperative API from those in the high-level API.
- Originally, I didn't expect users to really ever have to use the
- imperative API, but the introduction of sprite batches has made me
- realize that writing custom low-level rendering routines will be
- common enough to merit a nice API.
+** TODO [#A] Implement <rect>, <vector2>, <vector3>, and <vector4> as packed f64 bytevectors
+ Currently, it's expensive to use these types when performing OpenGL
+ operations such as writing to vertex buffer objects because Guile
+ does scm->f64 conversions before writing to a bytevector. To take
+ advantage of Guile 2.2's float unboxing, we can implement these
+ types as a record type with one field: a bytevector. The
+ bytevector will store all of the fields packed together. To take
+ advantage of unboxing, the procedures that get/set these "fields"
+ should be inlined.
** DONE [#A] Allow modules to declare state via signals, including OpenGL resources
This is a tricky one. The major headache with my Lisp Game Jam
@@ -220,6 +218,26 @@
removed (yay!) once this is complete. Be sure to use Guile's ,x
metacommand to view the disassembly to ensure that the necessary
optimizations are indeed being used.
+** TODO [#B] Clean up imperative rendering API
+ The functional, monadic rendering API is nice and clean, but the
+ low-level imperative API is very messy. Perhaps it could use some
+ syntactic sugar for all of the "call-with-foo" forms. Also, a
+ naming convention needs to clearly differentiate procedures/macros
+ in the imperative API from those in the high-level API.
+ Originally, I didn't expect users to really ever have to use the
+ imperative API, but the introduction of sprite batches has made me
+ realize that writing custom low-level rendering routines will be
+ common enough to merit a nice API.
+
+** TODO [#B] Treat shaders like procedures
+ One can view a draw call as the application of a shader program.
+ The arguments to the shader program are uniforms and vertices.
+
+** TODO [#B] Use uniform buffer objects
+ Uniform buffer objects allow setting many uniform values at once,
+ rather than performing a GPU call for each, which results in better
+ performance.
+
** DONE [#B] Use a single OpenGL resource guardian structure
This will deduplicate code amongst all Scheme data types that wrap
OpenGL resources, because right now each one uses its own separate