Terrain Rider: Infinite Real-World Physics Based Mountain Bike Game

og

Hey all - I’ve been working on Terrain Rider, a physics-based mountain biking game that runs in the browser.

It’s built with Three.js / React Three Fiber and Rapier, with procedural terrain, bike customization, timed trails, chairlifts, weather changes, and some very unforgiving ragdoll crashes!

Still tuning the riding feel and adding more trails, so I’d love to hear what you think.

Play it here: https://terrainrider.com/

10 Likes

It was fun, the feeling is OK. Maybe a bit too stable – I zigzagged and it still kept recovering balance and riding. The graphics is OK. At some point the scene froze, then became black with “recursive use of object” error message.

1 Like

Amazing! Right from the first few seconds, we can see it’s a great game! The physics of the player falling is very realistic and very funny at the same time. Congrats!

1 Like

thanks for the feedback - I haven’t seen that bug but I will investigate. sounds like rapier.

as for stability - it’s a real balancing act (so to speak)! since I’m trying to keep it purely physics based without baking/scripting animations it means some amount of auto steering is necessary (it would be nearly impossible to balance otherwise). currently it uses a pd controller to adjust steering while you ride, and balance is an emergent property of steering and lean as it is in the real world. finding the sweet spot is not easy. you’ll notice that it is very hard to crash on perfectly level ground, but if you get into the mountains and ride some trails you may find the opposite. anyway, I’ll keep tuning to try and get it more realistic. one of my main reasons for building this game was that other bike games never seem to use real physics, but I think it can be done.

1 Like

In case it would help, here is a snapshot of the screen with the console:

image

1 Like

was this happening on the valley xc trail by chance? if so, should be fixed now.

1 Like

made a full round, no browser crash

beauty - thanks for the help debugging. turned out to be a bug in @react-three/rapier - issue opened.

1 Like

This is REALLY cool :rofl:

As an E-MTB Rider myself I REALLY enjoyed scratching your project just barely. It took me several “crashed” states to finally get a hold on the ASWD controls :roll_eyes:

Great game play, and I especially love the “spinning out” of the the rear wheel after crashing :rofl:

Thumbs up for the implemenation and idea of this application

2 Likes

thanks for the feedback and playtest! if you’ve got an old Xbox controller or similar it plays a lot better than WASD as you can vary your steering/lean inputs.

Wow, this is awesome. I’m pretty new to Three.js, so I’m really impressed by how smooth it feels.

A couple questions:

  1. What helped the most with keeping the FPS high?
  2. Did the procedural terrain or physics cause any major performance issues?

super cool! How do you get up?

FPS is largely a product of hardware, and since this game is fairly heavy overall I decided to create graphic quality tiers with an auto detected quality by default that adjusts things like resolution, shadows, textures, terrain lod, grass density, wind particles, fog, among other things. I also exposed the quality tiers in the pause menu though so you can play around to find a setting that works best. the procedural terrain itself is fairly light-weight. just basic noise for the most part. I have been playing with some more realistic terrain generation though that I might add which will be a bit heavier. I might offload that to a server though.

1 Like

thanks - hit r on your keyboard, or B on gamepad. if you haven’t crashed already, it will ragdoll you. fun for throwing yourself off mountains etc

Just added a fairly large update which includes full real world terrain and all real world bike trails. Starting at Whistler BC. Fully procedural trails and chair lifts!

1 Like

Hi! You did a great job. I really like how it looks overall. I have a few suggestions that could make it even better:

  • Overall, the design looks great.
  • I have a few suggestions for improvement:
  1. Improve the Sky
    • The current sky texture doesn’t look realistic.
    • Please use a higher-quality HDRI or more realistic sky texture for better immersion.
  2. Better Controls
    • Add smoother operation controls.
    • Include clear keyboard and mouse controls (accelerate, brake, steering, camera rotation, zoom, etc.).
  3. Traffic Animation
    • Add other bicycles moving forward on the road to make the environment feel more alive and realistic.
  4. Mini Route Map
    • Add a small route map (mini-map) in the top-right corner of the screen.
    • It should display the player’s current position and the destination.
  5. Travel Time
    • Display the estimated arrival time (ETA).
    • Also show the elapsed time from the start of the ride.
  6. Completion Screen
    • Once the destination is reached, show a “Congratulations!” popup.
    • Display:
      • Total ride time
      • Distance traveled
      • Average speed
      • A “Tap to Continue” or “Play Again” button

These features will make the bicycle simulator more realistic, interactive, and enjoyable for users.

Thanks..

hey, thanks for the feedback. just curious, what graphics quality tier do you have set? the sky quality is heavily dependent on this and on high quality I actually think it looks better than most. on lower qualities though I agree that it is a bit lackluster. other than that, most of these are already on my list. other bikes will be provided by other players, once I add full multiplayer. thanks again for the suggestions!

cool! great job!

1 Like

Multiplayer is in now for anyone following!

1 Like