Showing off dynamic window resizing

I realized I haven’t posted it before, but actually the project has dynamic window resizing. I’ve had this feature for a long time (probably from the beginning of the project), but I don’t think I showed it before and it is not trivial to do.

Also, I had to add video support to the Hugo website/blog framework I am using so that it could show videos (the animated gifs were getting too big…).

Dynamic window resizing during execution

It ain't much but it's honest work.

Time spent for this Time spent so far
I don’t remember… 101 h
[Lire]

Reworking object math for big results

After applying the clang-format and beautifying the code yesterday, I couldn’t resist so I ended up reworking the way I store basic 3D object parameters and how they are used to calculate everything. The main point was that I originally used matrices everywhere to avoid having to deal with casting values or overthinking how to optimise for memory/usage. However, it was inefficient and made things harder to debug. This was an issue as I wanted to figure out how to solve the incorrect collision I was seeing when various projectiles where going through their targets instead of destroying them.

Therefore, I replaced these global 4X4 matrices used all over the place with translation vectors and rotation matrix (3X3). I was rewarded quite nicely for it because, after changing the type of values for the translation component of the base spatial object class, collision handling started working as expected!

Animated gif showing a full gameplay loop and accurate collision handling - You don't get hit when you shouldn't anymore!

Redesigning the way we store position solved collision problems

This game is now fair! No more getting hit when you shouldn't!

Time spent for this Time spent so far
6 h 101 h

Refactoring the rendering system

Coming back after a long break, I wanted to work on improving the rendering. First task was to do some pretty heavy refactoring of the rendering handler to allow it to support different shaders efficiently. This also required changing the camera code to allow application of different shaders on different views. I didn’t want to just hardcode everything, I wanted something more flexible. The animation below shows the work in progress. So, even though the cameras stopped working properly for now, game logic and collision handling continued to work. This shows the value of isolating components and objects and compartmentalizing the game engine properly!

Animated gif showing black screen but game logic still run - Logging shows that events are still happening

Black screen with no rendering but game logic still runs

Also, let's imagine collision bug is fixed! (I will admit though, it looks quite boring now...)

Time spent for this Time spent so far
20 h 70 h
[Lire]

First gitpush, two viewports and a spaceship!

This is my first post, how exciting! Here is where the project is at (initial push to GitLab):

Image showing initial progress of GameProject - Two viewports showing a static model of a spaceship in raw color, from the same angle

Two viewports showing a static scene from the same angle

You have to start somewhere...

Time spent for this Time spent so far
20 h 20 h
[Lire]