Hi I don't speak English very well so ill try to do my best :P
I'm doing my first top-down racing game for LibGDX, now I need to create tracks, the tracks aren't very large, I prefer doing this with a set of tiles with different types of curves, because I want to do a level editor. So I need to check whether the car is on the track or not. I thought that these alternatives are good but I need help by choosing the best one
- An big array. Doing an array of tiles, saving whether in that position there is a track, looks very memory consupting
- A set of polygons. And then checking if the car is inside them. Looks very CPU consupting
- An Black-White image of the track. I've seen a recomendation here about that, but looks similar to an array
Do you know another way to do this?