Tile Rendering
The problem with the tile bitmaps was that the alignment was wrong.
That was all there was haha.
Quick fix 😛
Track Edges
I tried to come up with a way to calculate the collision shapes for the tracks.
So I started with trying to detect where they edges are.
It was really simple.
Just check the neighboring tiles.
If there is one that is not the track, well it’s part of the edge in that case.
The hard part is connecting the edges in a way that I get a nice solid line. That line then represents the "wall". However neighboring tiles need to have their properties changed as well. That’s why I need a good way to detect and set these properties. But taking it with small steps and experimenting is the way to go 🙂 It shows how far it can bring you in just an hour of coding.
Little preview of what the game looks like now:
https://www.nvriezen.nl/wp-content/uploads/2022/09/screenshot0.jpg