Hacker News new | ask | show | jobs
by MichaelHoste 3708 days ago
The keyboard controls are the same as XMoto (up for acceleration, down for brake, left/right for rotation) but they are applied differently. The smallest difference in physical value (torque, acceleration, grip, weight, etc.) changes everything and it's very difficult (if not impossible) to have exactly the same behavior as original XMoto. So I just recreated some physics that are fun to play with and works well with the existing levels.

If you want to play with the physics, you can try to change some values here by clicking on them: http://js.xmoto.io/?level=1010&debug=true It's fun to do and I'm open to new modes :-)

If you are interested, the input code is here. As you can see, acceleration and brake are only applied on the wheels, like in real-life. But for the moto rotation, I cheat by applying some torque on the moto body because the driver was not heavy enough to make it rotate quicky: https://github.com/MichaelHoste/xmoto.js/blob/pixijs/src/mot...