Tilemap Collision
I managed to fix a bug with the drawing of the collision points. It happened because I was using the wrong X and Y coordinate to index into the tilemap chunks. As a result all the points get drawn correctly now. However it didn’t solve the issue with the points not being offset correctly. That means there is a bug in the tilemap editor code. It seems that having three tiles right below each other breaks the algorithm somehow. So that’s the next thing I will take a look at. The last 15 minutes or so that I had weren’t enough to find the cause of the problem yet.

When going back home I found the problem. The algorithm was working fine until at one point it turned around and went back the other direction. So it was skipping half of the edge loop. Luckily this was an easy fix at it was actually just a really bad copy-paste job of me… That means after fixing the typos it worked like intended. I now need to add a loop that makes sure all edge loops get found and processed. Since the inner edge loop isn’t being processed now. Only the outer one.

Last modified: October 7, 2022