No description
  • Emacs Lisp 78.5%
  • Python 20.9%
  • Makefile 0.5%
Find a file
Kinneyzhang 7295635e89
Some checks failed
Repository structure / structure (push) Has been cancelled
fix: keep Super Mario's stage, labels and dialogs correct
The castle and new art used double-width glyphs in the user's font, so a
130-cell row occupied twice the canvas and the right half of the stage,
including lava and coins, was clipped.  Use one-cell stone, coin, item and
cloud glyphs, add the missing goomba and shell shades, keep ink dark in every
theme, and make the sprite doctor reject a character without a foreground.

Publish the stage and best labels through reactive cells so a level switch and
a new record repaint the HUD and footer, give the coin pop its own transient
state, and release direction keys from dialogs so their own focus navigation
works, including the segmented frame-rate control.  Keep the help usage inside
its panel.

Add scripts/etaf-mario-gui-scenarios.el: it drives the documented keys from
the title through blocks, the mushroom, a goomba, dialogs, both palettes,
level select, the resize matrix, the castle lava and a pit death, and captures
window evidence for visual review.

Validation: make check (13/13 headless, structure, compilation and API);
etaf-mario-gui-run passed 25/25 twice in a dedicated 132x44 frame.
2026-10-22 21:26:42 +08:00
.githooks feat: add the Super Mario text platformer 2026-10-22 01:43:40 +08:00
.github/workflows feat: add the Super Mario text platformer 2026-10-22 01:43:40 +08:00
docs fix: keep Super Mario's stage, labels and dialogs correct 2026-10-22 21:26:42 +08:00
lisp fix: keep Super Mario's stage, labels and dialogs correct 2026-10-22 21:26:42 +08:00
scripts fix: keep Super Mario's stage, labels and dialogs correct 2026-10-22 21:26:42 +08:00
tests fix: keep Super Mario's stage, labels and dialogs correct 2026-10-22 21:26:42 +08:00
.editorconfig feat: add the Super Mario text platformer 2026-10-22 01:43:40 +08:00
.gitignore feat: add the Super Mario text platformer 2026-10-22 01:43:40 +08:00
etaf-mario.el feat: add the Super Mario text platformer 2026-10-22 01:43:40 +08:00
LICENSE feat: add the Super Mario text platformer 2026-10-22 01:43:40 +08:00
Makefile fix: keep Super Mario's stage, labels and dialogs correct 2026-10-22 21:26:42 +08:00
README.md feat: add the Super Mario text platformer 2026-10-22 01:43:40 +08:00

超级马里奥 · Super Mario in Emacs text

A side-scrolling platformer drawn entirely with ordinary Emacs characters and faces. Every brick, question block, pipe, coin, enemy and Mario is a small character picture composed by hand; nothing paints a scene background, so the buffer's own theme background shows through. The world runs on a deterministic 60 Hz simulation, which makes the game reproducible in a headless test as well as in a graphical Emacs.

Capabilities

  • Four original stages: a daylit plain, an underground corridor, a sky of floating platforms and a castle over lava. Each owns its map, enemy spawns, time limit and palette.
  • Walking, running, held jumps, coyote time and jump buffering; block bumps release coins, mushrooms, fire flowers and stars.
  • Goombas squash, koopas turn into kickable shells, fireballs and stomps work, and lava, pits and the level clock each end a life.
  • Character-grid art: one world block is four characters wide and two text rows tall, bottom aligned. Adjacent blocks join into one border, and the two halves of a pipe form one rim without a seam.
  • A camera that scrolls in single character cells and keeps the player a third of the way in; actors keep their offset inside their block, so walking does not jump a whole block at a time.
  • A HUD with score, coins, world, time, power badge and lives, plus title, pause, settings, level-select and result dialogs.
  • Best score and unlocked stages persist between sessions.

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

No external game engine, database or network service is used.

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-mario.git

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-mario")
(require 'etaf-mario)

(global-set-key (kbd "C-c m") #'etaf-mario-open)

M-x etaf-mario-open opens the game on a title screen over a paused stage; the optional prefix argument is a zero-based stage index.

Keys

Input Action
← / → Walk; hold with X to run
Z Jump; hold for a higher jump
X Run, or throw a fireball once Mario has the fire flower
↓ Duck as big Mario
P Pause or resume
R Restart the current stage
S Settings (frame rate, jump feel, light or dark palette)
T Switch the light and dark palette
F1 / ? Searchable help with the effective keys
Q Quit

Configuration

Variable Meaning
etaf-mario-appearance Initial palette: auto (follow the frame), light or dark
etaf-mario-frame-rate Canvas refresh rate for new games: 30 (default) or 60
etaf-mario-jump-feel Jump height for new games: normal, high or low
etaf-mario-progress-file File remembering the best score and unlocked stages

Checks

make check   # structure, compilation, API and headless behavior scenarios

The headless scenarios drive the deterministic world, parse every bundled level, and assert the rendered characters row by row; they do not compare screenshots. The real GUI acceptance recipe is in docs/architecture.md.

Documentation

  • Architecture — responsibilities, data flow, invariants and GUI acceptance.
  • Package entry — the supported API inventory.

License

GPL-3.0-or-later; see LICENSE.