ikbensiep / game1

Race Game
2 stars 0 forks source link

Gameplay: penalize going off-track more harshly #16

Open ikbensiep opened 2 years ago

ikbensiep commented 2 years ago

Right now, the car slows down to a max speed of ~ 15 until the player is on track again, effectively allowing them to literally cut corners since the car slows down gradually.

To do correct collision handling I think the current detection system is not capable enough (we're only looking at pixel color data, so there's pretty much no context to calculate angles correctly (without taking a massive performance hit anyway).

In order to make the experience more challenging, I'm thinking of setting the max speed to 0 when going offtrack. This would still allow the player to get themselves out of the gravel if they haven't veered too far off the racetrack and (thus) have kept enough speed to reach the track again before coming to a complete halt.

When a car's completely stopped off track, maybe reset the (max)speed to 5 and add some track marshal graphics (or a crane! 🚧 🚜) to the car / world so that the now heavily penalized player can once again rejoin the race , without having to figure out a system to actually have the game put the player back on the right track.

ikbensiep commented 2 years ago

Ohh shit I'm loving this JCB idea actually.