&luggen-astro
7th and final day of the Wheel Reinvention Jam 2024.

Most of the day was spent on memory allocation and introducing more particles.
The particle allocator (linked free-list) was fragmenting a lot so I ended up re-implementing most of it.

Particles was the main goal of the day. I had difficulties coming up with a scheme that allowed parenting emitters to ships (trail effect). In the end I just wrote something that works without introducing any entity systems or what have you, which I'm glad for.

Somewhere around midnight I realized that packing the emitter array was causing bugs due to them now being referenced by "entities", so I had to implement a pool allocator. The packed array is still in use for iteration purposes but now it's an array of pointers to the pool data.

Green blocks show available particle memory. Orange blocks show available emitters.

What can I say? This jam was great. I feel like I've passed some sort of milestone. Big thanks to the Handmade team for organizing this! While I didn't quite reach my my goal of making a complete game loop I now have a foundation to work from. And some parts of the code will see their way into other projects.
It's almost 4 am now. Good night!