I really wish someone would do the same for Elma/Elastomania. I feel like it has much more funnier physics with it's elastic suspensions etc. Even the third party extension which added multiplayer support was amazing ten years back.
Btw, is this project still active? Last commit was nine months ago.
But I'm afraid of the tweaking of the physics once the multiplayer game is started (and replays are created). Do I need to freeze them once-for-all and only work on supporting more levels or create an editor?
I still have plans for this project, but this is a side-project and like always, life happens and free time disappears...
EDIT : the work-in-progress is in fact in the "pixijs" branch, I almost finished the rendering engine switch to http://www.pixijs.com/ (higher level of abstraction, more cool 2D effects)
As someone who never coded a game (a part from one that don't use any graphics: https://github.com/andreynering/sudoku ), I always ask myself how hard is to code a 2d/3d graphic game. I say this because a game seems much more impressive than other kind of (boring) coding projects.
Games are not my branch of work and I was like you. What I can tell you is that learning to deal with the game loop is the hardest part. The synchronization between the physics, the drawing and the game logic is not very intuitive for a web application developer :-)
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...
I noticed a pretty significant bug (i think). The ghost character actually clears the checkpoints for the current rider! As an example, on level two, the rider must go right for checkpoint A, then left for checkpoint B, back to center for the finish. After finishing once, the rider only needs to go left to checkpoint B, then back to the finish. (Checkpoint A is cleared by the ghost rider).
Very impressive all that you've done!
Nice catch for the bug! I fixed it on the wip branch here: https://github.com/MichaelHoste/xmoto.js/commit/24855d191a43...
There is an abstraction between player physics and ghost physics and I think I need to refactor the collision system to avoid this kind of behavior.
My favorite thing back in the day was making autorunner levels, where your wheels would be lodged against two tracks (of ground) and proceed to do all kinds of tricks.
* The most difficult one was recreating the physics with a modern physics engine (box2D) to make them feel like the original ones. The smallest difference was making some levels impossible. It's not perfect but I tried to tweak them the best I could. And I created a debug mode to help me (and others) achieve this: http://js.xmoto.io/?level=1010&debug=true (I had way too much fun with this mode!)
* Levels: the level format was documented but not everything was "well"-documented. So I had sometimes to reverse engineer things. Like you could see, there are thousands of levels and they added layers of logics with time. So the first levels are usually compatible, but not the latests. And when I tried to add some logics (parallax, checkpoints, etc.), sometimes, the first levels broke (it's difficult to write tests for this). I wrote a blog post about it here: http://xmoto.io/2013/08/20/level-parsing.html
* Replays: I tried to find the smallest possible format to save all player's replays on a database. The original purpose was to create a kind of online community where people could challenge themselves and replay size matters. I first tried to save the replays as "keyboard inputs" but it wasn't reproductible as physics engine are not deterministic between browsers (I learned it the hard way). So I had to save both keyboard inputs and physics "checkpoints" (every x seconds) to adjust the replays. I'm quite happy with the results because it's about 20ko for 1 minute of replay. Here is a big monologue about my reasoning: https://github.com/MichaelHoste/xmoto.js/issues/8
It was fun because I'm a full-time Ruby on Rails developer and I was way out of my confort zone :-)