╔══════════════════════════════════════════╗
║ L I N E O F F I R E ║
╠══════════════════════════════════════════╣
║ THE IRON COMPACT · THE FREE BATTALIONS║
╚══════════════════════════════════════════╝
Artillery Tactics Wargame · Common Lisp
A turn-based artillery wargame that runs entirely in your terminal. Command a battery of guns across five terrain types, fight an 8-mission campaign, and master seven shell types — all rendered in ANSI colour with a full physics simulation.
Ballistics simulation Every shell follows a real trajectory. Gravity, wind, and barrel elevation interact to produce the actual impact point. No random hit-rolls — you aim, and physics decides.
Seven shell types
| Shell | Role |
|---|---|
| High Explosive | Balanced workhorse. Reliable, wide radius. |
| Armor Piercing | High damage, tight radius. Punches through earthworks. |
| Smoke Screen | Area denial. Obscures sightlines for 3 turns. |
| Cluster Bomb | Splits into 3 sub-munitions on impact. Unpredictable spread. |
| Napalm | Incendiary. Burns terrain for 3 turns, -5 HP per turn. |
| Bunker Buster | Delayed-fuse penetrator. Bypasses shield bonuses. |
| Mortar | High arc. Clears hills and peaks that block flat trajectories. |
Five terrain types Plains, Hills, Mountains, Valley, and Fortress — each with distinct height profiles that affect firing solutions, smoke pooling, and AI behaviour.
Four weather conditions Clear, Rain, Fog, and Storm — each modifying wind variance, visibility, and what achievements are unlockable.
Two factions
| Faction | Bonus | Specialty |
|---|---|---|
| The Iron Compact | +10 HP per gun | AP + Bunker Buster shells |
| The Free Battalions | +3 ammo per gun | Napalm + Cluster shells |
Campaign mode Eight linked missions with escalating difficulty, enemy count, and terrain. From the Border Skirmish on open plains to the Final Stand at Fortress Kragenmoor.
Skirmish mode Single battle with fully configurable difficulty, terrain, faction, and fog of war. Replay-friendly. Scores are recorded to a persistent leaderboard.
Gun progression Guns earn kills and rank up: Recruit → Veteran → Elite. Elite guns deal 20% bonus damage. A promoted crew is worth protecting.
22 achievements First Blood, Dead Eye, Iron Will, Untouchable, Scorched Earth, Storm Proof, Fog Walker, Flawless Campaign, and more. Persistent across sessions.
Full options menu Difficulty (Easy / Normal / Hard / Brutal), terrain selector with live ASCII preview, faction chooser with lore, and fog-of-war toggle.
- SBCL (Steel Bank Common Lisp) — primary target
- CCL (Clozure Common Lisp) or CLISP also supported
- A terminal with ANSI colour support (any modern terminal on Linux, macOS, or Windows 10+)
- No external libraries — single
.lispfile, zero dependencies
sbcl --script line-of-fire.lispsbcl --script line-of-fire.lisp
Windows Terminal or any ANSI-capable terminal is recommended.
ccl --load line-of-fire.lispsbcl --eval '(compile-file "line-of-fire.lisp")' --quit
sbcl --script line-of-fire.faslSaves are stored in a saves/ folder next to the game file, created automatically
on first launch. A rolling backup (lof.sav.bak) is kept before every save.
line-of-fire.lisp
saves/
lof.sav ← current save
lof.sav.bak ← previous save (auto-backup)
The save file is plain text and human-readable. Campaign progress, scores, pstats, and all 22 achievements are persisted between sessions.
All input is a single keystroke followed by Enter, or just Enter on a highlighted option.
| Key | Action |
|---|---|
1 |
Skirmish battle |
2 |
Campaign |
3 |
Hall of Fame (scores) |
4 |
Codex & Lore |
5 |
Faction select |
6 |
Shell & Biome lore |
7 |
Options |
8 |
Quit |
| Command | Action |
|---|---|
fire <gun> <angle> <power> |
Fire a shell (e.g. fire iron 45 80) |
shell <gun> <type> |
Change shell type (e.g. shell iron ap) |
reload <gun> |
Reload a gun (+3 ammo, costs 1 turn) |
repair <gun> |
Repair a gun (+20 HP, costs 1 turn) |
shield <gun> |
Shield a gun (absorbs next hit, 1-use) |
barrage |
Call an artillery barrage (radio cooldown) |
intel |
Request enemy position intelligence |
smoke <gun> <angle> <power> |
Fire a smoke shell |
skip |
Skip the rest of your turn |
status |
Show full gun status |
quit |
Abandon the current battle |
he · ap · smoke · cluster · napalm · bunker · mortar
| File | Description |
|---|---|
line-of-fire.lisp |
The game — complete, single-file, no dependencies |
README.md |
This file |
build.bat |
build the game for windows |
build.sh |
build the game for linux |
saves/ |
Created at runtime; holds save file and backup |
Forged in the furnaces of Kragenmoor, the Iron Compact rose from a coalition of industrial city-states that unified under the Banner of the Anvil after the Collapse of the Third Diet. Their artillery doctrine favours armour-piercing precision and fortification breaching. IRON ENDURES.
Descended from the guerrilla fighters who held the Ashfen Passes for seven winters, the Free Battalions are a loose confederacy of volunteer regiments loyal to no single lord. They favour area-denial and fire-suppression tactics. THE LAND REMEMBERS.
Built in Common Lisp. Physics, terrain generation, AI, rendering, and UI are all hand-written with no external dependencies. The game runs in approximately 2,400 lines of source.
The ballistics model uses real projectile motion:
position updated with Δx = v·cos(θ)·Δt and Δy = v·sin(θ)·Δt − ½g·Δt²,
wind applied as a lateral drift on each physics step.
"This hill has a name. I forget what."