Much work on API design today. Yesterday I formalized the sprite API somewhat, and started on the scene API:
Today mostly focused on formalizing scene and event management systems, which I had done work on months ago:
I also did some work on:
(Although I should caution that not everything on the wiki is entirely up-to-date or fitting with my current mental model.)
Observant observers of this blog may have noticed that I'm working on scene, event, and camera stuff, even though I originally said that they wouldn't be included in Rubygame 3.0.0. I'm still not totally sure how much, if any, of that stuff will be in 3.0.0, but it seems likely that most of it will (maybe not Camera, but we'll see).
As I was working on the sprite API, I realized that the sprite needed to know what Chipmunk Space is belonged to in order for it to manage whether its Body is part of that Space (as the sprite is made static or nonstatic). That led, in its turn, to the realization that the concept I previously had for a Scene class was analogous to Chipmunk's Space class, in the same way that Sprite is analagous to Body.
So Sprite gained a @scene attribute, and my mind started to wander and probe the old thoughts. I don't think I've mentioned this before, but the development-3.0.0 branch of Rubygame has, for months, already had Sprite, Scene, Event Handler/Hook/Trigger/Action, Vector, Point, Matrix, Transform, Camera, and more classes in a usable fashion. I've been resurrecting and reworking them to fit with this new Chipmunk Powah-ed Sprite system.
It's fun stuff, which is probably why I was able to convince myself to work on it so much today! I'm especially happy with EventHandler and related classes.
There are 2 days left in Week 3, which was slated to be code-writing week, but it's turned into More-API-Designing week (which is fine by me given the lack of progress last week). I certainly expect to use quite a bit of Week 4 as overflow time; it might be necessary to add another week onto the schedule.
As always, we'll see.