Hi everyone!
I’ve just finished a major update for my project Cosmos 404, a stylized planet-hopping runner.
Technical highlights:
-
Performance: Built using React Three Fiber. To keep 60 FPS on PC/Mobile with 100+ obstacles and 20 enemies, I heavily used InstancedMesh and a Zero-GC patterns in the game loop.
-
Custom Shaders: Implemented a “Smart Tint” system using onBeforeCompile to allow per-instance color variation while preserving specific details (like yellow cactus dots) on a single geometry.
-
Proceduralism: The game features 17 handcrafted levels, followed by an infinite procedural generation system.
-
Environment: Custom liquid shaders for chocolate and toxic oceans, and a vertex-based wind system for foliage.
Many other interesting ThreeJS mechanisms.
The game supports 34 languages and global leaderboards. I’d love to hear your feedback on the physics and overall feel!
Play here: https://cosmos.lagshock.com/
Video preview: https://drive.google.com/file/d/1aOqxTKWASy3GhB0CvuR1MOaO7mrBaKt9/view?usp=drivesdk





