Port Kestrel
portkestrel.com
A thousand-sector space trading game in the spirit of TradeWars
- Domain age
- 5m
- Visits/mo
- not stated
- Stack
- PHP 8 / MySQL, no framework
- Hosting
- 3 mo included
Port Kestrel is a persistent browser game in the line of TradeWars 2002 — you fly a ship between star sectors, buy low, sell high, upgrade, and try not to get shot. No client to install, no engine underneath it. It was written from scratch in PHP and MySQL over several months.
The galaxy
A thousand sectors across four quadrants, generated procedurally from a single galaxy seed. Change the seed and you get a different universe; keep it and the map is stable forever. Sector links are a directed adjacency list rather than symmetrical pairs, so one-way wormholes work without touching the schema.
Pilots get 300 turns a day, resetting at midnight UTC. Turns are spent on warping, trading and fighting, which is what keeps a session finite and gives players a reason to come back tomorrow instead of burning out in one sitting.
What a pilot does
- Trade. Commodities are priced per port and move with stock levels, so routes are worth finding and worth keeping quiet about.
- Fit out a ship. A shipyard sells upgrades — hyperjump drives, mining lasers, weapon and shield slots — with the baseline equipment granted free at registration so a new pilot is never stranded.
- Fight. Combat between pilots, plus auto-engage defenses that let a player leave standing orders rather than needing to be logged in to defend themselves.
- Use the exchange. A separate market layer above simple port trading.
- Build a record. Every notable thing a pilot does — first discoveries, kills, milestones — writes an event to their chronicle, which renders as a public, linkable pilot legend page.
The AI layer
The chronicle is not just a list of events. A lore pipeline turns those events into written history in the game's voice, so a pilot's page reads like an account of their career rather than a log file. Generated text is cached in the database, so the same event is never paid for twice.
This is the one part that costs the operator money. It runs against a language model API and needs your own key. It is behind a feature flag, so it can be switched off entirely and the game plays fine without it — you lose the prose, not the events. Budget for it or turn it off; either is a supported configuration.
How it is built
- PHP 8 and MySQL. No framework, no Composer dependencies, no build step — upload it and it runs.
- Single PDO connection, prepared statements throughout.
- Passwords hashed with
password_hash(). CSRF protection on forms. - All money and commodity quantities are
BIGINT UNSIGNED. There is no floating point anywhere in the economy, so balances cannot drift. - Feature flags gate the larger systems, so you can bring things up one at a time on your own server rather than all at once.
- Runs on ordinary shared hosting. It has been running on a Hostinger shared plan the whole time it was built.
The admin side
An admin panel covers the operator jobs: game configuration, world regeneration, and a status console for checking the AI pipeline is answering. There is also a full fresh-install tool that truncates gameplay data, reseeds the reference tables, regenerates all four quadrants and registers a new admin pilot — which is how you start your own galaxy from zero on day one instead of inheriting a half-played one.
What transfers
- The domain.
- Complete source. Every file, no obfuscation, no phone-home, nothing held back on my server.
- The database schema and reference data.
- Install documentation and the changelog, which runs to several hundred entries and is the honest record of what was built when.
- Twelve months of hosting if you want it, or take the files and go elsewhere.
What it needs from you
Being straight about this, because it is the thing that decides whether this is a good buy for you.
It needs players. A trading game with one pilot in it is a spreadsheet. The code is finished; the community is not. Whoever runs this has to bring people, and that is harder than any of the development was. If you do not have an audience or a plan for getting one, this is the wrong purchase and I would rather tell you now.
It needs an API key if you want the lore layer, and that carries a per-call cost that scales with how many players you have.
It is not monetised. A banner slot is built and has never been sold. There is no payment processing, no subscription tier, no premium currency. If you want to earn from it, that is your work to do — the hooks are there, the business is not.
Where it stands
It is at the end of a long v0.9 series and the remaining work is polish and launch blockers rather than missing systems. Everything described above is built and working. I will tell you exactly what is still on the list before you buy — ask me on Telegram and I will send you the actual notes rather than a sales version of them.