Mission to Mars

Overview

A fun project, not affiliated with any company. You launch a 120-metre rocket from its tower, get through max-Q (the moment the air pushes hardest on the rocket), separate the booster and fly the ship to orbit. Or jump straight to Quick Catch: bring the booster back down and let the tower's arms catch it. Every success adds propellant to one tank shared by everyone who plays; when it is full, everyone goes to Mars.

Main Features

  • Full Mission: liftoff, max-Q, hot staging (the ship's engines start before the booster lets go) and the burn to orbit, with a score at the end
  • Quick Catch: the day's booster, the same for every player, with your best score and a streak
  • Free Play: a new booster and new wind every try
  • Auto: the autopilot flies the whole mission while you watch
  • A 3-lesson tutorial, each with a "Show me" demo
  • A community tank: every success adds propellant, and at 50,000 t Mars opens for everyone
  • Three cameras (side, tower, chase), night and day, and sound
  • Touch controls on phones: a tilt slider, THRUST and STAGE

How the game works

  • Flight physics: thrust, drag and the stress on the rocket on the way up; wind, tilt and fuel on the way down. The numbers are simplified estimates.
  • The catch: the booster has to arrive slowly, upright and centred between the arms; how close you get sets the score.
  • One tank for everyone: a small server function adds up to 100 t per catch to a single number in Upstash Redis, and allows one catch every 6 seconds per visitor.
  • Works without the server: if the tank can't be reached, the game keeps playing and counts only your own catches.

Structures

  • 1 folder, no build step
    • the game: one index.html (HTML, CSS and JavaScript)
    • the server function: api/tank.js

Tech Stack & Libraries

LayerBuilt with
3DThree.js 0.160 (from the jsDelivr CDN)
GameJavaScript modules · hand-written flight physics and autopilot
Shared tankVercel server function · Upstash Redis
SoundWeb Audio API

Architecture

Mission to Mars architecture diagram

Solid arrows are calls, and the answer comes back on the same line; dashed arrows are sent on their own.

UI Interfaces

The community tank in these pictures shows example numbers.

In motion