It’s In The Details
Turns out the solution to the problem that I was having was pretty simple. I think I mentioned earlier that I was using fractal values. Tiles should always be identified with whole numbers. So if you want to know on which tile the entity is on, simply subtract the fractal values off the position. Then you should have the tile value.

However what’s important is that you need to do this on the tile position. Not on the floating point position from the origin of the simulation region. So I was just using the wrong values. After that stuff started working when the camera was moving. And now it’s all done.

This means I can continue implementing some actual collision checks now. I made a start with that, but it doesn’t even compile. Enough left to do, but the structure looks already way more readable than before.

Last modified: June 30, 2023