For the past several months, I’ve been building a component framework for use in the Game Engine, and today I think it’s finally ready for an initial release. This framework is born from frustrations I’ve had with the Game Engine during a number of game jams (8 so far). In particular, there is no easy, built-in means of quickly and easily adding temporary behaviors—post-collision invincibility, for example—and they can be time consuming to implement, while cluttering objects with messy attributes and methods. It’s also not unusual for me to find myself re-writing a simple piece of code for each jam.
After trying numerous approaches, including overly-elaborate state-machines and togglable object methods, I accidentally stumbled upon a callback-based component system (I only learned what a component system is after starting the project) that I feel drastically simplifies the process of writing, encapsulating, and managing behaviors. I used an earlier version of the system during last month’s Ludum Dare, and it made development considerably easier for me.
I’ve spent the last month polishing the framework, cleaning up some rough spots, and now I think it’s ready for a proper public release. It’s only an alpha release, but I consider the core component system’s API to be more or less stable: It may be expanded upon, but it’s unlikely that I’ll make any changes to the current design.
So, without further ado: