This is basically my framework from last time, with a few extra things added in from LD18. I spent some time during the competition re-inventing the wheel, and this time around I will be starting out with the following things pre-built;
- Crude animation system. This is the animation system I invented for LD18 with anything remotely game specific removed. It supports an idle loop, temporarily “hitting” an animation so that when its done, it returns to the previous one; “terminating” on a given animation; that animation will run once and then the sprite will *not* return to its idle animation; andthis animation cannot be interrupted by any hits. This is useful, for example, with a death animation, which cannot be interrupted and is the final state.
- Sprite Factory. A sprite is a set of animations; each animation has its own texture (although there’s no reason they cant share) but the sprite factory will instance a sprite for me. I may use XML for the sprites this time around, but last time, I just hard coded the prototypes for the factory (its that kind of factory) in the factory’s ctor.
- My basic “lazy loading” resource table. The purpose of this class is to allow me to lazy load a resource by name and then grab an integer ID for it; no need for fancy streaming or additional threads, each resource to be loaded is loaded directly from disk, resulting in a blocking wait. I wont have the time to be messing with streaming files.
- Crude pathfinding. Given a current square, and a destination square, this will decide what move the creature of object should move to next. There is no “creature” class as I don’t know if the game will even have creatures, so I’ll need to modify this when the competition starts.
- Crude 2D Renderer. This has features such as “draw square” and “draw text”. I wasted time deciding how this should work in LD18; I should be able to dive right into gameplay this time around.
It also has the features of my previous starting framework;
- Texture, and shader loading each into class Texture and class Shader. I never bothered with shaders last time; I may not this time, although its possible that I will have the time this time around.
- Crude wrapper around fmod for playing sounds.
- Windowing, keyboard and mouse input from SDL
- Image loading (into textures) using SOIL
Here is a download link for anybody to use it; I cant see this hackish, undocumented and incomplete code being commercially viable, but don’t use it for anything commercial please. Thanks.