Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.
C calculatorcalculator-gamescasiochesscrossy-roaddrive-madfx-cg50gamesgeometry-dashgraphing-calculatorndlessnumworksnumworks-appsnumworks-calculatornumworks-gamenumworks-gamestetristi-84-plus-ceti-nspire
Release page in order: NumPlay first, a label on every file
Mason363e555617f95b0
diff --git a/.github/release.md b/.github/release.mdindex 3443c46f..fe88d138 100644--- a/.github/release.md+++ b/.github/release.md@@ -1,25 +1 @@-**New here?** Download `NumPlay.nwa`, then follow the [2-minute install guide](https://github.com/Mason363/NumPlay#how-to-install). [How to play](https://github.com/Mason363/NumPlay/blob/main/docs/play.md)--| File | |-| --- | --- |-| **NumPlay.nwa** | All 17 games and NumVisuals in one app. Start here! |-| NumPlay-Invisible.nwa | The same app, hidden: a blank icon with no name |-| NumPlay-Matrices.nwa | The same app, disguised as a math app called Matrices |-| NumDash.nwa | Only NumDash: jump to the beat |-| CrossyRoad.nwa | Only Crossy Road: hop, dodge, survive |-| NumDrive.nwa | Only NumDrive: drive, flip, finish |-| Balatro.nwa | Only Balatro: poker hands, wild jokers |-| BuckshotRoulette.nwa | Only Buckshot Roulette: you, the Dealer, one shotgun |-| PortalReturns.nwa | Only Portal Returns: think with portals |-| Tetris.nwa | Only Tetris: stack and clear lines |-| NumChess.nwa | Only Chess: bots, puzzles, 2 players |-| FlappyBird.nwa | Only Flappy Bird: flap through the pipes |-| PacMan.nwa | Only Pac-Man: eat dots, dodge ghosts |-| Snake.nwa | Only Snake: Google's snake, with its 12 modes |-| ConnectFour.nwa | Only Connect Four: four in a row wins |-| Solitaire.nwa | Only Solitaire: the classic card game, the way Google plays it |-| NumDance.nwa | Only NumDance: hit the arrows on the beat |-| 2048.nwa | Only 2048: slide, merge, reach 2048 |-| Minesweeper.nwa | Only Minesweeper: clear the field, flag the mines |-| BlockBreaker.nwa | Only Block Breaker: break every brick, set off the power-ups |-| NumVisuals.nwa | Only NumVisuals: backgrounds, clocks, timers |+**New here?** Download **NumPlay.nwa**, then follow the [2-minute install guide](https://github.com/Mason363/NumPlay#how-to-install). [How to play](https://github.com/Mason363/NumPlay/blob/main/docs/play.md)diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 10954ffb..1ac86adf 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -60,6 +60,9 @@ jobs:if: startsWith(github.ref, 'refs/tags/v')env:GH_TOKEN: ${{ github.token }}+ # GitHub lists the files A to Z: the notes list them in order, and each file gets a labelrun: |- gh release create "$GITHUB_REF_NAME" build/NumPlay*.nwa build/apps/*.nwa \- --title "NumPlay $GITHUB_REF_NAME" --notes-file .github/release.md+ python3 tools/release.py --tag "$GITHUB_REF_NAME" --notes build/release-notes.md > build/release-files.txt+ mapfile -t files < build/release-files.txt+ gh release create "$GITHUB_REF_NAME" "${files[@]}" \+ --title "NumPlay $GITHUB_REF_NAME" --notes-file build/release-notes.mddiff --git a/tools/release.py b/tools/release.pynew file mode 100644index 00000000..854e75d6--- /dev/null+++ b/tools/release.py@@ -0,0 +1,83 @@+#!/usr/bin/env python3+"""Release notes and file labels for a GitHub release.++GitHub lists a release's files from A to Z and there is no way to reorder+them, so the notes carry the list in a useful order (NumPlay first, then its+discreet versions, then each game on its own in the launcher's order) with a+link to each file, and every file gets a label saying what it is.++- --notes FILE: writes the notes, .github/release.md (the introduction) and+ then the list;+- prints one `path#label` per line, the arguments of `gh release create`.++Usage: release.py --tag v1.3.0 --notes build/release-notes.md+"""+import argparse+import json+import os+import re++ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")+REPO = "https://github.com/Mason363/NumPlay"+# in games.json, but not games+EXTRAS = {"numvisuals"}+VARIANTS = [+ ("NumPlay-Invisible.nwa", "The same app, hidden: a blank icon with no name"),+ ("NumPlay-Matrices.nwa", "The same app, disguised as a math app called Matrices"),+]+++def standalone_names():+ """Game id -> its own .nwa, from the Makefile (APP_<id> = path:Name.nwa)."""+ names = {}+ for line in open(os.path.join(ROOT, "Makefile")):+ m = re.match(r"APP_(\w+)\s*=\s*\S+:(\S+\.nwa)\s*$", line)+ if m:+ names[m.group(1)] = m.group(2)+ return names+++def main():+ ap = argparse.ArgumentParser()+ ap.add_argument("--tag", required=True)+ ap.add_argument("--notes", required=True)+ ap.add_argument("--build", default="build")+ a = ap.parse_args()+ games = json.load(open(os.path.join(ROOT, "games", "games.json")))+ apps = standalone_names()+ count = sum(1 for g in games if g["id"] not in EXTRAS)+ extras = " and ".join(g["title"] for g in games if g["id"] in EXTRAS)+ everything = f"All {count} games" + (f" and {extras}" if extras else "") + " in one app"++ def link(name):+ return f"[{name}]({REPO}/releases/download/{a.tag}/{name})"++ files = [(os.path.join(a.build, "NumPlay.nwa"), f"NumPlay.nwa · Start here: {everything[0].lower() + everything[1:]}")]+ notes = ["### Start here", "", "| File | |", "| --- | --- |",+ f"| **{link('NumPlay.nwa')}** | **{everything}.** Start here! |", "",+ "### The same app, in disguise", "", "| File | |", "| --- | --- |"]+ for name, what in VARIANTS:+ files.append((os.path.join(a.build, name), f"{name} · {what}"))+ notes.append(f"| {link(name)} | {what} |")+ notes += ["", "### Each one on its own", "", "In the launcher's order.", "", "| File | |", "| --- | --- |"]+ for g in games:+ name = g.get("app") or apps.get(g["id"])+ if not name:+ continue+ tagline = g["tagline"][0].lower() + g["tagline"][1:]+ what = f"Only {g['title']}: {tagline}"+ files.append((os.path.join(a.build, "apps", name), f"{name} · {what}"))+ notes.append(f"| {link(name)} | {what} |")+ notes += ["", "<sub>The file list below is sorted A to Z by GitHub. Each file's label says what it is.</sub>"]++ intro = open(os.path.join(ROOT, ".github", "release.md")).read().rstrip()+ with open(a.notes, "w") as f:+ f.write(intro + "\n\n" + "\n".join(notes) + "\n")+ for path, label in files:+ if not os.path.exists(path):+ raise SystemExit(f"release: missing {path}")+ print(f"{path}#{label}")+++if __name__ == "__main__":+ main()