Trek73
Enhancements & Changes
How this PHP conversion honors the 1973 original — and the refinements made to its interface, balance, and fidelity along the way.
About This Conversion
This is a PHP conversion of TREK73, the 1973 Star Trek battle simulation originally written in HP 2000 BASIC by William K. Char and Associates (Wilson EDP, San Francisco). It runs as a single PHP file with no database required.
The goal is to reproduce the original's gameplay faithfully while modernizing how you interact with it. This page describes what's different from the 1973 program, organized into three kinds of change: a rebuilt interface, a handful of deliberate gameplay refinements, and a set of fidelity corrections that brought later builds back in line with the original BASIC. It reflects build v62.
The Command Console
The original printed to a teletype and nothing more. This conversion presents the battle as a Starfleet command console — a running transcript on one side, live instrument readouts on the other.
- Live status rail A pair of always-on readouts beside the transcript. The Tactical station lists every enemy contact and plots the scope below; the Ship station shows your shields, fuel, systems, and crew. Because your position (
12), the map (13), and your own damage report (17) are shown live, you no longer spend a turn to check them. - Tactical scope A plotted radar display. You are the Starfleet delta at the center, with a heading marker showing where your nose points; enemy ships appear as dots tagged closing or eluding, probes as rings, torpedoes as diamonds, and jettisoned debris as an ×. It auto-scales to frame the fight, and you can pin a specific range with command
13. - Command palette & quick bar Type a command code, or click it — the quick bar holds the common orders and All Commands opens the full list grouped by category. A button simply enters the code for you; you then answer the same prompts you would have typed.
- Mobile layout On a phone the rail collapses to Log / Tactical / Ship tabs, and the input stays anchored within thumb reach.
- Teletype output New text still prints character-by-character for period feel; press Enter or click to reveal it instantly.
- Color-coded transcript Lines are tinted by source — your commands in blue, crew in brown, computer and Spock in teal, your fire and hits in green, enemy fire and hits in red, detonations in gold, and alerts in red.
- Interactive sub-prompts Commands ask for their parameters one at a time, matching the original's style, but also accept every parameter on a single line for experienced captains.
- Descriptive fire-blocked messages When a weapon can't fire, the game says why — TARGET IN REAR ARC, DESTROYED, EMPTY — so you know what to do about it.
The heading marker is worth watching: if your nose points away from a contact, that ship is in your rear arc where phasers can't lock. Turn to face it (Pursue or Manual Helm) before expecting to fire.
Gameplay Refinements
A small number of deliberate tweaks that depart from the 1973 behavior, each meant to smooth a rough edge without changing the character of the game.
- Pursuit helm assist When you pursue a target, the helm eases you down to a roughly 1000-unit standoff instead of barrelling through the enemy at high warp. It only caps your speed on approach — it never overrides your throttle upward, never changes your heading, and steps aside entirely when you're out of fuel or your warp drive is down.
- Warp-speed capping Ships accelerate toward their commanded warp and hold it, rather than accelerating indefinitely, keeping engagements at sensible distances.
- Distinct detonation banners A deliberately ordered self-destruct reads SELF-DESTRUCT; a ship blown up by battle damage reads ANTIMATTER CONTAINMENT BREACH — so the log tells you which just happened.
- Enemy self-destruct gated on low fuel In the original, any enemy that fell far enough behind (over 9,000 units) would self-destruct as a long-range parting shot, regardless of condition — and because a blast scales with remaining antimatter, a full-fuel ship doing this could engulf the whole battlefield. Now that distant scuttle only fires when the ship is genuinely spent, so a healthy fleet you've out-run gives chase instead of detonating the quadrant.
Fidelity Restored
Later refinement passes brought several mechanics back into line with the 1973 original where the early conversion had drifted.
- Self-destruct & the antimatter breach The self-destruct sequence, enemy scuttles, and the catastrophic containment breach that follows a single devastating hit (40 or more damage after shields) all now function as the original code intended.
- Self-destruct countdown The per-turn SECONDS TO SELF-DESTRUCT warning counts down again once a sequence is armed.
- Victory & retreat conditions A crippled enemy — out of fuel and out of loaded weapons — now counts toward victory, and an enemy is judged to have fled based on range together with its warp status, matching the original end-game.
- Two-way antimatter accounting Torpedo tubes start empty, as in 1973. Loading a tube spends both fuel and capacity; unloading returns them. Ordnance is no longer free, and a tube can once again be overloaded to 15 units.
- Warp-factor limits Commanded warp is bounded to the original ±9 range.
- Warp-burnout notice Running dry mid-flight prints the burnout warning once, rather than repeating it every tick.
With the containment breach restored, a single hit of 40+ after your shields absorb it will destroy a ship outright — yours included. Keeping your shields whole is the difference between a scratch and a coffin.
Preserved from the Original
Everything that made the 1973 game what it was remains intact:
- All 29 commands fully implemented.
- The complete enemy AI — range-based tactics, pursuit, evasion, and firing decisions.
- The full ruse and negotiation system: Play Dead, the Corbomite Bluff, Surrender, and Demand Surrender, with race-dependent odds.
- The eight-tick-per-turn combat resolution, with phaser tracking, torpedo homing, and antimatter detonation.
- The four-quadrant directional shield system with independent strengths.
- Weapon destruction, system damage, and casualty mechanics.
- Power distribution — shield drain, phaser charging, and fuel regeneration.
- The pools of Federation ships, enemy races, enemy captains, and mission briefings, chosen at random each game.
- The full end-game logic: victory, defeat, mutual destruction, enemies fled, and surrender.
Version History
The headline change in each build, most recent first.
| Build | Highlights |
|---|---|
| v62 | Multiple enemy AI adjustments to align better with the original 1973 logic. Other minor narrative changes. |
| v60 | Command console interface — live status rail and plotted tactical scope; scope now plots probes, torpedoes, and debris; enemy long-range self-destruct gated on low fuel. |
| v59 | Pursuit helm assist reworked to a ~1000-unit standoff; warp-burnout notice no longer repeats. |
| v58 | Separate SELF-DESTRUCT and ANTIMATTER CONTAINMENT BREACH detonation banners. |
| v57 | Two-way antimatter accounting; torpedo tubes start empty as in the original. |
| v55 | Self-destruct and the antimatter breach restored; self-destruct countdown; victory/retreat conditions and warp limits brought in line with the 1973 code. |
Technical Notes
- Requirements PHP 7.0+ with sessions enabled. No database and no server-side libraries; the console uses only a web font and a small inline SVG for the scope.
- Deployment Upload the single game file to any PHP-capable web server, alongside the small site-chrome includes.
- State The game is held in
$_SESSION, so refreshing the page preserves your battle. - New Game The NEW GAME button restarts at any time.
- Responsive The console reflows for phones and tablets, with the status rail tucked behind tabs on small screens.
Credits
- Original game William K. Char and Associates, Wilson EDP, San Francisco, CA — 26 November 1973.
- PHP conversion John Patuto, via www.cygnus-x1.net.
- Star Trek is the property of its respective owners; this is a non-commercial homage.