@jctwood, well the looping tracks have to be created manually, i couldn't come up with a nice way to generate them dynamically unfortunately =( hence the addition of a track editor, i think i need to make it a bit easier to line the end up with the start as it's quite fiddley to get right.

I'm storing the tracks in the map data (4096 bytes / 8 tracks = 512 bytes per track / 3 bytes per section = 170 sections per track, unlikely you'll need that many for a track and i plan to reduce that limit and use the left over space for storing booster locations) each 3 bytes in the track is [length, curve, width], i could probably compress this a bit to make it more compact if necessary since the range of useful values is quite small. the track ends when the length is 0.

when drawing the track in game all the functions wrap around so any request for segments > tracklength are wrapped to the start and any segments < 0 are wrapped to the end, the player's current segment is stored unwrapped so if the track is 300 segments and you're on segment 650 then you're on the second lap.