maechler / kurve

Achtung, die Kurve goes HTML5
https://achtungkurve.com
GNU General Public License v3.0
53 stars 16 forks source link

Fair starting position #14

Closed jayglue closed 1 year ago

jayglue commented 1 year ago

Hi Markus, sometimes, the starting position and vector of a player lead to an inevitable crash into the sidewalls right at the start of a game. Is it possible to set the starting conditions such, that the player is able to avoid this?

Cheers Julian

(ah.. and what does the "Chuck Norris" feature do? It seems as if it's the same as having no super power at all. But it's Chuck Norris, right? :D)

maechler commented 1 year ago

Hi @jayglue

Thanks for raising that issue and sorry for the late reply. You are right, the starting position can indeed be unfair. I raised the minimum distance to the border to 80 pixels (previously 25). This does not fix cases where the starting position and angle of two players are so close together that a crash becomes inevitable, but it should cover the most unfair starting positions.

https://github.com/maechler/kurve/blob/02702ad86319c22e28ab5cc2038ba39a4ba722a9/src/KurveField.js#L257

The Chuck Norris superpower does nothing apart from making the curve grey (because Chuck Norris needs no superpower). I wanted to provide an easy way to play with all curves colored in grey, as this is only possible in a death match else. I guess it's only fun if all players decide to become Chuck Norris and I probably should have called it differently, because it has already caused some confusion.