agateau / pixelwheels

A top-down retro racing game for PC (Linux, macOS, Windows) and Android.
https://agateau.com/projects/pixelwheels
Other
413 stars 60 forks source link

Unified digital steering for smoother control #435

Open complyue opened 6 months ago

complyue commented 6 months ago

This PR make use of parabolic curve to smooth the steering control. I.e. short-press of steering btns would commit weaker control, long-press of the btns would commit stronger control. Keyboard & touch input handlers are updated uniformly.

Please review.

complyue commented 6 months ago

Unfortunately rm of core/src/com/agateau/pixelwheels/gameinput/TouchInputUtils.java is wrongly identified by git as modified and renamed to core/src/com/agateau/pixelwheels/gameinput/DigitalSteering.java. Hope that don't bother too much for review.

See:

https://github.com/complyue/pixelwheels/commit/0f29d66bec89ece5ad074ab6927d0eca97c66eed

https://github.com/complyue/pixelwheels/commit/48bdee73a96e32e2d5e458a69825c860fe1dc086