codi-hacks / space-race

Love2D-based Spaceship Racing Game
Other
3 stars 0 forks source link

Checkpoints of varied sizes (or specifiable size) #59

Open Jon-Cavaliere opened 2 years ago

Jon-Cavaliere commented 2 years ago

Currently, as far as I am aware: checkpoints can only be added to the map in two configurations 2x8 tiles ( checkpoint-gate) and 8x2 (checkpoint). Having larger checkpoint paths would aid in map design for larger more open maps. Even with the improved control ability, sometimes fitting in an 8 tile wide path at any substantial speed is challenging. Maybe Im just bad at the game... but I want to zoooom

This isn't a major issue, I would classify it as a "nice to have" for now.

jaythomas commented 2 years ago

The checkpoints are both the same aspect ratio and you can determine their orientation by rotating the spawn point. Since points in tiled can't have a rotation this can be done by setting down a rectangle that represents your spawn location and rotating the rectangle accordingly. See no_planets.tmx for an example.

For the standard checkpoints it should be trivial to make it variable width if we define the spawn points as rectangles like I mentioned and then adjusting the dimensions and rotation of the rectangle to your liking. If that would solve your use case let me know and I can implement it that way.