? opens and closes this panel. Enter starts a game. P or Escape pauses or resumes. During high-score entry, use ↑ / ↓ to change a letter and Space to select it, or type three letters directly. With twin levers enabled, I/K cycle letters too.
Mode applies to the next game.
Drive with the arrow keys or W/A/S/D. Fire with Space. Your next shell loads after the previous shot expires or its impact finishes. The sight blinks while the cannon is reloading. A single enemy hit costs a tank when the optional shield is off.
Global high scores
Classic Field and The Mountain have separate online top-ten tables shared by everyone. Finish a qualifying game and enter three initials to save your score. Turning on the shield at any point makes that game ineligible. Older scores saved only on this device are not uploaded. Games must begin online; completed scores waiting to upload retry automatically while the page is open or when you return. Pending scores must reach the service within 24 hours of starting the game. The last online table is cached if the connection drops.
Connecting to global scores…
Touchscreens
Landscape works best. Use the left pad to drive, reverse and turn; slide diagonally to drive while turning. Hold FIRE with your other thumb to fire whenever the original cannon is ready. Release the pad to stop. Tap anywhere on the title or game-over screen to start. Tap PAUSE, then USE TRACKS to switch to two independent vertical track controls. Push both thumbs up to drive forward, both down to reverse, or one up and the other down to pivot. The center band stops that track; releasing a thumb also stops its track. Slide the right thumb into the outer FIRE strip to shoot while keeping its forward or reverse position. Tap the middle of the strip to fire with the right track stopped. PAUSE then USE PAD restores the directional pad. Your layout choice is remembered. After a high score, use PREV / NEXT and SELECT to enter your initials. The lift boards automatically when you drive onto it. Touch controls appear automatically and can be toggled above. There is no visible help button.
Explore with a shield
Use SHIELD in this panel or press H during play. While it is on, enemy shells and missiles cannot cost you a tank. Rocks and steep slopes still block movement. Your shield preference is remembered. In Mountain mode, press N while the shield is on to advance to the next zone. This also works while paused and keeps the run ineligible for global high scores.
Original twin-lever controls
E / D left track forward / reverse. I / K right track forward / reverse. Enable twin levers in the controls above; opposite track directions turn you on the spot.
The road that wasn't there
Mountain mode begins exactly like Classic Field. Head for the flat opening farther left of the volcano. This is the entrance from the battlefield. The battlefield and distant mountains stay classic until you get close. The familiar opening then grows steadily as you approach, revealing the road between the slopes. The horizon stays visible on either side of that opening. Expect roughly a minute of driving, steering and dodging rocks. Enter a broad, flat valley with mountains on both sides and one easy road. The first fork is farther up the ascent. Follow its level road straight ahead, then around the right bend to the uphill mountain road. Follow the two quiet green road edges between the mountain walls. Choose among four trails: Ridge Cut, Upper Trail, Inner Cut and Deep Pass. The first three rejoin the mountain road. The Deep Pass forks from the Upper Trail before the crater rim. Follow it through the back mountain range and a straight, rock-cut tunnel to a distant UFO base in its own valley; the same trail brings you back. Steep rock stops your tank. Use bends and boulders to break enemy fire. The gun follows the road's slope. Stop and let your sights settle before firing.
Reach the lower pass, high pass, rim, then descend into the crater. Each reached pass becomes a respawn point for your remaining tanks. The rim awards 5,000 points; defeating the armored Mountain Walker in the crater awards a 10,000-point bonus. Ordinary road enemies and saucers do not complete this encounter. Four patrols defend the foothills, passes and rim, with up to two enemies at once. Clear five tanks in the foothills, three enemies in the lower pass and four on the high ridge and rim to earn a short breather. Watch the radar on the first climb: tanks approach from beyond the bends before coming into view. Each road section has at most two return guards for the game. The valley starts with one tank; mountain roads and the back range have up to two nearby enemies. The UFO base has just two tank reinforcements, one at a time, with a twenty-second breather after a kill. Each underground room has one defender; cleared rooms stay cleared, with one mobile guard at a time across the facility. Reinforcements begin farther down the pass, with a pause before firing. Your replacement tank returns with clear space around its checkpoint. At the summit, turn either way to circle the entire crater. The main descent winds deeper around the crater; the Inner Cut offers a shorter way down. More small angular rocks sit only in the road, alternating along the inside edges, with an open center and room to pass on the opposite side. On exposed upper roads, broken cliff lines fall away below the downhill edge; the other side keeps its mountain wall. The UFO base has three wide, low docking bays, each shaped around a parked saucer. Octagonal landing aprons lead into their open fronts. Saucers emerge from the bays, with at most two flying at once. You can destroy them while they are still docked. Discovering it awards 5,000 points. Clear its saucers to stop further launches. Defeating the Mountain Walker completes its objective once. After a pause, smaller defenders can return to the crater.
Fight the pass
Mountain tanks hold a firing distance and stop to line up a shot. A bright muzzle gives you a moment to fire, reverse into cover, or change position. They back away to reload after firing; supertanks recover faster. Missiles announce their approach before charging, and attack on open road stretches. Expect tanks or climbers in tight bends and the tunnel.
The Ridge Cut has armored patrols and a passing saucer worth 5,000 points. Catch it before it leaves; the opportunity appears once per game. The higher Upper Trail favors Rock Climbers. Four road rocks have pale angular cracks. Two cannon hits shatter one and open that piece of road. Leave it intact when you need cover: enemy fire cannot destroy it. Ordinary rocks stay solid, and there is always room to drive past.
Below the UFO base
Find the broad freight platform beyond the landing aprons. Drive fully onto its deck to descend. The guide rails and shaft walls rise past your tank as the platform lowers. When it stops, drive off into the access corridor and follow the ramp to the security junction. Return to the platform to ride back up; drive off at each landing before taking another trip. Steering and firing resume when the lift stops. P pauses the ride.
The assembly wing lies left of the main concourse; the reactor wing lies right. Ahead are two launch shafts with rising saucers. Unfinished natural rock tunnels link parts of these wings to the launch hall and prototype vault. The western bore ends in solid rock. Three rotating, diamond-topped launch controls are marked by chevrons: one in assembly, one in the reactor wing and one beyond the shafts. Shoot each control with the ordinary cannon for 3,000 points. Disabling all three stops launches and awards 15,000. One defender patrols each room or unfinished passage. Defeated guards stay gone for this game. There is at most one mobile guard active at once. Use the freight lift to return to the surface whenever you wish. Your progress inside is preserved until a new game. Your remaining tanks respawn at the most recently reached room.
The prototype room contains PROJECT WRAITH: an unfinished experimental saucer with a faceted lens hull, missing skin panels and exposed drive cells. Approach its assembly cradle to witness a failed hover test. The open drive bay, loose panels and disconnected cables tell the story. The platform is solid cover; clear walkways lead around it. A hit interrupts the test, but this unfinished vehicle is not an enemy or a weapon upgrade.
Beyond the UFO base
A large zeppelin crosses the mountain ascent on its way to the airbase. The first clear sighting is quiet. After traveling farther, the second sighting reveals falling missiles that stay on its course; at the third, it releases one toward your tank. Looking away and back in the same place does not advance this sequence. At the airbase it releases buzz bombs from its belly, up to two missiles at a time with staggered launches and shorter recovery intervals. It stays airborne through both salvos and the guard-tank duel between them. After the final salvo is cleared, it flies to the far end of the runway and slowly descends in the distance. It stays landed, with room to drive around either side. Approach the gondola and use your ordinary cannon: six hits destroy the carrier for 40,000 points. Damage remains if you retreat or lose a tank. If you destroy it earlier, bombs already in flight remain dangerous and the ground racks supply the remaining waves.
The AIRBASE ROAD continues past the saucer bays into the rear mountains. Three jets fly toward the base in formation as you approach. The road reaches a long runway lined with buzz-bomb launch rails and low blast shelters. This is the hardest outdoor area. Clear two salvos of 3 and 4 buzz bombs, with one armored guard between salvos, for a one-time 15,000-point bonus. Every bomb still takes one cannon hit and awards 2,000 points. The later salvos give shorter warnings and less recovery time.
Watch the lit launch rail, turn toward the incoming bomb and fire as it dives toward the runway. Use the open runway to maneuver; the side shelters offer cover. Up to two staggered missiles can be active at once. A guard-tank duel happens between salvos. Escaping a bomb does not clear it from the salvo. You can retreat along the road and return, keeping completed kills. A lost tank respawns at the airbase approach. The same steering, cannon, extra-tank thresholds and three-tank game apply throughout.
The summit fortress
The road skirts the landed zeppelin and climbs beyond the airbase to a castle high in the range. Reaching the final crest grants one bonus tank per game. The towers flash before launching fireballs at your position; change your line after the flash. They do not track you in flight. Artillery stops near the entrance.
A water-filled moat surrounds the castle. Hit the raised drawbridge three times with your cannon and wait for it to lower. Drive across into the great hall. Broad stone bases beside the first pair of pillars provide cover immediately inside the hall. Tuck behind one, then move into the central lane to fire. The bridge remains open for retreat. The Iron Warden at the far end awakens when you advance. Its muzzle flashes before each volley; dodge or shelter behind a pillar, then fire while its armor shines brightly during the pause. Nine cannon hits defeat it for 50,000 points and clear the fortress encounter. Damage and the lowered bridge persist after losing a tank, and you can drive back down the mountain.
The coast
A narrow rock passage beside the submarine dock leads to a broad beach. The shoreline continues in both directions beyond the landing area, without fixed side walls. Explore along the cliffs and shoreline; the tank can enter the shallow shelf but stops before deep water. A small cave to the right of the exit provides room to turn and shelter from ordinary fire. Carrier salvos strike both sand and water, with angular splash plumes. The final barrage still arrives while you shelter, collapsing the cave and ending the game.
A heavy tandem-rotor transport approaches from offshore during the beach battle, carrying a large Mountain Walker beneath its hull. It hovers over clear sand, lowers the same visible walker on cables, then departs. The walker needs three cannon hits and uses its existing short-range flame attack. The transport can also be shot down when low enough, destroying its attached cargo. This reinforcement appears once per run; it does not reset after retreat or losing a tank.
Landing craft and the carrier
Later in the beach battle, smaller landing craft deploy tanks. An empty craft leaves its ramp open for about 20 seconds. Drive fully aboard to close it immediately and ride to the loading bay at the carrier’s rear. Explore the hold, cranes, cargo cover and power plant. Guards keep arriving; there is no timer inside. Shoot the three power conduits to silence the regular ship batteries. Reinforced hull plates can be breached, letting water into the hold.
Return to the waiting craft for a ride back. The outside battle continues throughout the return crossing: aircraft, tanks, shells and other landing craft keep moving. The remaining beach time before the final barrage resumes when you reach shore. The ship’s exterior stays the same.
Keep moving through the mountain extension. Staying in one small area too long can attract a pursuer, even after the ordinary local patrol is defeated. Use cover briefly, then change position.
A celebration of 1980
What an amazing year 1980 was for arcade games: bold ideas, unforgettable silhouettes, and challenges that made every attempt count. Battlezones includes an Easter egg celebrating that spirit.
Identify your targets
TANK 1,000 · MISSILE 2,000 · ROCK CLIMBER 2,000 · SUPERTANK 3,000 · SAUCER 5,000 · MOUNTAIN WALKER 6,000 · ZEPPELIN 40,000. Extra tank at 15,000 and 100,000. The radar shows enemy direction; its top always points ahead.
The small mountain-only Rock Climber first appears in the high pass, beyond the lower roads. Watch the upper trail, the Deep Pass tunnel approaches and the rocky back range. Just beyond the tunnel, a squad of four regular-sized climbers attacks together, two descending from each side of the road. Defeated squad members stay defeated for the rest of the run. It has four jointed legs. It starts on rocky shoulders or boulders, plants its feet on the terrain and climbs down toward your tank. Its plated body, servo joints and paired leg struts follow the slope. A bright green nozzle warns before it spits a short burst of green flame. Back away to stay beyond its reach, use rocks as cover, or fire while it descends. One cannon hit destroys it.
The crater introduces the Mountain Walker: a larger, armored version of the Rock Climber, with four articulated legs and the same short-range green flame attack. It takes three cannon hits to destroy. Each hit flashes its armor; the first two leave it fighting. Use the open crater floor to keep your distance.
The original game, in code
Preserved Atari source · Annotated disassembly · MAME sound hardware. These informed the graphics, controls, fixed obstacle layout, score-based aggression, and missile-count progression.
The rumor archive
A 2018 Museum of the Game discussion mixes serious advice about reversing, missiles, and cover with an unmistakable joke about an entire sequel waiting at the volcano. That spirit is the starting point here: reward exploration while keeping the original combat skills useful.
Players still recall trying to reach the volcano and mountain pass in this 2025 arcade discussion. Antstream’s retrospective records the hidden castle and tank factory versions of the legend. Both were rumors, not features of the 1980 game.
Rebellion’s 2016 developer post confirms that the schoolyard volcano rumor also inspired its later campaign. This game imagines a different answer: a continuous climb within the spare vector battlefield, with the same cannon and steering from beginning to end.
How Battlezones was created
Battlezones grew through a continuing conversation between a human designer and AI coding tools. Peter supplied the ideas, played the game, shared screenshots, and refined what felt right. Changes often began with a concrete observation: a road was hard to read, an enemy appeared too close, or an aircraft was visible through a wall. The next step was to inspect the code, make a change, test it, and play again.
The tools and their roles
OpenAI Codex is the coding agent used for the recorded development work. An agent can work on the project itself: read files, edit code, run commands and tests, inspect the browser, and help publish a revision. That makes the conversation part of an ongoing development workflow, with actual source files and results to review.
GPT-6 Astra is the OpenAI model recorded in this Codex conversation. The model interprets requests and proposes code; Codex supplies the surrounding tools and working environment. A model is not a game engine. The delivered game runs ordinary browser code, and its enemies follow programmed rules. Playing does not require an AI subscription or a language-model call.
Claude Code, Anthropic's coding assistant, helped take the game online from Peter's Visual Studio Code workspace. The repository confirms commit f595294, co-authored by Claude Fable 5.1: the initial GitHub Pages deployment workflow and the dist/CNAME custom-domain file, two files with 31 added lines. The session Peter shared also records enabling Pages, configuring battlezones.org, guiding the GoDaddy DNS changes, and enabling HTTPS after the certificate was ready. Those account-side steps are described by the session, beyond what the source commit alone establishes.
VS Code provided the editor workspace, Claude Code chat panel, clickable file references and a place to share a screenshot. The deployment work primarily used shell commands: Git for revisions and rebasing, the GitHub command-line tool for Pages settings, and DNS/HTTP tools to check the domain and redirects. That session reports no gameplay, rendering, sound or test-code edits. Claude also reviewed an iPhone touch-control question without changing the controls.
The later Codex development work added the build-and-version step in cb67f57, giving changed assets new URLs so browsers load the matching scripts. The conversation, time and token figures below measure the recorded Codex session; Claude Code usage is not included. Repository and source-line totals include checked-in contributions from both workflows.
Tool references: Codex · GPT-6 Astra · VS Code · Claude Code.
What the code actually does
The playable client consists of HTML, CSS and four JavaScript files. HTML defines the screen and dialogs; CSS handles layout and device controls. JavaScript implements the simulation, vector drawing, sound and leaderboard connection. A custom renderer projects three-dimensional points into straight lines on a two-dimensional HTML Canvas. Shared geometry drives roads, collision and visibility. Web Audio synthesizes the engine, explosions and other effects from oscillators and noise.
Selected shapes, lettering, scenery and placements were transcribed from preserved Battlezone sources. The mountain adventure is additional JavaScript geometry and game logic. This is a source-informed reconstruction with new areas, not a ROM emulator. The game needs no Unity or Unreal runtime, image-generation service, or AI model while you play.
Node.js runs the local build and automated checks outside the browser. Tests exercise movement, hits, cover, controls, scoring and rendering; replay comparisons help protect Classic behavior. Browser inspection and playtesting catch problems that numeric checks can miss. AI-generated code still needs that review, and a passing test does not certify a perfect reproduction of an arcade cabinet.
Code size by area
A separate source snapshot from September 19, 2026, revision b367f30, includes the tunnel squad and beach transport. It contains 3,746 source and configuration lines, plus 3,099 lines of automated checks and test support: 6,845 lines across 72 files in the categories below.
Physical lines in the measured revision| Area | Files | Lines |
| Game, worlds, controls and vector renderer | 1 | 3,192 |
| Original vector shapes, lettering and placements | 1 | 12 |
| Synthesized audio | 1 | 51 |
| Browser leaderboard client | 1 | 59 |
| Screen, manual and responsive styles | 2 | 182 |
| Score API and database queries | 2 | 89 |
| Database schema and migration | 2 | 48 |
| Build, local servers and deployment configuration | 7 | 113 |
| Automated checks and test support | 55 | 3,099 |
| Total | 72 | 6,845 |
|---|
These are actual physical lines, including comments and blank lines, rather than an estimate of statements or developer effort. Excluding blank lines gives 6,770. Many functions and coordinate arrays occupy a single long line: the vector-data file alone contains about 16 KB despite having only 12 lines. The HTML count includes the manual. Dependencies, lockfiles, JSON test fixtures, prose documents, research files and the generated standalone download are excluded, avoiding duplicate counts. The schema's executable SQL migration is included. This fixed snapshot predates the architecture text you are reading; it is separate from the earlier conversation and token statistics below.
Compared with the 1980 machine
The original Battlezone used a 6502 processor for game logic, a separate math box for arithmetic, and an Analog Vector Generator to drive the display. Its memory budget was measured in kilobytes. Here, KiB means 1,024 bytes and MiB means 1,048,576 bytes.
- Main working RAM
- 1 KiB at $0000–$03FF, including zero-page variables and the stack
- Vector working RAM
- 4 KiB at $2000–$2FFF, used for drawing commands
- Program ROM
- 12 KiB at $5000–$7FFF
- Vector/data ROM
- 4 KiB at $3000–$3FFF
That is 5 KiB in the listed RAM areas and 16 KiB of program/vector ROM. Separate vector-control and math-box PROMs also existed; those are outside the 16 KiB figure. ROM stored instructions and fixed data; RAM held changing state. These figures come from MAME's Battlezone memory map and ROM definitions. A 32 KiB emulator address region is not 32 KiB of populated game ROM.
The vector display needed a compact list of beam movements rather than a full pixel image. Its 4 KiB vector RAM was split into two 2 KiB command buffers, allowing one list to be displayed while the next was prepared. The math box helped transform coordinates. That division of labor is part of how such a small machine produced a convincing 3D world. See the annotated hardware and rendering explanation.
Memory in this browser version
In the same measured Battlezones revision, the six browser files—four JavaScript scripts, HTML and CSS—total 430,771 bytes, about 420.7 KiB, as uncompressed UTF-8 text with normalized line endings. That is about 26.3 times the original's 16 KiB program/vector ROM size. It is a comparison of distributed text with assembled binary storage, not a RAM ratio or an efficiency score. Compression can reduce transfer size; the expanded adventure, device controls and manual are included here, while the browser and operating system are not.
Runtime memory is a different quantity. The browser holds parsed or compiled JavaScript, objects for roads and enemies, visibility caches, the document, audio buffers and drawing surfaces. A conventional 32-bit pixel surface at 1024 × 768 needs 3 MiB; at device-pixel ratio 2, the 2048 × 1536 surface needs 12 MiB. These are calculated examples for one uncompressed surface, not measurements of the entire browser. Browser composition can use additional surfaces.
Audio has its own allocation. The current sound code creates three two-second mono noise buffers. At a 48 kHz sample rate and four bytes per sample, those alone contain 1,152,000 bytes, about 1.10 MiB of sample data, before the motor, lift buffers and audio graph. The sample rate depends on the device. Unlike the original's dedicated sound circuitry, these waveforms are stored and processed by Web Audio.
There is deliberately no single claimed “RAM used by Battlezones” number: it would need a dated measurement on a named browser, device, resolution and scene, and a clear decision about whether GPU and audio memory are included. Source-file bytes, JavaScript heap and total browser-process memory measure different things. The useful contrast is the original's tightly budgeted hardware versus this version's use of a general-purpose browser to recreate and extend its visual language.
How the original source compares
The preserved source text was counted rather than estimating from ROM size. At archive revision 38d0b07, the original build command file names these five main linked sources:
Preserved main source files| File and role | Lines |
| BZONE.MAC — core game program | 4,947 |
| BZMTNS.MAC — scenery and vector data | 848 |
| BZSOUN.MAC — sound control | 350 |
| VGUT.MAC — vector utilities | 385 |
| BZSTST.MAC — startup and self-test | 649 |
| Five-file subtotal | 7,179 |
|---|
Counting all eleven preserved .MAC files plus the math-box microcode file MBUCOD.V05 gives 9,207 physical lines, or 8,944 nonblank lines. That broader archive count includes shared coin routines, diagnostics, vector macros and separate hardware code. It is not the size of one assembled game program. Counts include comments and directives, normalize line endings, and remove trailing NUL padding left in the archived files.
Some referenced includes—TC65, ASCVG, VGAN and COND65—are absent from this archive, so neither figure claims to count every source line used at Atari. The preserved files make the scope inspectable.
For context, this version's game.js has 3,192 physical lines, and its full measured source/configuration has 3,746, plus 3,099 of tests and test support. That does not mean it does more work with fewer instructions: assembly usually expresses small operations separately, macros expand into more code, and this JavaScript often packs many operations onto one line. It also relies on substantial browser, graphics and audio implementations outside the repository. The comparison shows two very different engineering environments, not a productivity contest.
How the pieces fit together
The browser loads the vector data, audio class and leaderboard client before starting game.js. The main game is one substantial, self-contained JavaScript script. Plain objects hold the player, enemies and projectiles; arrays hold geometry and effects. Functions share that state inside a private function scope. This is a small custom engine, without a game framework, component system or 3D graphics library.
- Keyboard, touch or controller input becomes left-track, right-track and fire commands.
- A fixed-step simulation moves actors, checks collisions and hits, and advances encounters.
- The renderer selects visible geometry, projects it into screen coordinates and draws straight vectors on Canvas.
- Gameplay events trigger synthesized Web Audio; completed scores go to a separate HTTP service.
A guide to the main functions
Time and state. frame() runs through the browser's requestAnimationFrame callback. It accumulates elapsed time and advances update() in 64-millisecond steps: 15.625 simulation updates per second. Drawing runs separately; render(alpha) interpolates the mountain camera and selected animations between updates. Faster screens therefore do not make the tank drive faster. Title, playing, paused and game-over states determine which systems advance.
Controls and movement. pollController() reads sticks and buttons; syncTouchKeys() and the touch handlers maintain finger input. movePlayer() combines the selected controls into the two track commands. tankStep() calculates movement using the arcade-style angle and sine rules. Collision checks decide whether that proposed movement is accepted. Pausing and losing input focus clear held controls.
The world and its transitions. buildWorld() creates obstacle and terrain geometry. ground(), roadHeightAt() and nearest() query elevation and road position. The mountain entrance, interiors, lifts and moving craft use explicit state and coordinate transforms. Functions such as updateFacility(), updateNaval() and updateLandingRide() advance the relevant area. Their progress and surviving actors can persist when the player leaves and returns.
Classic rules and new encounters. classicField() selects the original-field behavior, including the beginning of Mountain mode. updateClassic() and functions such as classicTank() preserve the source-informed rules. Mountain encounters have their own timers, patrol budgets and state. For example, updateTunnelAmbush() coordinates four climbers, while updateCoastTransport() moves a helicopter and its attached cargo through approach, lowering and departure. These enemies use programmed rules, not generative AI.
Hits and physical cover. solid() routes collision questions to obstacles and the current area's walls. classicProjectiles() and mountainProjectiles() advance shells and resolve hits using their respective rules. The mountain version checks terrain and structures as well as enemy geometry. updateClimberFeet() places feet on the surface, while climberLeg() constrains the articulated legs. Visual visibility and physical collision are related but separate checks, so both need testing.
Drawing and hidden lines. cam() converts a world point into camera coordinates, clipCameraLine() clips a segment before perspective division, and project() maps it onto the screen. Visibility routines such as terrainRayVisible() and navalLineClear() test intervening terrain or walls. Area renderers combine those checks with black polygon masks and depth-aware line clipping so distant objects do not show through solid cover. distanceLight() dims distant objects. The HUD and vector lettering are drawn over the playfield.
Sound synthesis. The ArcadeSound class is exposed to the game as BZSound. noiseBuffer() generates noise, sequence() schedules stepped tones, and methods such as shot(), explode() and lift() shape individual effects. Oscillators, buffers, filters and gain controls produce the sound locally. This models the intended arcade character; it does not emulate every circuit cycle.
Shared scores. BZLeaderboard.create() supplies begin(), refresh(), submit() and flush(). The client keeps cached tables and pending uploads in browser storage. The server's fetch() handler accepts a run, validates a result and returns a top-ten table; leaderboard(), rateLimit() and prune() query and maintain the SQL database. Repeated submission of the same result is safe. This server does not simulate the game, and its plausibility checks cannot make browser-reported scores cheat-proof.
Engineering tradeoffs
Keeping the simulation on the device gives immediate controls and lets a static host serve the game. It also means the browser receives the client source. The large shared game script made rapid experimentation straightforward, but geometry, gameplay and drawing are closely connected; a change can affect several systems. Automated replays and focused scene checks help catch regressions. Splitting the engine into smaller modules would make later maintenance easier, while retaining those behavior checks.
From a revision to a playable website
Git records revisions; GitHub stores the repository. A push to main triggers GitHub Actions to build and publish dist/, and GitHub Pages serves the static game at battlezones.org. The current deployment workflow runs the build, but not the regression test suite; tests are run separately before publication. The build versions JavaScript and CSS links so browsers load matching assets, and also produces a self-contained HTML download in outputs/ that is not part of the Pages deployment. Shared high scores use a separate web API with JavaScript service code, TypeScript database definitions and a Cloudflare D1 database hosted through Sites. That service saves scores; the tank simulation runs on your device.
Development by the numbers
A dated snapshot through September 19, 2026, 06:48 PDT, before this making-of section was added:
- Recorded conversation
- 1 main Codex thread
- User messages
- 133 requests and follow-ups
- Completed work cycles
- 98 assistant tasks
- Elapsed conversation time
- 9.4 days, starting September 9
- Recorded task duration
- 42.6 hours
- Model responses
- 3,156
- Total token usage
- 443.7 million
- Input tokens
- 441.6 million, including 421.2 million cached
- Output tokens
- 2.09 million, including reasoning
- Repository history
- 55 commits
- Regression test scripts
- 50
A token is a small unit a model uses to process text and code; it is not a line of code. Long development sessions repeatedly supply conversation history, source and tool results. About 95% of the input here was cached input, meaning previously processed material was reused. The total is cumulative processing across model responses, not 443.7 million newly written tokens. Reasoning is already included in output, not added again.
The message count includes short follow-ups, and a work cycle can include several messages and many model responses. Task duration includes command, test and tool waits, plus one interrupted task; it is not Peter's working time. These are aggregates from the main Codex record and the repository at revision a488ed9, not an all-tools total or a billing estimate. Other conversations, separate agents, Claude Code usage and this documentation task are excluded. The test count describes the suite's size, not a claim that every test passes. Only aggregate statistics are published here.
This source-informed reconstruction uses the preserved vector shapes, scenery, reticles, lettering, and obstacle layout. Movement and enemy rules follow the original implementation; audio is synthesized from the documented hardware and control sequences. It is not a cycle-accurate emulator. The mountain terrain, ridge cut, checkpoints, Mountain Walker, tunnel and underground facility are new.