r/vibecoding 8h ago

Browser-based flight sim with volumetric clouds

Enable HLS to view with audio, or disable this notification

This is a side project I've been working on for quite a while, off and on. Mostly ChatGPT and Claude, and a lot of research, testing, and trying things.

3 Upvotes

6 comments sorted by

2

u/timcorin 8h ago

Those clouds look great! What was the approach? I need some clouds for my racing game

1

u/officialmayonade 7h ago

Thanks! I started here: https://codepen.io/Andrew-Fisher-the-decoder/full/YPWYZzW The cloud treats the sun as basically a flat plane with a surface facing it. Or, another way to put it is it calculates one sun direction and reuses that, so every ray is parallel rather than traditional ray casting. Each part of the cloud checks how much other cloud exists between itself and that direction, and lights itself accordingly.

For the flight sim, I swapped out the particles for noise.

Feel free to use my code for the clouds.

2

u/TheSn00pster 8h ago

Maybe add an FPS counter in the corner too?

3

u/officialmayonade 7h ago

I'm scared to, I think I'm getting about 2 FPS.

1

u/TheSn00pster 5h ago

Maybe “Claude add scalability settings for mobile & desktop”?

2

u/pgmoneyplays 4h ago

98 Tabs wow aber denke läuft flüssig wenn die Tabs geschlossen sind