Inspiration
We wanted to blend the cold, hard math of orbital mechanics with the warmth and tactility of a 19th-century brass orrery. Most space games rely on sterile, glowing holographic menus. We asked ourselves: What if engineering a solar system felt like operating a beautiful, heavy, antique brass instrument to ignite life on a dead world?
What it does
Goldilock Zone lets you play god with a slingshot. It is a deceptively simple, infinitely complex n-body physics puzzle.
You drag and pull to set your seed planet's velocity, twist brass dials to tune its mass and atmosphere, and try to thread it into a star's habitable ring long enough to spark life. Drift too close, you burn up. Drift too far, you freeze.
To drive high user retention, we designed a ruthless but frictionless loop:
- Instant Restarts: Failure leaves "ghost trails" of your previous orbit, encouraging immediate micro-corrections rather than frustration.
- Procedural Anomalies: An infinite generator that builds chaotic systems (binary stars, black holes, rogue gas giants).
- Viral Sharing: Every generated system has a unique, deterministic Seed Code (e.g.,
3-849102). Players can easily copy their seed and dare their friends on Reddit to solve their exact galaxy.
How we built it
The game is built entirely natively for the web, prioritizing performance and "game feel."
- Physics Engine: A custom JavaScript/TypeScript n-body simulation handling gravitational pulls, orbital decay, and collision detection at a fixed timestep for perfect trajectory prediction.
- Diegetic UI: HTML5/CSS3 utilizing glassmorphism, backdrop-filters, and dynamic CSS variables to create translucent, tactile panels.
- Telemetry: Custom SVGs power the dynamic aim gauges, crosshairs, and glowing orrery rings.
- Procedural Sandbox: A lightweight PRNG (Pseudo-Random Number Generator) algorithm (Mulberry32) combined with mathematical exclusion zones to build randomized, infinitely shareable star systems.
Challenges we ran into
Pure randomness makes terrible levels. Our first procedural generator would frequently spawn gas giants inside the sun, or drop black holes directly on top of the player's starting position.
To fix this, we had to abandon standard Math.random() mapping. We implemented complex mathematical constraints, scaling the habitable zone's radius to the square root of the star's mass. We also utilized polar coordinate spawning and "rejection sampling"—a geometric math check that forces the engine to reroll an obstacle's position if it falls within a calculated exclusion zone. This ensured every randomly generated seed was physically solvable.
Accomplishments that we're proud of
We are incredibly proud of the "Game Feel" and visual clarity. We successfully wired the live physics engine to the DOM to create an auto-hiding HUD. The exact millisecond the player clicks to aim their slingshot, the entire UI smoothly fades out to 10% opacity. It removes all visual clutter exactly when the player needs to focus on their trajectory, making the game feel highly cinematic.
We are also proud of the deterministic seed sharing, which successfully transforms a single-player physics puzzle into an asynchronous, highly social multiplayer experience.
What we learned
We learned how to deeply integrate HTML/CSS UI states with a live, math-heavy requestAnimationFrame render loop without sacrificing performance. We also discovered that true, fun procedural generation relies heavily on rigid geometric math and bounding rules rather than just throwing random numbers at a canvas.
What's next for Goldilock Zone
- Daily Constellations: Implementing a global daily challenge where everyone on the internet gets the exact same bizarre starting setup, competing on a leaderboard for the most stable orbit.
- Custom Level Builder: Giving players the tools to manually drag and drop black holes, binary stars, and rogue planets to build, save, and share their own custom torture-puzzle seeds from scratch.
Built With
- three.js
- vite