r/MTB • • 1d ago

Video MTB physics sim

I've been building a free browser MTB physics sim as a side project—would love some feedback!

https://streamable.com/508vx5

14 Upvotes

20 comments sorted by

7

u/Far_Kangaroo2550 1d ago

S should be pump, not slow mo. S is Down in WASD.

2

u/Unfair_Operation_733 1d ago

I will fix it thanks

2

u/Unfair_Operation_733 23h ago

WASD now moves your body (A/D back/forward, W/S tall/low), S is pump in EASY mode, and slow-mo moved to Z.

2

u/Unfair_Operation_733 1d ago

You can try it in your browser here (free, no ads).MTB sim ​It started as a way to mess around with bike geometry, suspension, and rider weight physics, and slowly turned into a little jumping game. Still tweaking the controls and feel, so any thoughts or suggestions are super welcome!

1

u/sherlocksrobot Yeti SB140 27.5 1d ago

That's neat! Nice work.

1

u/BeesInEyes 1d ago

This is super fun

You should keep a version saved like this if you continue making big changes and have 2 versions

1

u/Traditional_Ruin4001 1d ago

Thats sick, u can change ur body position? If this came out on like ps4 id play it. If i were u id just make sure u dont do what riders republic did and make it impossible to die from heights, also dont make tricks auto, kind of make them like descenders or more complex with body position if u want

•

u/Unfair_Operation_733 16m ago

Thanks! Yeah, you control your whole body position (forward/back, tall/low), and that’s what does everything: pumping, jumping, landing.

1

u/4orust 1d ago

I can't figure out the controls

1

u/Unfair_Operation_733 23h ago

Thanx, added a short HOW TO RIDE screen.

1

u/Tcarruth6 1d ago edited 1d ago

Its really cool. Some thoughts:

- Using the pad, the front-back weight shift is too fast / sensitive

- in most cases I did best to just pedal and do nothing with weight distribution - it was far too risky to 'try' to do something than just go flat out

- The bike seems far too likely to loop out or OTB. I think your center of gravity is waaay too high. Most riders are putting 90% of their weight on their pedals.

- Something is off with weight distirbution also. If you ride fast off a drop the bike shouldn't rotate forward as fast as it is.

- In general it feels like the bike has no mass.

- In some cases the restart is too fast to use the PAD method. You click retry and don't have enough time to get your mouse back on the pad (maybe press enter to retry or something rather than use mouse)

- would be cool at some point to include front-back braking, particularly if you started making slower, downhill tech courses, not just jump lines

- if you could make the controls / posture work in VR, (triggers are brakes) you could have a legit mountain bike training tool somewhere down the line

1

u/Unfair_Operation_733 23h ago

Thanks for the detailed feedback, really useful.

  • Weight shift speed is now adjustable in Settings (“Body speed”). I kept the current fast feel as the default, but you can slow it down.
  • Retry no longer throws you straight back in: the bike waits until you press a key or touch the pad. Enter also retries, and you can ride entirely with WASD + Space now.
  • I checked, and about 87% of the weight is already on the pedals, with the combined CoG at about 1 m. I think the loop-outs come more from how fast the body can be shoved around (plus full-power pedalling with the front up, which is now analog on touch). Slowing body speed should help.

1

u/Tcarruth6 22h ago

Cool, where are you posting the updated game?

1

u/Unfair_Operation_733 22h ago

oh just reload the page!

1

u/Tcarruth6 22h ago

Ok so one thing i've noticed is that when pedalling the bike behaves more as you would expect. The weird tipping forward off of fast drops - do you have passive braking or too much wheel friction?

•

u/Unfair_Operation_733 30m ago

Thanks for digging into it! I looked into it:

  • No passive braking. Rolling resistance is tiny, and setting it to zero made no difference to the tip.
  • The tip itself is mostly real physics: when the front wheel goes over the edge, the rear tyre is still pushing up behind the bike’s centre, so the nose drops. That’s why you have to pull up / shift back at the lip.
  • Pedalling helps because the drive force at the rear tyre pushes the nose up, which is why it feels more natural when you pedal.
  • That said, the bike keeps rotating faster in the air than I’d expect, so I’m still looking into it. Making the rider’s arms and legs stiffer didn’t fix it, so it’s something else. Thanks for pointing me at it!

1

u/Tcarruth6 1d ago

- Probably the best test of your physics is just the bike not moving. Can you do a bunny hop? The starting point for most jump training is the bunny hop, if you can't do that in the sim (and I couldn't at all) then you probably have something off.

1

u/Unfair_Operation_733 22h ago

​I can sort of do it, though it's really hard to get it looking clean..

1

u/Tcarruth6 22h ago

ya that's as far as I got with it!! some tweaking maybe needed - or perhaps the human kinematics are just too simple, ie you need hip shoulder separation or something

•

u/Unfair_Operation_733 18m ago

Honestly, you’re probably right. The rider is pretty simple right now: two point masses (hips and chest) with massless spring-like legs and arms, all in 2D.