๐ Homeworld: A Good Basis
Inspired by Homeworld (1999) โ a two-player, one-screen space RTS where commanding your fleet is doing linear algebra. Every ship is a column vector, your whole fleet is a matrix, and instead of clicking each ship you think: you build a transformation matrix that rotates, scales, or scatters the entire formation at once. The long journey home to Hiigara is "the search for a good basis."
An early sneak peek โ the template game is playable now; the full 16-mission journey home is still being built. ๐
You remember this.
In 1999, Homeworld did something no game had done before โ a real-time strategy game set in true 3D space, with a lonely mothership leading a ragtag fleet across the stars toward a lost home planet. It was beautiful, and it was about something. We kept that feeling โ the fleet, the vastness, the pull of home โ and poured a whole branch of mathematics inside.
Here's what's different โ and amazing.
This isn't point-and-click. Your fleet's positions are a matrix โ one column per ship, live on the Bridge console โ and the ships flying in space are the very same numbers, shown the other way. Move one, and the other moves instantly. Two pictures of one object.
Instead of clicking each ship, you command the whole formation with a transformation. Dial a 3ร3 matrix and watch a ghost-preview show where every ship will go: a rotation swings the fleet around the mothership, a scaling scatters or tightens it, a shear leans it into a parallelogram. The console shows the determinant (how much the fleet's volume grows or flips), the rank (and a warning if your matrix would collapse the fleet onto a plane or a line!), and the amber eigen-axis โ the one direction the transformation leaves fixed. You have to think to choose the matrix that makes the shape you want.
Get it wrong? Nothing bad happens. There's no punishment and no game-over โ the challenge is understanding, not survival. You're not being tested; you're being shown.
๐ธ Gallery โ real in-game screenshots
Straight from our own engine. Click any photo to view it full-size.
๐๏ธ The mountain you're climbing
The peak: linear algebra โ the mathematics of vectors, matrices, and the spaces they live in, taught the way Gilbert Strang teaches it. It's the language underneath computer graphics, machine learning, quantum mechanics, and search engines. And it is, secretly, the perfect language for commanding a fleet in space.
The 16-mission campaign is a journey home, and each mission is one big idea wrapped in a story: spanning a plane of refugees, the dot product as a dust stream, rank and the nullspace "cloak," least-squares through a nebula of noise, eigenvectors as the calm axis you dock along, and finally the singular value decomposition โ the grand finale, "The Victory of Orthogonality." The whole arc is "the search for a good basis" โ the right set of directions that makes a hard problem simple.
What you'll actually feel by the end:
- Why a matrix is a motion of space โ not a spreadsheet of numbers.
- What the determinant and rank really mean (volume, flips, and collapse).
- Why eigenvectors are the directions that don't turn.
- What a "good basis" is โ and why finding one is the whole game.
โค๏ธ How you two play
Homeworld: A Good Basis is built for two people on one screen โ a co-op design that gives each player a real, distinct job. (Playing solo works too โ one person can do both.)
๐น๏ธ Player 1 โ The Pilot
Flies the fleet by linear combinations. Dials coefficients on e1, e2, e3 (the red, green, blue basis axes) to build a movement vector, watches the ghost construction draw itself in space, and commits the order. Plays on the keyboard.
๐ฏ Player 2 โ The Navigator
Works the Bridge console with the mouse: reads the live formation matrix, drags the order sliders, and โ the heart of the game โ edits the transformation matrix M to reshape the entire fleet at once. Rotate, scale, scatter, mirror, or collapse; then hit APPLY and watch the ships fly.
๐ฎ Controls
Keyboard for the Pilot, mouse for the Navigator โ that's all you need.
โจ๏ธ Pilot (keyboard)
W/SA/DR/F— edit the combination coefficients c1, c2, c3Enter— commit the order (the fleet flies the combination)X— toggle diagonal / staged flightBackspace— clear the coefficientsQ/E— switch which squad you commandTab— select the next ship ยทC— recenter the camera- Arrows /
PgUp/PgDn— orbit & zoom the camera Ppause ยทF1debug ยทF12screenshot ยทEscquit
๐ฑ๏ธ Navigator (mouse โ the Bridge console)
- ORDER sliders — drive the same combination the Pilot is building.
- TRANSFORM grid — scroll or drag a cell to edit the 3ร3 matrix M, preview p โ Mยทp on the whole formation, then click APPLY to reshape the fleet. Watch det, rank, the collapse warning, and the amber fixed-axis line.
๐ก๏ธ You cannot lose
There's no health bar, no lives, no game-over screen. Bad orders are simply explained, never punished. You're here to see linear algebra move โ not to grind.
โ๏ธ The tech
Language: pure Python (Windows-first). Graphics: moderngl + pyglet (a direct OpenGL pipeline โ our own GLSL shaders, dual render targets so the solid ships stay crisp while the math holograms glow). Math: NumPy, with a dedicated "referee" module that is the single source of mathematical truth. Packaging: PyInstaller. Every commit is on GitHub โ we build in public.
๐ผ The original that inspired us
The original Homeworld (1999) โ the game we're remaking with linear algebra inside.
โฌ๏ธ Try the Sneak Peek (Windows)
The easy way โ no Python, no terminal, no installer:
- Download the Windows
.zip. - Right-click it โ Extract Allโฆ
- Open the extracted folder.
- Double-click โHomeworld.exeโ โ that's it! ๐
- Grab your partner: one on the keyboard (Pilot), one on the mouse (Navigator). โค๏ธ
To uninstall, just delete the folder. It installs nothing and never touches your system.
๐ก๏ธ Heads-up: we're a brand-new, free, open-source project, so Windows may say โUnknown publisher.โ That's expected for small free games โ click โMore infoโ โ โRun anyway.โ The game needs no admin permission, installs nothing, and doesn't touch your Python or system. Source code.
๐งโ๐ป Prefer to run from source? (for developers)
- Get the code from GitHub (free, open-source โ no account, no payment, ever).
- Make sure you have Python installed.
- Install the libraries:
pip install moderngl pyglet numpy pillow - Run it:
cd homeworldthenpython app.py
First time running a game like this? Our How It Works page walks you through everything in plain English.