codi-hacks / space-race

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

Checkpoint gates can close if the player is on the wrong side #43

Open Jon-Cavaliere opened 2 years ago

Jon-Cavaliere commented 2 years ago

image

Little bit of a nit-picky issue, but if the player enters a checkpoint gate and then backs out, the on_end_contact callback executes and closes the gate, preventing the player from completing the track. Perhaps adding some data to the checkpoint entity that stores the proper path direction and checking if player coordinates are on the other side before closing would solve this bug?

jaythomas commented 2 years ago

Sounds like it's the player's fault if they come out on the wrong side of the checkpoint. They should probably restart the level anyways if they're doing that badly. Being able to specify an "exit side" would be a nice polish on its behavior though so we should leave this open (despite it not being a big deal in my opinion).

This actually gave me an idea for a level though where you have a grid-based map with checkpoints at the intersections, checkpoints you can pass through from either direction to close. The goal is to pass through all the checkpoints in a logical order/direction to where you don't create dead-ends for yourself. I don't know how to explain it in words so here's a visual that might convey the concept better: https://www.transum.org/Maths/Activity/without/