Making an asteroids-like from scratch.

About Astro


My entry for the Wheel Reinvention Jam 2024.

I initially got into programming because I wanted to make games but quickly gravitated towards graphics. Still, since many years I've been toying with the idea, and now this jam has given me an incentive.

The goal is to implement a complete game loop. The game will be a top-down shooter on a set playing field where you combat incoming waves of enemies.

Read more
Filters

Recent Activity

&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!

View original message on Discord

&luggen-astro
Day Six.
Made quite some progress today. I ditched the scene hierarchy since I realized I could do deferred removal with packed arrays anyway as long as I sort the indices (or pointers in my case).
The main feature of the day was code compression, introducing callbacks and making "entities" data driven so that now, for instance, emitters can run different particle "systems" based on profile selection.
And finally, enemies can now shoot and kill the player. It's almost starting to look like a game!

View original message on Discord

&luggen-astro
Day five.
Implemented a scene-hierarchy of sorts. Currently only used as a linked list for enemies since I needed to defer their deletion. Other types of entities are still in packed arrays but I anticipate at least some of them having to be part of the hierarchy eventually.
On a more fun note, the game now has particles! I'm going with the usual emitter-object scheme. Each emitter is assigned a buffer of packed particles of variable size, for which I had to write a new allocator. In general I'm sticking to arenas whenever possible.

View original message on Discord

&luggen-astro
Day four.
I required circles for debugging purposes so I went a ahead and implemented my very first sine and cosine functions. I don't know how the pros do it, but I wrote a program that generates a lookup-table spanning one quadrant of the unit circle. Then the functions themselves are just converting the supplied scalar to an index, and determines the sign of the value being read.
After that, refreshed my memory on the Minkowski difference and GJK algorithm. Current collision detection is just basic circle overlap test without taking movement into account.
https://caseymuratori.com/blog_0003

View original message on Discord

&luggen-astro
Third day of Wheel Reinvention Jam 2024.
Besides addressing some bugs in the shader code generator, most of the day I've been slowly building up the game state update routine and rendering pipeline. Entities are all instanced in one draw call. I was intending on textured quads but the triangles will have to do for now. The next major issue is going to be collision detection.

View original message on Discord

&luggen-astro
Second day of Wheel Reinvention Jam 2024.
Spent most of the day implementing the shader code generator, since I use my own flavor of glsl and also require include preprocessing.
After that I kept adding to the OpenGL wrapper and now I finally got the "hello world" triangle!
From here on I expect progress to ramp up.

View original message on Discord

&luggen-astro
First day of Wheel Reinvention Jam 2024.
So far I've only got the barest minimum to get a window with OpenGL context going, along with string formatting and other utilities. I decided to start completely from nothing, using previous code only as reference.

View original message on Discord