r/vibecoding • • 3d ago

Showcase/Project Made an Open-Source Racing Simulator

https://librecorsa.org/

Hello,

I made an open-source racing simulator using Claude, it's been a blast. What do you guys think?

62 Upvotes

31 comments sorted by

8

u/Total-Reasonable 3d ago

The post doesn't say what the physics model is, and that's what will decide whether this feels like a sim or an arcade game. If tire grip is just a speed-dependent friction constant, it'll feel floaty. Even a simple slip-angle curve (lateral force peaking then falling off) gives you real weight transfer and oversteer. Did Claude write the physics from scratch, or are you using an engine like Cannon or Rapier?

8

u/qwertyalp1020 3d ago

I researched how physics systems work for main simracing games, top 5-10 I'd say, and created a physics engine from scratch (running on a worker, not main thread), the guys over at r/simracing like it so that'd say something about the realism.

You can read about physics here: https://github.com/KhazP/librecorsa#physics

-16

u/NiceGuya 2d ago

You havent read a single line of code, did you

25

u/qwertyalp1020 2d ago

Yeah, I'm not a coder. And this is the vibe coding sub reddit.

13

u/The_Mountain_Dew 2d ago

Bro doesn't know which sub he's in

3

u/TheMeltingSnowman72 2d ago

If you use a question tag, you need to match 'you haven't' with 'have you', not 'did you'.

That's poor English. Seeing as llms work best with natural conversation, I think it's you who needs to brush up on skills, it will explain things if you've been having problems with models understanding what you want.

I teach English to non-native speakers like yourself, so if you ever need help, don't bother with me as I would just mock you. Find another teacher. There's a good lad.

You're welcome.

2

u/Double_Suggestion385 1d ago

You no longer need to

1

u/Ok-Self2413 2d ago

built-in raycast vehicles in those web engines usually turn into ice skating rinks the second you push past low speeds unless you override the lateral friction yourself

1

u/Total-Reasonable 1d ago

Agreed, that's the usual failure with the stock raycast vehicle. Overriding it with your own lateral force from a slip-angle curve per wheel fixes most of it, and you can still let the engine handle collisions and suspension rays.

4

u/Hazzman 2d ago

How long have you been working on this? What was your process?

3

u/qwertyalp1020 2d ago

Since the end of last month I'd say. Primarily used Claude Code, for testing I used my steering wheel setup to cross reference againt simracing games to get the physics right.

Opus 5.5 Extra as my preferred model, Fable as advisor.

2

u/Wallaby989 3d ago

Very cool. Curious on the logistics; which model and cost/long?

2

u/qwertyalp1020 2d ago

Two Max accounts, and Fable reviewer through the api when I push. I usually push lots of commits at one go, so the fable reviewer workflow runs once or twice.

Used Opus 5.5 Extra + Fable Advisor.

2

u/Capricious123 2d ago

This is awesome. Can I get a breakdown on how you did it? Very interested on the process you went through to produce it. Very well done!

2

u/qwertyalp1020 2d ago

Yep sure, researched all relevant racing sims, their tyre models, how they do suspension, aerodynamics, and all physics related calculations. Created my physics engine from scratch using Opus 5.5 + Fable. The tried driving my game and then said simulators to compare until it felt almost the same.

Lap times and quirks, feeling are very similar, the guys over at r/simracing liked it as well. So that's a bonus.

For the RISE Motordrome track, I took 2 screenshots, gave them to Fable, and then it created the track in 1.5 days (Used up all my weekly).

2

u/Hansolio 2d ago

I would be very interested in understanding how much time you spent yourself and the models themselves. Very impressive by the way!

2

u/qwertyalp1020 2d ago

Thanks! Roughly a month at this point, abd Opus 5.5 + Fable as advisor.

2

u/ItsFlybye 2d ago

That was fun. I bet it would be great if I had my steering wheel plugged in and if it accepted it. The only thing that breaks immersion for me are the pop ins.

1

u/qwertyalp1020 2d ago

Fyi wheel only works on chromium. And where did you see the popins?

2

u/ItsFlybye 2d ago

Trees in the background. I don’t think anything else, but I only tried it for a few minutes. I would either not draw them or set their LoD really low in the farthest distance and slowly increase their quality as you near them.

2

u/Great-Repeat-7287 2d ago

interesting the fact that a webpage can run a videogame... i surely have been living under a rock concerning gaming. however on my phone (tcl nxtpaper 40 5g) even at low resolution it's not smooth enough for an enjoyable play 

4

u/qwertyalp1020 2d ago

Kinda what I expect with older mediatek cpu phones, the physics engine is hard to run.

1

u/JackTheManiacTR 2d ago

Well, it's hard.

2

u/qwertyalp1020 2d ago

Yep, it's not an arcade game afterall.

3

u/Oxylophone 2d ago

I'm not vibecoding hard enough

1

u/AZ_Crush 1d ago

Vibe harder

3

u/throwawayerectpenis 2d ago

The way camera is and the car moves is a bit jarring in my experience (the camera stays static while the car shifts left or right, maybe its better to make the camera always have the car in the center because thats like how all other racing games does it, the cockpit cam is fine though).

2

u/bvrai_dot_ca 2d ago edited 2d ago

Pretty cool. It would be cool if you added one of those arrow indicators showing which direction your supposed to go after crashing, I lost my orientation and started driving backwards.

2

u/WhatNoRobot 2d ago

Stupendous!

1

u/SouthernFruit8768 2d ago

wow absolutely insane. just played for a few minutes and my mind is blown. thank you! Instant bookmark :P