Real-time tank battle with a native arena, autonomous enemies and a Godot physics backend
  • Emacs Lisp 55.1%
  • GDScript 27.7%
  • Python 16.7%
  • Makefile 0.5%
Find a file
Kinneyzhang c93601556e
Some checks failed
Repository structure / structure (push) Has been cancelled
fix(tanks): report the configured Godot runtime
The capability check looked for a directory the engine setup never creates
($XDG_CACHE_HOME/emacs-taf/game-engines/godot), so an installed Godot always
showed as "Godot runtime missing" in the installer's Runtime column, whatever
configuration was in use, and the remedy named a make target that an archive
installation cannot run.

Resolve the runtime through etaf-gamekit-godot-program, the program a battle
actually launches, and name M-x etaf-gamekit-install-godot as the remedy. The
package now requires GameKit 0.2.0, which provides that command.

Validation: make check passes (structure, native script check, byte
compilation, 18 of 18 acceptance scenarios, 16 API declarations). The new
doctor scenario covers both a configured executable and a missing one.
2026-10-27 10:34:20 +08:00
.githooks feat(tanks): add a real-time Godot battlefield 2026-10-11 18:09:09 +08:00
.github/workflows chore(scripts): sync shared workspace tooling 2026-10-19 12:49:37 +08:00
benchmarks test(tanks): wait for a standing base before measuring battle input 2026-10-12 15:17:40 +08:00
docs fix(tanks): report the configured Godot runtime 2026-10-27 10:34:20 +08:00
examples docs(tanks): document installation, controls and screenshots 2026-10-13 00:35:23 +08:00
lisp feat(editor): draw while an arrow is held 2026-10-25 12:35:10 +08:00
native/godot refactor(tanks): publish the battlefield through GameKit 2026-10-13 22:32:41 +08:00
scripts feat(editor): draw while an arrow is held 2026-10-25 12:35:10 +08:00
tests fix(tanks): report the configured Godot runtime 2026-10-27 10:34:20 +08:00
.editorconfig feat(tanks): add a real-time Godot battlefield 2026-10-11 18:09:09 +08:00
.gitignore feat(tanks): add a real-time Godot battlefield 2026-10-11 18:09:09 +08:00
CHANGELOG.md fix(tanks): report the configured Godot runtime 2026-10-27 10:34:20 +08:00
etaf-tanks.el fix(tanks): report the configured Godot runtime 2026-10-27 10:34:20 +08:00
LICENSE feat(tanks): add a real-time Godot battlefield 2026-10-11 18:09:09 +08:00
Makefile feat(tanks)!: rebuild Iron Tide as a Battle City style campaign 2026-10-12 13:02:20 +08:00
README.md fix(tanks): report the configured Godot runtime 2026-10-27 10:34:20 +08:00

坦克大战

A tank battle in Emacs that follows the rules of the 1985 arcade classic: defend the eagle base at the bottom of the field, destroy every enemy tank of the stage, and lose when the base falls or your last tank is gone. Twenty original 40×30 stages raise the difficulty step by step; basic, fast, power and four-hit armored enemies arrive in waves, and flashing carriers drop helmet, clock, shovel, star, grenade and extra-tank bonuses.

A headless Godot world owns the rules, the fixed simulation clock and the renderer; this application owns the stage select, the battle panel, the editor, the settings and the launcher. It is an independent GameKit application. All artwork and stages are original.

The stage select in the light palette

A battle in the dark palette

Capabilities

  • The complete campaign loop: staged enemies with different speed, power and armour, bonus carriers, a defendable base, lives, scores and cleared-stage progress.
  • Godot draws flat vector art with soft lighting in light and dark palettes at the screen's own resolution; text displays get an equivalent character grid.
  • A map editor that creates, paints and test-plays custom 40×30 stages, and stage import from map files.
  • Settings that apply immediately: game and tank speed, key sensitivity, driving mode, frame rate and, on graphic displays, board size.
  • Snapshots through C-s and C-o; a battle pauses when its buffer stops being the selected window's buffer or focus leaves an embedded game. Reentering preserves the battle and leaves it paused.

Prerequisites

Requirement Why Check
Emacs 29.1 or newer the ETAF runtime emacs --version
ecss, ebox, etaf, etaf-ui the framework and catalog components every root entry is on load-path
etaf-gamekit and its Godot runtime simulation host, game instance and state publication M-x etaf-gamekit-install-godot
Python 3.9 or newer GameKit's Godot setup script python3 --version

Installation

git clone https://github.com/emacs-taf/ecss.git
git clone https://github.com/emacs-taf/ebox.git
git clone https://github.com/emacs-taf/etaf.git
git clone https://github.com/emacs-taf/etaf-ui.git
git clone https://github.com/emacs-taf/etaf-gamekit.git
git clone https://github.com/emacs-taf/etaf-tanks.git
make -C etaf-gamekit engine

Installed from the ETAF package archive, M-x etaf-gamekit-install-godot installs the same pinned runtime; make -C etaf-gamekit engine is the checkout equivalent.

Add every provider root and this repository to load-path:

(add-to-list 'load-path "/path/to/ecss")
(add-to-list 'load-path "/path/to/ebox")
(add-to-list 'load-path "/path/to/etaf")
(add-to-list 'load-path "/path/to/etaf-ui")
(add-to-list 'load-path "/path/to/etaf-gamekit")
(add-to-list 'load-path "/path/to/etaf-tanks")
(require 'etaf-tanks)

(global-set-key (kbd "C-c t") #'etaf-tanks-open)

M-x etaf-tanks-open shows the stage select; choose a stage with the arrow keys and press Return or G. Every key also has a button.

Keys

Screen Key Action
Menu Arrows, Return, G Choose a stage; start it
Menu E, N, D Edit the selected map, create a new map, cycle difficulty
Battle Arrow keys Drive
Battle Shift+arrow Turn in place
Battle F, X Fire; stop driving
Battle P, R, N, M Pause or resume, retry, next stage, return
Battle C-s, C-o Save or load a snapshot through a file prompt
Editor Arrows, 1–9 Move the cursor; choose a brush
Editor F, D, B, U Paint, toggle continuous painting, brush size, undo
Editor P, C-s, M Test-play, save the map, return to the menu
Any S, T, ? / F1, Q Settings, light/dark palette, rules and keys, close

?, F1 and 说明 open the same searchable help modal inside the game buffer, without splitting an Emacs window. Its keys follow the current screen; rules remain available as usage notes. Escape leaves search editing first, then closes help; clicking outside closes it too and restores the opening focus.

Help, settings and file prompts pause a running battle first, and dismissing them does not resume it. Retrying or leaving a running battle asks for confirmation.

Checks

make check   # structure, compilation, API and real Godot behavior scenarios

scripts/etaf-tanks-gui-scenarios.el drives the application in a dedicated graphical frame; the manual describes the GUI and performance acceptance surfaces, including why background results do not certify foreground input latency.

Documentation

  • 坦克大战 manual — rules, keys, settings, map format, editor, snapshots and display.
  • Package entry — the supported API inventory.
  • GameKit — the shared game framework, its adapters and backend installation.

License

GPL-3.0-or-later; see LICENSE.