Inspiration
The spark came from asking: why are we still confined to cubic blocks in 2024? While watching NASA’s Artemis missions and playing Minecraft with my nephew, I realized we could merge the wonder of space exploration with creative building—powered by physics that only make sense on the Moon.
The construction system was inspired by childhood magnetic building toys, reimagined for a low-gravity environment. What if even simple cubic blocks didn’t just stack, but attracted each other magnetically, with visible energy fields players could see and manipulate?
What it does
LunaCraft introduces: A magnetic construction system using cubic blocks Visible magnetic fields with animated wave patterns Realistic lunar terrain with crater distributions modeled after actual lunar statistics Procedural character controls and jetpack mechanics in low gravity Fully browser-based gameplay running at 60 FPS, even on mid-range devices
How we built it
Drafted design.md, requirements.md, and tasks.md using Kiro, an AI-powered spec tool Three.js with ECS, Rapier3D physics (WebAssembly), chunk-based terrain with LOD Lunar gravity character controller, procedural animation blending, jetpack thrust mechanics Real-time force calculations, shader-based magnetic field visualization, surface alignment for cubic blocks Service Workers for fast loading, deployed on Google Cloud Run with <3s cold starts
Challenges we ran into
Magnetic Force Complexity – Naive O(n²) force calcs caused frame drops → solved with spatial hashing (O(n)) Cubic Block Alignment – Even with simple cubes, precise auto-alignment rules were needed Progressive Loading – 50MB assets → staged loading (Critical 2MB → Complete 50MB) Cloud Run Memory Limits – Server exceeded 2GB → moved generation to client-side with deterministic seeds + 10:1 compressed saves
Accomplishments that we're proud of
Built a functional browser-based sandbox prototype within a single day Achieved native-like performance in the browser with WebAssembly + WebGL 2.0 Designed a magnetic system that makes even cubic blocks feel fresh and engaging Developed lunar terrain generation that follows real crater distribution statistics Optimized deployment to run smoothly even on mid-tier devices
What we learned
Browser Capabilities Are Underestimated – Web tech can rival native when optimized Procedural Generation Needs Constraints – Geological rules make lunar landscapes believable Player Feedback Must Be Multi-Sensory – Visual + audio cues can compensate for lack of haptics in browser
What's next for LunaCraft
Expand block interactions with modular energy parts Add collaborative multiplayer lunar base building Explore educational mode: teach lunar geology through play Optimize for mobile PWA for global accessibility
Log in or sign up for Devpost to join the conversation.