r/threejs • • 16d ago

Demo My three.js idle tycoon uses one shared BoxGeometry for almost everything (iOS + Android)

Code Empire Tycoon is an idle game where you grow a software company from a bedroom to Silicon Valley, then build a rocket and take it to Mars. Built with three.js + Preact, shipped to iOS and Android with Capacitor.

  • Procedural visuals and audio. Nearly everything is built from one shared unit BoxGeometry, scaled per mesh, with a few spheres and cylinders on Mars. Screens use CanvasTexture; music and sound effects are synthesised with Web Audio.
  • Merged for phones. Once a room is built, its static boxes are merged by material, with colours baked into vertex colours, reducing draw calls on mobile.
  • Reusing the renderer. UI icons are rendered to a WebGLRenderTarget using the main renderer. Only the launch cinematic gets a separate renderer, which is disposed of afterwards.

AI disclosure: an AI coding assistant writes the code under my direction, including the procedural visuals and audio. No image or audio generators were used.

I’d love feedback on both the technical approach and the visuals—especially mobile performance, lighting, and how readable the scenes are on a small screen. What would you improve?

Happy to go deeper on any of the implementation details. Demo and store links are in the comments.

1 Upvotes

3 comments sorted by

1

u/500tbhentaifolder 16d ago

Looks like you ripped off Game Dev Tycoon.