A Collision Happened
Finally I have found the issue with the algorithm for collisions! It turned out to be a little stupid thing I didn’t think about. I found the issue when stepping through the code. As I suddenly saw a very big number appear on a variable. On closer inspection this was the maximum value of a float. Clearly that variable wasn’t getting set and then it dawned on me.

I used an if-else statement to determine the minimum and maximum point of the tile on the axis.

While I should actually be using two separate if-statements like so:

It’s a bit disappointing to only find this problem after a whole week of working on it.
But again, working in the train is not the most efficient way of doing things.
Errors get made or overlooked.
However the groundwork for finding this bug was done during those train rides.
So spending time during commutes on the game is always better than not spending time at all.

**Devlog Archive**
As you may have noticed I put up a link to the devlog archive on my website.
The link was actually there, you just had to know it otherwise you wouldn’t be able to find it.
So now you can easily look up previous devlogs by clicking the link in the top menu on (almost) any page.
Or simply click this link: Devlogs – NVriezen

Last modified: November 13, 2022