๐Ÿ’ฅ Your Ball Asplode


Explosion animations are in.

Thanks to Flecs this was surprisingly simple to implement, given that there was no existing animation system. I just created a new Animated component like this:

typedef struct Animated
{
  int width;
  int height;
  int frames;
  double duration;
  double time;
} Animated;

The existing Render system uses this component, if present, to determine the source clip rectangle on the texture being rendered. Just a few lines of code. And the existing Collision system was updated to despawn balls and bullets and spawn a new explosion entity when a collision between them occurs.

Simples!

Files

blattix-mac-alpha.zip 28 MB
Version 0.3.0-alpha+9ce9424 May 24, 2021
blattix-linux-alpha.zip 28 MB
Version 0.3.0-alpha+9ce9424 May 24, 2021
blattix-win-alpha.zip 27 MB
Version 0.3.0-alpha+9ce9424 May 24, 2021

Get BLaTTiX

Buy Now$1.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.