Ski Resort Tycoon game built with three.js

Hi everyone!

For the past few months I’ve been working on Alpenwelt: Ski Resort Tycoon, a game where you build and run your own ski resort in the Alps. I looked around and couldn’t find another ski tycoon game made with three.js, so I thought it was time to share it here.

A bit of background: I’m not a developer and I have zero programming experience. The whole game is vibe coded. I come up with the ideas, test everything and give feedback, and the AI writes the code. It’s honestly one of the most fun things I’ve ever worked on, and I’m still surprised how much three.js can do in a browser.

What you can do

- Draw your own pistes and build lifts: T bar lifts, chairlifts, gondolas, a funitel and cable cars

- Make snow, send out snowcats, run a ski bus and rescue helicopters

- Build hotels and village buildings, hire staff, set prices, take out loans and compete with rival resorts

- Deal with weather, day and night, and night skiing

Under the hood

- three.js r186 with WebGLRenderer

- Almost everything lives in one HTML file (200,000+ lines by now :sweat_smile:)

- Most buildings and vehicles are procedural models built in code; the guests are GLB characters

- A lot of BatchedMesh and merged geometry to keep draw calls down, around 250-280 draw calls and ~4M triangles in a busy view

- Custom shader chunk patches for valley fog, snow and lighting

You can play it in your browser: https://alpenwelt-tycoon.com

There’s no trailer yet, but one is coming soon.

Where I’m stuck: WebGL → WebGPU

I’d like to move from WebGLRenderer to WebGPURenderer, but in my tests WebGPU gets slower than WebGL once there are lots of objects sharing materials. From about 4,000 objects it was 40-50% slower on the CPU side (r185, RTX 2070 Super). As far as I can tell this is the per-object uniform buffer issue (#30560). BatchedMesh helps on both, but I can’t batch everything.

Has anyone moved a draw-call-heavy scene from WebGL to WebGPU? Did you batch everything first, or is there another trick? Tips on porting onBeforeCompile-style shader patches to TSL are also very welcome.

I’d love to hear what you think

2 Likes

A ski tycoon is a great fit for three.js, and the valley fog in your screenshots looks lovely. On the WebGPU question: #30560 is still open, and as far as I can tell from that thread, the per-object uniform cost is the known bottleneck, so the slowdown grows with object count rather than triangle count. That makes staying on WebGLRenderer for the release build a reasonable call for now, with a WebGPU branch you re-test as new versions land. For things you can’t batch, InstancedMesh still helps anywhere the same geometry repeats, like trees or lift towers. For the shader patches, the node materials give you slots such as colorNode, positionNode and normalNode, which cover a lot of what onBeforeCompile chunk edits used to do. I haven’t ported a scene this size myself, so I’d be curious which way you go.

Thanks, that’s really helpful, and nice to hear that you like the valley fog! It’s based on the WebGPU custom fog example.

That matches what I found. I’ll stay on WebGLRenderer for the release and keep re-testing WebGPU on a branch whenever a new version lands, especially once #30560 moves.

Instancing is already in there: the trees and all the lift chairs and cabins are InstancedMeshes, and most buildings go into BatchedMeshes by material. That took a busy view from almost 2,900 draw calls down to around 260. What’s left is mostly unique stuff that’s hard to share.

Good tip on the node slots. For the fog I’d probably use scene.fogNode, but my lighting and shadow cascade patches are the part I’m most worried about. If anyone has moved a custom lighting patch to TSL, I’d love to hear how that went.

I’ll post an update here when I decide which way to go, and when the trailer is ready!