IBM i RPG Number Munchers demo (rpg-munchers) — ibmi-rpg pipeline + greenscreen behavior test
  • Shell 50.6%
  • RPGLE 49.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-03 20:15:51 +00:00
.vscode chore: scaffold rpg-munchers — ibmi-rpg pipeline project (build tooling + docs) 2026-07-01 11:14:55 +02:00
docs chore: scaffold rpg-munchers — ibmi-rpg pipeline project (build tooling + docs) 2026-07-01 11:14:55 +02:00
QDDSSRC feat: Number Munchers game + greenscreen reels (v0.1.0) 2026-07-01 11:14:55 +02:00
QRPGLESRC feat: Number Munchers game + greenscreen reels (v0.1.0) 2026-07-01 11:14:55 +02:00
scripts feat: environment libraries — LIB-targeted compile (CHGCURLIB in-job) + objects.env manifest 2026-07-03 21:30:12 +02:00
.gitignore chore: scaffold rpg-munchers — ibmi-rpg pipeline project (build tooling + docs) 2026-07-01 11:14:55 +02:00
CHANGELOG.md release: v0.1.2 (auto-cadence) 2026-07-03 20:15:50 +00:00
extract.sh docs(extract): fix MBRGLOB scope example (LEM* -> MUNCH*) 2026-07-01 14:56:49 +02:00
README.md chore: scaffold rpg-munchers — ibmi-rpg pipeline project (build tooling + docs) 2026-07-01 11:14:55 +02:00
test-1-munch-a-multiple.sh feat: environment libraries — LIB-targeted compile (CHGCURLIB in-job) + objects.env manifest 2026-07-03 21:30:12 +02:00
test-2-troggle-chase.sh feat: environment libraries — LIB-targeted compile (CHGCURLIB in-job) + objects.env manifest 2026-07-03 21:30:12 +02:00
test-3-clear-the-level.sh feat: environment libraries — LIB-targeted compile (CHGCURLIB in-job) + objects.env manifest 2026-07-03 21:30:12 +02:00
VERSION release: v0.1.2 (auto-cadence) 2026-07-03 20:15:50 +00:00

rpg-munchers

A playable Number Munchers for the IBM i green screen — the classic MECC edutainment game, reimplemented in RPG + DDS and driven over the 5250 by the zelnet client. It is a "crowd-pleaser" showcase for the ibmi-rpg pipeline: compile on a real IBM i (pub400) over zelnet's Host Server client, and test the greenscreen game headless via zelnet --play.

Why Number Munchers? It is a grid game, and the 5250 cursor makes a perfect Muncher — you roam a 6×5 grid of numbers with the arrow keys and press Enter to munch the cell under the cursor. It exercises two zelnet features added for it (v0.9.4): free-roaming cursor movement (arrows + the csr / up/down/left/right --play verbs) and reverse-image background colors (the green Muncher tile, the red Troggle tiles).

How it plays

  • A 6×5 grid of numbers. Each level names a rule — MULTIPLE OF n (n grows with the level).
  • The Muncher is the cursor: arrows move it a cell at a time; Enter munches the number under it. Munch every multiple to clear the level (+50 bonus); a wrong number costs a life.
  • Troggles chase the Muncher one cell per turn — a catch costs a life and respawns you.
  • Three lives. Clear levels for score; the rating at GAME OVER depends on your score.

What it is

  • Greenscreen: QDDSSRC/MUNCHD.dspf — one GRID record: header/score/lives/level, 30 named cells C01..C30, plus RTNCSRLOC(&CSRREC &CSRFLD) (reports the landed cell) and CSRLOC(SETR SETC) (parks the cursor on the Muncher). Per-cell reverse-image is conditioned by option indicators (30+cell = Troggle red, 60+cell = Muncher green). An ENDGAME record.
  • Program: QRPGLESRC/MUNCHERS.rpgle — the turn loop, the grid/Troggle model, and a seedable CEERAN0 RNG. PARM('DEMO ') builds a FIXED level-1 grid so the reels are deterministic.

Build / test / play

  • bash scripts/deploy.sh — compile the DSPF -> RPG DAG on pub400 (warnings-as-errors).
  • bash test-1-munch-a-multiple.sh / test-2-troggle-chase.sh / test-3-clear-the-level.sh — drive the seeded demo grid headless via zelnet --play; each --records a greenscreen reel.
  • bash extract.sh — pull the source members back off the box into Git (the import round-trip).

Play it interactively: zelnet term pub400.com -> CALL SOMEARA1/MUNCHERS (F3 quits).

The IBM i objects stay on the box; the release is a provenance tag. See docs/pub400.md.