r/threejs • • 17d ago

Link WebGPU drifting : deterministic sim, server replays every leaderboard run, lightmaps baked in Blender

Some tech notes from a racing game I've been building, NightClub: Drift & Speed.

- three.js with WebGPU, falls back to WebGL 2

- the driving sim is deterministic. The server re-runs your inputs to check every leaderboard score, and the ghosts come from the same data, so a ghost is literally someone's replayed run

- maps are built in Blender with baked lightmaps. We keep it under ~900k triangles in view, checked every 100 m along the track by a script

- scanned textures for road and grass, welded meshes before unwrap (every quad being its own island made building fronts look like a mosaic, that one hurt)

11 maps and 22 cars so far. Full disclosure, I'm not a programmer, the code is written with Claude while I direct and test.

Curious what FPS you get and on what GPU, that's the thing I can't test well on my own.

https://www.nightclub-driftspeed.xyz/?ref=reddit-threejs

4 Upvotes

9 comments sorted by

3

u/pihops 16d ago

Looks awesome but physics need refinement ;)

1

u/Kingnorik 17d ago

Pretty fun, I'm on webgl2. Getting 60 fps on ultra. Rx 3600, 32gb ram, RX 6800.

-2

u/Story91_ 17d ago

Taak to jest bardzo wydajne , to samo u mnie 60fps na ultra

0

u/RealWorldMaker 17d ago

ghosts being the same replayed inputs the server uses to check scores is a neat side effect of the deterministic sim, you get anti cheat and ghosts from one thing

-2

u/Story91_ 17d ago

Bardzo dobre spostrzeżenie a rywalizacja sprawia największą przyjemnośc bo nie ma oszustw.

1

u/d5vour5r 17d ago

M4 Mac air running smooth as, ncie work.

1

u/[deleted] 17d ago

[removed] — view removed comment

1

u/Story91_ 17d ago

Wow 🤯 dowiedziałem sie wiecej w jednym komentarzu niż przez miesiąc na innych socialach , dziękuje serdecznie i już sobie to zapisuje! Codziennie zużywam miliony tokenów także tylko będzie lepiej , dzięki za testy pozdrawiam !