Thing I've been working on (use WASD or arrow keys to move):
Features:
- Better physics than the bouncy ball thing, in which balls would sometimes pass through walls. This uses a more predictable algorithm where object positions are all quantized to 1/8m (a separate 'for velocity calculations only' position is also stored so that slow things still move eventually), and solid objects are never moved if that would cause them to overlap another solid object.
- Visibility calculator had some (probably sleep deprivation-induced; they were kind of dumb) bugs, which I have now fixed. As a side-effect, that calculation should be a bit faster, even without the straight-line optimizations I had made.
- Hard-coded, 1-bit bitmap graphics.
- I just figured out how to use media queries to make the canvas bigger on big screens.
To-do:
- Better physics:
- Proper force → momentum change calculations that take both objects into account (all movements are due to pairs of impulses between objects with velocity and mass).
- Easier character movement, especially during jumps. My approach to physics for now is to make it mostly right and generally useful, and I'll add exceptions as needed for usability once that's in place.
- Take friction into account.
- Different kinds of objects:
- Ladders.
- Doors.
- Moving platforms.
- Monsters that chase after and try to eat you. I've never written a path-finding algorithm, so that should be interesting.
- A more interesting maze. But maybe I should put that off until I've made an editor.
- Maybe the visibility algorithm should only allow for a certain number of 90 degree turns so that you can't see around corners as much.
- The rendering system was a bit broken because of infrastructure changes I've been making (specifically, that things may be loaded asynchronously, now) and I didn't want to bother fixing that or coming up with pretty 3D stuff. Eventually I should get that figured out again.
- Related to that, animations.