Quick start
- Two ships, one universe. Take turns firing a missile; the first pilot to hit the other ship wins the round.
- Every shot bends: planets, stars and black holes pull on it, and some stars push. Watch where your last shot went and correct.
- Drag from anywhere to aim: the direction from your ship sets the angle θ, the distance sets the speed v₀. Then FIRE (or Space).
- New to it? Set the trajectory preview to full (T, or “preview” in the bar under ☰) to see the whole bend while you practise.
- Phones play sideways. ☰ in a match holds the settings, help and the way back to the menu.
Aiming & firing
- Drag from anywhere — direction from your ship sets θ, distance sets v₀.
- On a phone held sideways, the ▲▼ and ± buttons fine-tune θ and v₀; hold them to repeat.
- Or type exact values into θ and v₀, like the 1989 original (0° = right, counter-clockwise).
- ↑↓ raise / lower the nose · ←→ power. Hold Shift for fine steps, Ctrl for coarse.
- Fire: the FIRE button, Space, Enter or a double-click.
- In flight: hold Space or ▶▶ to fast-forward ×6 (on a phone, hold FIRE); Esc or ✕ aborts the shot.
- The pilot who lost the round shoots first in the next. N new universe · R restart the round.
Views & camera
- V classic ⇄ 3D lite: watch flat space tilt up into a spacetime sheet, and back. The title screen picks the view you start in and, for 3D lite, how deep the wells are.
- In 3D lite: middle-drag orbits the camera, right-drag or Shift-drag pans. On a touchscreen two fingers pinch, pan and twist; three tilt.
- K flight camera (3D lite): missile (rides along), chase (low behind it) or fixed.
- Mouse wheel or pinch to zoom (two fingers also pan); Z or ⊙ recentres.
- Q graphics quality: high / medium / low (also on the title screen). Lower it if the game runs slowly.
- F full screen · M sound on or off.
Overlays
- G spacetime grid — pulled into each gravity well (in 3D lite the grid is the sheet itself).
- P equipotentials — contours of Φ = Σ GM/r. Each one your missile falls through rings a note.
- O osculating orbit — the conic your missile would follow if only the dominant body existed, with eccentricity e, periapsis, velocity (green) and acceleration (pink).
- T trajectory preview: off / short (launch direction only) / full (practice mode — shows the whole bend).
- I flight readout (t, τ, v, dτ/dt, Φ) on or off. On a phone held sideways it sits in the left column during a flight.
- L past shots: off / last (each pilot's most recent) / all — each labelled with the angle and power that fired it. C clears them.
- Hover a planet, star or black hole for its numbers (on a touchscreen, touch and hold it).
All keys
- ↑↓ ←→
- aim (Shift fine, Ctrl coarse)
- Space Enter
- fire · hold Space in flight to fast-forward
- Esc
- abort a flight · menu
- V
- classic ⇄ 3D lite
- K
- flight camera (3D lite)
- Z
- recentre
- Q
- graphics quality
- G
- spacetime grid
- P
- equipotentials
- O
- osculating orbit
- T
- trajectory preview
- I
- flight readout
- L
- past shots · C clears them
- N
- new universe
- R
- restart round
- F
- full screen
- M
- sound
- H ?
- this help
Planets & stars
- Planets pull with Newton's inverse-square law. Mass ∝ ρ·r², and colour is density, as in the original: red ρ=1, green ρ=1.5, blue ρ=2.
- Stars glow with the black-body colour of their temperature, from 3,300 K red dwarfs to 9,500 K blue-white stars, and light the planets around them. Their light pushes on your missile (radiation pressure β), so a star pulls like (1 − β) of its mass. Hotter stars push harder. Hit one and the missile is vaporised.
- White dwarfs are a star's mass crushed to the size of a small moon: blinding, with enormous surface gravity. They bend light a little and make close orbits precess, but unlike a black hole they have a surface.
- Binary stars orbit their shared centre of mass (Kepler's ω = √(G(M₁+M₂)/a³), slowed down to keep it playable; the faint dashed circles). Each is tidally locked, turning once per orbit. The gravity field moves while your missile flies, so timing matters as much as aim.
- Pulsars are spinning neutron stars: tiny, massive, and sweeping two lighthouse beams around. A beam shoves your missile outward, and since the beams keep turning while it flies, the same aim hits differently depending on when you fire. Listen for the tick of each sweep.
- Red giants are huge and thin. Their outer envelope drags on your missile (more strongly deeper in), so a shot can pass through, slow down, or spiral inward. Only the dense core, the bright ball at its centre, destroys it.
Relativity
- Light is slow here. c is only 900 units/s and missiles launch at up to 0.67c, so relativity shows up everywhere — even near planets.
- Black holes add the Schwarzschild term 3L²/(c²r²). That makes orbits precess into rosettes, puts light in a circular orbit at 1.5 rs (the photon sphere), and makes no orbit inside 3 rs (the ISCO) stable. Cross rs and the missile is gone.
- Time dilation. The telemetry shows coordinate time t and the missile's own proper time τ, with dτ/dt ≈ √(1 − 2Φ/c² − v²/c²).
- Lensing. Every pixel near a black hole is ray-traced along a bent light path. You see the accretion disk's far side lifted over the shadow, a photon ring, and an Einstein ring of the stars, planets and trails behind it.
- The disk glows with black-body colour (T ∝ r−3/4). Gas moving toward you at up to ~0.7c is Doppler-boosted, so one side blazes and the other dims.
- The sheet (3D lite) is the textbook picture of gravity: each body sits in a well as deep as its potential Φ = GM/r, compressed to fit on screen. It's a picture, not the cause: missiles fly by the same equations in both views, and a rolling marble wouldn't quite follow them. A black hole's well is gravitational time dilation, which matches GM/r far away but turns straight down at the horizon, where time stops.
- Destroyed ships emit a gravitational-wave ripple (quadrupole, cos 2φ) and a chirp, f ∝ (tc−t)−3/8.
- Integrator. Adaptive leapfrog (kick-drift-kick), which is symplectic, so orbits don't spiral from numerical error.
The music
- Each planet hums a partial of the harmonic series; heavier bodies sing lower. Their tremolo is their orbital frequency √(GM/R³).
- The melody is the Fibonacci sequence mod 7 — it repeats every 16 notes (the Pisano period) — over Euclidean rhythms.
- The missile's voice rises with v/c and is redshifted with its clock as it nears a horizon. The whole score sinks with it.
- Headphones recommended.
Playtesting
Thanks for testing! This is an early build, and every report helps.
What to try
- A few rounds against the CPU (start with cadet), and one against a friend on the same device.
- Both views, classic and 3D lite, and each graphics setting. Does it run smoothly? Does the phone get warm after ten minutes?
- A wild universe: stars and black holes on chaos.
- In the middle of a match, switch to another app and back, and lock and unlock the screen. Does the match carry on?
- Install it: Add to Home Screen (or Install) in the browser's menu.
How to report
- Press bug or feedback (!: on the title screen, at the top of this page, or in a match), say what happened or what you think, and press Send. It goes to the game's private feedback log, with the details added for you: the build, your device, the universe and your shots.
- Say what you saw and what you expected: where on the screen, and what you were doing just before.
- Ideas and opinions are welcome too, not only bugs: what was confusing, what was fun.
Already known
- Not yet tried on an iPhone: tell us how it goes.
- On some Android phones the sound may crackle after switching apps.
- Some phones draw the classic view's planets with a simpler shader.
- On one phone the first shot after loading stutters briefly.
About
A free gravity artillery game that plays in the browser on phones and computers, against the CPU or a friend on the same device. Orbits follow real Newtonian gravity, with Einstein's correction near black holes.
After Gravity Wars (1989) by Sohrab Ismail-Beigi, the DOS game released to the public domain — itself a port of the Amiga original.
How it works: the physics, with universes to try. Also on itch.io and YouTube.
Play it at gravwars.com. On a phone, Add to Home Screen installs it as an app that opens full screen and plays offline.