Skip to content

RootOfCode/Line-of-Fire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LINE OF FIRE

Artillery Tactics Wargame · Common Lisp

╔══════════════════════════════════════════╗
║  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.


Features

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.


Requirements

  • 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 .lisp file, zero dependencies

Running the game

Linux / macOS

sbcl --script line-of-fire.lisp

Windows (PowerShell or cmd)

sbcl --script line-of-fire.lisp

Windows Terminal or any ANSI-capable terminal is recommended.

CCL

ccl --load line-of-fire.lisp

Compile for faster startup (optional)

sbcl --eval '(compile-file "line-of-fire.lisp")' --quit
sbcl --script line-of-fire.fasl

Save files

Saves 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.


Controls

All input is a single keystroke followed by Enter, or just Enter on a highlighted option.

Main menu

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

In battle

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

Shell abbreviations

he · ap · smoke · cluster · napalm · bunker · mortar


Repository files

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

Lore

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.


Acknowledgements

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."

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages