Zeteroide
- 9 Devlogs
- 17 Total hours
A simple 2d meteroide shooter to learn opengl and enchance my knowledge of zig
A simple 2d meteroide shooter to learn opengl and enchance my knowledge of zig
I added a damage sound, lives and other stuff.
Smoothing for positions, so we don’t get jumpy jumps from grid pos to grid pos. This way we get smooth animations.
I also tidied up the code, made spawn rate and tick rate increase with play time.
This project has taught me a lot of about graphics programming and opengl.
I did the restructering, the game grid is now no longer stored allowing for more efficent and more efficent ticking. Ticking is now done globally and not per Slot.
I also reintroduce some bugs :> that need fixing for the full code diff view github. Here is one of them:
Implemented lives and death (window just closes for now). They are not yet rendering though. so you only get an image of lazygit today
Now we properly render the explosion texture, missing the meteorites makes them spawn in quicker. They finally disappear when hitting them bottom. No lives yet, that should be trivial to implement.
Also added new sounds, for damage and hitting an meteorite
I got images working! It was a stupid mistake that renderdoc helped me solve. (Pro tip: if you have a projection matrix make sure to actually set it in the shader). It would be nice if I could make opengl hard error in such a case 🤔. As you can see it still not correctly rendered, but at least I see something.
I am currently reworking the rendering pipeline, uhh and somehow a lot of stuff broke. Trying to figure out what I did wrong :dies:
I have been working on improving the codebase and added sound support, read up a lot on how SDL manages sound. And I needed to medal with nix flake dev env, because it was trying to use jack and didn’t see pipewire.
The game doesn’t look much different, but here another screenshot.
I got the basic game working, you can move around, shoot and destroy the meteroides. They don’t deal damage and just chill at the bottom when they reach it. I am not sure if I am happy with current system, as I use a 2d array of the size of the game. Maybe I will change that. Explosions are also working. That is the big red blob that you see, they appear shortly after you shoot a meteroide and disappear after a second.
Overall very fun, next thing to add is gonna be a score and lives.
I have been wanting to learn rendering for some time, I decided a good way was to create a little game with opengl and zig, as I am already knowledgeable about that language.
The screenshot you see is the current game state, it has been very fun so far and I plan to do more.
Doesn’t look to pretty yet, but I plan to work more on this. I have already learned a lot about opengl and rendering.