MOONSHOT
DOWNLOAD & RUN LOCALLY
moonshot.zip
v1.31 — everything you need to play
Pure HTML/CSS/JS — no install required
DOWNLOAD
HOW TO RUN
- 1 Download and unzip
moonshot.zip to any folder
- 2 Open
index.html in any modern browser (Chrome, Firefox, Safari, Edge)
- 3 Play. That's it.
No server, no install, no dependencies, no internet connection needed. Double-click the file and go.
WHAT'S INSIDE
The zip contains 14 files totaling under 600 KB. Every file is plain text (except one audio clip) and fully readable:
index.html
Main game page — canvas element, UI panels, script loading
science.html
Standalone page explaining the real orbital mechanics behind the game
css/style.css
All visual styling — dark theme, panel layouts, button styles
js/constants.js
Physics constants (real Earth/Moon masses, distances, gravity) and game settings
js/physics.js
Gravity simulation using Newton's law with Velocity Verlet integration
js/camera.js
Co-rotating reference frame camera — keeps Earth-Moon axis stable on screen
js/renderer.js
Canvas 2D drawing — planets, orbits, trails, shuttle, HUD indicators
js/audio.js
Sound effects via Web Audio API (synthesized bleeps/tones) + launch audio clip
js/ui.js
UI layer — panels, sliders, HUD updates, unit toggles (km/miles, m/s/km/h)
js/game.js
Game loop and state machine — title, briefing, launch, simulation, results
js/missions/base.js
Mission framework — objective checking, scoring, checkpoint tracking
js/missions/artemis1.js
Artemis I mission config — free-return lunar flyby, 6 checkpoints, scoring
js/records.js
Achievement/records system — tracks personal bests and named achievements
assets/launch.mp3
16-second audio clip from NASA's Artemis 1 launch broadcast (public domain)
SAVE DATA
Your records and achievements are stored in your browser's localStorage under the key moonshot_records. This means:
- Data stays on your machine — nothing is sent anywhere
- Each browser has its own separate save
- Clearing browser data will erase records
- You can clear records in-game via the Records screen
No cookies, no tracking, no analytics, no network requests of any kind. The game works completely offline.
IS IT SAFE?
✓ No executables. Every file is plain text you can read in any text editor, plus one MP3 audio clip.
✓ No dependencies. Zero external libraries, frameworks, or CDN links. Nothing is loaded from the internet.
✓ No network access. The game makes no HTTP requests, no WebSocket connections, no fetch calls. It runs entirely in your browser's sandbox.
✓ No data collection. No cookies, no analytics, no telemetry. Records are saved to localStorage only.
✓ Fully auditable. ~2,500 lines of JavaScript total. Open any file and read it.
ABOUT
Moonshot is an orbital mechanics puzzle game inspired by NASA's Artemis program.
You launch a capsule from Earth, use the Moon's gravity to slingshot around it, and return home safely.
All physics use real values — Newton's gravitational constant, real Earth and Moon masses,
real orbital distances — compressed in visual scale but accurate in behavior.
Built collaboratively by Tyler Black and
Anthropic's Claude using nothing but vanilla HTML, CSS,
and JavaScript. No build tools, no frameworks, no server — just code that runs in a browser.
CHANGELOG
v1.31 2026-04-08
- Navigation flow — back buttons on briefing screen and mission select; scrub button on launch panel returns to main menu
- Roller drag acceleration — small drags are precise (one step per 3px), large drags accelerate quadratically for fast traversal
- Drag direction fix — roller drag directions corrected for intuitive feel on both angle and velocity
- Mode card redesign — clean symbol layout (∠ ⚡ 📅) with combination counts, no spoilers
- Pass detection fix — moon passes only count when shuttle is closer to Moon than Earth, eliminating false distant oscillations
- Most passes achievement updated — HOYVIN-GLAVIN max passes corrected to 23 (from 46) after pass filter
- Sim sweep modes —
--std / --hg flags for standard vs HOYVIN-GLAVIN parameter sweeps, --passes for lightweight pass-count-only runs
v1.3 2026-04-08
- HOYVIN-GLAVIN mode — hard mode with 0.1° angle / 0.5 m/s velocity precision and a full 365-day mission window
- Mode selection — Mission Control now opens a mode picker: Standard or HOYVIN-GLAVIN
- MEGA records — separate achievement set for HOYVIN-GLAVIN with new ultimate thresholds (e.g., 2 km closest moon, 23 passes, 364.8-day trip)
- Records tabs — records screen switches between Standard and HOYVIN-GLAVIN records
- Extended time warps — 128x speed added to Standard; 128x and 256x added to HOYVIN-GLAVIN for year-long missions
- Dynamic time warp buttons — warp speeds generated from mission config, keyboard shortcuts 1–5
- Sun rendering — visible Sun body with glow in Sun Relative view, plus faint Earth orbital circle
- Full orbit view — result screen in Sun Relative mode zooms out to show the entire Earth orbit and Sun
- Result screen zoom toggle — 1x / ½x / ⅓x zoom-out button on result screen for all view modes
- Moon pass markers — white dots with distance labels at each moon pass (green <10,000 km, red ≥10,000 km) during flight and on result screen
- Smarter pass detection — moon passes only count when shuttle is closer to Moon than Earth, filtering out false distant oscillations
- Multi-pass result details — result screen lists up to 5 closest approaches for multi-pass missions
- Bodies rendered at scale — Earth and Moon draw as proper spheres on result screen (min 4px / 2px) instead of dots
- Velocity decimal display — launch configuration shows one decimal place in HOYVIN-GLAVIN mode (e.g., 10800.5 m/s)
- Trail performance — adaptive sampling keeps fullTrail bounded for 365-day missions
- Follow mode excluded from result screen — result view cycles System → Earth Rel → Sun Rel only
v1.2 2026-04-07
- Flight dashboard — scanline-styled panels showing speed, distance, and G-force during simulation
- Speed readout — total relative speed to Earth and Moon with directional arrows (toward/away)
- G-force meter — real-time gravitational field strength display
- Simplified units — single toggle cycles m/s, kph, mph (replaces independent distance/time selectors)
- Smart distance formatting — always km, commas for large values, 5 sig figs for small
- Fine-tune buttons — +/- buttons flanking launch angle and velocity rollers for precise mobile control
- Font size setting — adjustable in-game font scaling moved into launch configuration panel
- Default follow mode — launch now starts in follow view instead of system view
- Mobile landscape layout — dashboard on top-left, objectives top-right, all controls on bottom row
- Mobile portrait layout — dashboard panels in horizontal row, wider follow-mode zoom
- Streamlined result screen — shows moon approach, duration, and passes only
- Launch panel compacted — removed speedometer gauge, tighter padding, units and font on one row
- Mobile fullscreen — entering Mission Control requests fullscreen to reclaim browser chrome space
v1.1 2026-04-06
- NASA Console launch panel — redesigned with analog speedometer gauge, visual angle indicator, and horizontal roller dials for precise control
- 4 camera views (cycle with button or V key): System (co-rotating), Follow, Earth Relative, Sun Relative
- Sun Relative view — watch Earth travel along its solar orbit with Moon tracing a cycloid path; shuttle trail rendered relative to Earth
- Earth Relative view — no frame rotation, Earth stationary, Moon visibly orbits
- Single cycling view button replaces three separate buttons
- Flexible unit system — distance cycles m/km/mi, time cycles s/min/h; speed displayed as distance/time combination
- Speedometer updates with units — switching units live-updates the velocity display and label
- Draggable displays — drag the angle indicator or speedometer gauge directly, not just the roller
- Replay button on success/fail screen — re-launches with same parameters
- View cycling on result screen — switch views after mission ends to review trajectory from different perspectives
- Earth orbital path in Sun Relative view — blue dashed arc showing Earth's 45-day journey
- Bugfix: "Round far side" objective no longer requires 10,000 km proximity — independent of close approach check
- Bugfix: Sun direction and shadows correct in all view modes (was spinning wildly in non-rotated views)
- Bugfix: Shuttle arrow faces Earth-relative velocity in Sun Relative mode
- Sidereal vs synodic month explained in Science page
- Removed auto-switch to System view at day 15
- Angle roller inverted: drag left = higher angle (more intuitive)
- Console aesthetic: scanline overlay, dimmed-green labels, orange launch button
v1.01 2026-04-06
- Default camera now starts in System view on launch
- Added camera icon and redesigned Follow/System view buttons
- Added fine-tune +/- buttons for launch angle (0.5°) and velocity (1 m/s)
- Unit toggles (km/miles, m/s/km/h) moved into launch configuration panel
- Playback controls, day counter, and abort grouped in bottom-right
- Playback icons: compact icon-only buttons
- Auto-switch to System view at day 15 with button flash
- System view now keeps shuttle in frame if it flies beyond Earth-Moon distance
- Thicker, brighter trajectory trails and larger text on canvas
- Brighter fonts throughout game and landing page
- "Round far side" objective now requires shuttle to pass over and around the Moon
- Result screen: Retry/Menu buttons moved to bottom of screen
- Removed score display from results
- Launch audio: plays at normal speed, scales with time warp (dampened), pauses/resumes with game
- Title melody plays on first Mission Control click and on returning to menu
- Begin Mission stops the title melody
- Added "by Tyler Black" byline with Easter egg
- Added version number display
- Screen wake lock prevents phone screen timeout during play
- Mobile layout improvements
- No-cache headers for instant updates
v1.00 2026-04-05
- Initial release
- Artemis I mission: free-return lunar flyby with 6 checkpoints
- Real physics: Newton's gravity, real Earth/Moon masses and distances
- Velocity Verlet integration across simulation, prediction, and analysis
- Co-rotating reference frame camera (Earth-Moon axis locked)
- Follow and System camera modes with adaptive easing
- Trajectory prediction and permanent trail rendering
- Gravity tug visualization (distance lines to Earth and Moon)
- Time controls: Play, 4x, 16x with pause/resume
- Synthesized audio: UI sounds, sonar pings, success/fail fanfares
- NASA Artemis 1 launch audio clip
- Records and achievements system with localStorage persistence
- Spoiler hints for achievement targets
- Science page explaining orbital mechanics
- Unit toggles: km/miles, m/s/km/h
- Works offline from filesystem — no server required
← BACK TO CHOCOYAKI