SIEGE version 0.7.0 is out

SIEGE version 0.7.0 is out! The following features have been added or changed:

  • evDraw is now called between evTick and evTickEnd — this allows the user to do things after the drawing has already been completed, in preparation for the next tick.
  • SGBank has been added for resource management. This is a conveniency wrapper which allows the programmer to load resources on-demand. For example:
// try data/sprites/<name>.png and data/sprites/<name>.jpg in sequence
SGBank* sprites = sgBankCreate("data/sprites/%s.png|data/sprites/%s.jpg", loadSprite, unloadSprite);

// data/sprites/player.png or data/sprites/player.jpg
// NULL is an opaque data pointer, passed in to loadSprite
SGSprite* player1 = sgBankLoad(sprites, "player", NULL);

// ...

// "player" has already been loaded, so we return that sprite instead of loading again
SGSprite* player2 = sgBankLoad(sprites, "player", NULL);

// automatically calls unloadSprite for each loaded image
  • SGEntity now has an (optional) name, so that entities can be looked up by name.
sgEntitySetName(tanks[0], "tank");
sgEntitySetName(tanks[1], "tank");

// ...

SGList* tanks = sgEntityFind("tank");
  • sgDrawSetAlphaTest and sgDrawSetAlphaFunc have been added, which enable the use of some interesting effects such as metaballs
  • Timers for easier handling of timed things (examples being animations, gun reload times, timed doors, elevators, …)
  • Texture atlases (they are not yet used within SIEGE, so they are mostly useless, but they will eventually be used for sprites and fonts)
  • Other minor changes and fixes
Posted in SIEGE.