Tile Collision
Yesterday on my way back home and this morning I managed to get some things working again. The value that determined how much an entity may move when colliding was calculated incorrectly.

Though it is better now and there is no sticking anymore. There is still a way to collide on a corner of a tile when moving. Which is of course not what we want. But I also needed to add an if-statement. That if-statement is not the solution to the earlier problems. It is more of an indication that there is still something going wrong with the calculations.

The entity, in this case the player, just moves too much. So the game sees it inside a tile and says that the player is overlapping. It should then tell how much the player can move in a certain direction and the rest of the code will then move only by the allowed amount. This should prevent it from moving inside the tile, but apparently it doesn’t. But that is something for next time to fix.

Last modified: October 14, 2022