What it does
The road is a road-data file of territories, each road or river, laid as you drive. Carriageways drift sideways,
narrow and widen, split around medians and islands, and fork into new territories decided by which half of the road
the car is on, never into a dead end. Boathouse links switch the car to a boat and back, a broken bridge forces the
detour, and markers in the file place the weapons van, banners and checkpoints. Changing the road means editing or
drawing a road file, not code.
Every vehicle, the car, the boat and every AI car and boat, is a vehicle-handling vehicle, with gears, grip that
changes on ice and puddles, and knock-back when rammed. Enemy kinds are data with an AI behaviour: traffic, rammers,
blade cars that slash tyres, shooters that lean out and fire volleys, helicopter bombers that leave craters, barrel
dumpers and torpedo boats. Each kind has armour against particular weapons, so a bullet-proof car must be rammed off the
road or stopped with another weapon. Killing civilians stops the score for a few seconds.
Weapons are forward guns and cannon, rear oil slicks, smoke screens, mines and flame, and anti-air missiles, each with a supply in uses or seconds. A weapons van overtakes you when called, takes the car aboard and issues its cargo. The game runs on either an opening timer with unlimited cars, then cars awarded by score, or a checkpoint timer that ends the game when it runs out. Distance points by medium and surface, extra cars, encounter tables with a ramp per territory, a punishment for dawdling and a day-night cycle complete it.
Features
- A forking road and river — territories that shift, narrow, widen and split, forks chosen by the car's side, boathouses and broken bridges, all from a road file.
- Real handling — car, boat and AI vehicles on the vehicle-handling model, with gears, ice, puddles and knock-back.
- Enemy behaviours — traffic, rammers, slashers, shooters, bombers, barrel dumpers and torpedo boats, each with armour per weapon.
- Civilians — traffic that must be spared, with a no-points penalty for a kill and an optional cancelled van.
- Weapons and supplies — guns, cannon, oil, smoke, mines, flame and missiles, with a river swap for the boat.
- A weapons van — cargo, a pick rule, vans per territory, wait and ride times and alignment tolerance.
- Two timer modes — a lead-in timer with unlimited cars, or a checkpoint timer that adds time at each marker.
- Encounters and difficulty — tables per territory with spacing, first distance, caps and a ramp, scaled by population, aggression and Easy, Normal or Arcade handling assist.
- Scoring and lives — distance points by medium and surface, boathouse bonuses, extra cars and repeats.
- Dawdling and daylight — kinds that come for a car that slows or rides the shoulder, and a day-night cycle by distance.
- Deterministic — fixed 1/60 second steps from a seed, with snapshot and restore.
Good for
- Spy driving shooters in the style of the 1983 arcade Spy Hunter, with its territories, river, weapons van and enemy cars.
- Convoy escorts, with slow civilian trucks, a heavy penalty for losing them and a supply truck with mines.
- Desert patrols, a checkpoint-timed run with lives, drones and anti-air missiles.
- River runs and chases, switching between car and boat at boathouses.
- Any top-down drive-and-fight game whose road changes under you.
Make it yours
Every field of the config is data. The road file sets territories, regions and their palettes, surfaces, forks, boathouses, broken bridges and markers. The car, boat and AI vehicles take handling specs, and surfaces map to handling per medium. Kinds set role, medium, size, mass, speed range, armour, hit points, score, entry side and AI. Weapons set their slot, supply, rate, speed, range, homing, pierce and patch size. Encounters, the van, the timer, lives, scoring, the dawdling rule, the day-night cycle and the difficulty scales are all settings.
The two presets are materially different games. spyHunterPreset has five territories and a river, a 999 timer with
unlimited cars at first, a van of oil, smoke and missiles twice per territory, and a choice of a 60 or 90 second timer.
desertPatrolPreset is original: a three-lane highway, a canyon and a salt flat with no river, a checkpoint timer and
lives, an automatic car with brakes, a gun, cannon, mines and missiles, raider bikes, haulers, gunner jeeps and drones,
and a day-night cycle.
A quick look
A session from the preset, stepped with input and drawn each frame:
const g = game.roadCombat.createRoadCombat(game.roadCombat.spyHunterPreset({ difficulty: 'normal', timer: 90 }), seed);
g.start();
game.step('play', dt => {
g.tick(dt, { steer, throttle, brake, gear: lever, fire: { guns, oil, smoke, missiles }, callVan });
for (const e of g.drain()) effects(e); // kill, crash, van-enter, boathouse, banner, timer-end, ...
draw(g.state, g.shots, g.road, g.night); // the view draws g.road; sprites for state.actors ...
});
Works with
road-data— the road files the territories come from.vehicle-handling— every car and boat.road-view-topdown— draws the road from the session's ready road source.route,projectile-patternsandactors— encounters by distance, bullets and missiles, and the helicopter's tracking.track-racer— for lap racing instead.road-racerandroad-assault— for racing and fighting on a behind-the-car pseudo-3D road.
Good to know
- Collision is boxes in the road plane; a vehicle's rotation is visual only.
- AI vehicles steer toward simple targets and do not path-find round hazards.
- The only air units are helicopter bombers, and only missiles reach them.
- No disassembly of the original is public, so the preset's speeds, AI timings, spacing and supplies are estimates.






