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
NumPlay Studio: every game plays its clip on the screen
Mason3637eccbd966547
diff --git a/README.md b/README.mdindex 21b215ee..dcd6317e 100644--- a/README.md+++ b/README.md@@ -505,22 +505,22 @@ NumPlay is licensed under the [GNU General Public License v3.0](LICENSE). Copyri<td align="center"><img src="docs/media/gallery/doodlejump.gif" alt="Doodle Jump: the doodler climbs past blue platforms and a monster"><br><a href="games/doodlejump/README.md"><b>Doodle Jump</b></a></td></tr><tr>- <td align="center"><img src="docs/media/jetpackjoyride.gif" alt="Jetpack Joyride: Barry grabs coins and rides the Profit Bird until it hits a zapper, then flies on past a missile"><br><a href="games/jetpackjoyride/README.md"><b>Jetpack Joyride</b></a></td>- <td align="center"><img src="docs/media/stickmanhook.gif" alt="Stickman Hook: two levels swung from hook to hook, each over the finish line"><br><a href="games/stickmanhook/README.md"><b>Stickman Hook</b></a></td>- <td align="center"><img src="docs/media/donkeykong.gif" alt="Donkey Kong: Mario climbs the 25m girders past rolling barrels to Pauline"><br><a href="games/donkeykong/README.md"><b>Donkey Kong</b></a></td>+ <td align="center"><img src="docs/media/gallery/jetpackjoyride.gif" alt="Jetpack Joyride: Barry grabs coins and rides the Profit Bird until it hits a zapper, then flies on past a missile"><br><a href="games/jetpackjoyride/README.md"><b>Jetpack Joyride</b></a></td>+ <td align="center"><img src="docs/media/gallery/stickmanhook.gif" alt="Stickman Hook: two levels swung from hook to hook, each over the finish line"><br><a href="games/stickmanhook/README.md"><b>Stickman Hook</b></a></td>+ <td align="center"><img src="docs/media/gallery/donkeykong.gif" alt="Donkey Kong: Mario climbs the 25m girders past rolling barrels to Pauline"><br><a href="games/donkeykong/README.md"><b>Donkey Kong</b></a></td></tr><tr>- <td align="center"><img src="docs/media/dune.gif" alt="Dune: the ball rolls down the dunes, flies over the line for coins and lands Perfect Slides"><br><a href="games/dune/README.md"><b>Dune</b></a></td>- <td align="center"><img src="docs/media/monkeymart.gif" alt="Monkey Mart: the monkey carries bananas and milk to the shelves while the customers shop"><br><a href="games/monkeymart/README.md"><b>Monkey Mart</b></a></td>- <td align="center"><img src="docs/media/tombofthemask.gif" alt="Tomb of the Mask: dashing up the tomb ahead of the rising flood"><br><a href="games/tombofthemask/README.md"><b>Tomb of the Mask</b></a></td>+ <td align="center"><img src="docs/media/gallery/dune.gif" alt="Dune: the ball rolls down the dunes, flies over the line for coins and lands Perfect Slides"><br><a href="games/dune/README.md"><b>Dune</b></a></td>+ <td align="center"><img src="docs/media/gallery/monkeymart.gif" alt="Monkey Mart: the monkey carries bananas and milk to the shelves while the customers shop"><br><a href="games/monkeymart/README.md"><b>Monkey Mart</b></a></td>+ <td align="center"><img src="docs/media/gallery/tombofthemask.gif" alt="Tomb of the Mask: dashing up the tomb ahead of the rising flood"><br><a href="games/tombofthemask/README.md"><b>Tomb of the Mask</b></a></td></tr><tr>- <td align="center"><img src="docs/media/uno.gif" alt="UNO: a hand against three bots, a Draw Two and a colour called"><br><a href="games/uno/README.md"><b>UNO</b></a></td>- <td align="center"><img src="docs/media/fnf.gif" alt="Friday Night Funkin': Ready, Set, Go, then the first notes of a song"><br><a href="games/fnf/README.md"><b>Friday Night Funkin'</b></a></td>- <td align="center"><img src="docs/media/turborush.gif" alt="Turbo Rush: racing along Sunset Coast, passing rivals before a bend"><br><a href="games/turborush/README.md"><b>Turbo Rush</b></a></td>+ <td align="center"><img src="docs/media/gallery/uno.gif" alt="UNO: a hand against three bots, a Draw Two and a colour called"><br><a href="games/uno/README.md"><b>UNO</b></a></td>+ <td align="center"><img src="docs/media/gallery/fnf.gif" alt="Friday Night Funkin': Ready, Set, Go, then the first notes of a song"><br><a href="games/fnf/README.md"><b>Friday Night Funkin'</b></a></td>+ <td align="center"><img src="docs/media/gallery/turborush.gif" alt="Turbo Rush: racing along Sunset Coast, passing rivals before a bend"><br><a href="games/turborush/README.md"><b>Turbo Rush</b></a></td></tr><tr>- <td align="center"><img src="docs/media/angrybirds.gif" alt="Angry Birds: the first level, aimed, fired and knocked down with one bird"><br><a href="games/angrybirds/README.md"><b>Angry Birds</b></a></td>+ <td align="center"><img src="docs/media/gallery/angrybirds.gif" alt="Angry Birds: the first level, aimed, fired and knocked down with one bird"><br><a href="games/angrybirds/README.md"><b>Angry Birds</b></a></td><td align="center"><img src="docs/media/gallery/polytrack.gif" alt="PolyTrack: Desert 4, through the tube and on to the finish"><br><a href="games/polytrack/README.md"><b>PolyTrack</b></a></td><td align="center"><img src="docs/media/gallery/paperclips.gif" alt="Universal Paperclips: the first clips, a strategy tournament, the HypnoDrones, a battle against the drifters and the last clips"><br><a href="games/paperclips/README.md"><b>Universal Paperclips</b></a></td></tr>diff --git a/docs/media/angrybirds.gif b/docs/media/gallery/angrybirds.gifsimilarity index 100%rename from docs/media/angrybirds.gifrename to docs/media/gallery/angrybirds.gifdiff --git a/docs/media/donkeykong.gif b/docs/media/gallery/donkeykong.gifsimilarity index 100%rename from docs/media/donkeykong.gifrename to docs/media/gallery/donkeykong.gifdiff --git a/docs/media/dune.gif b/docs/media/gallery/dune.gifsimilarity index 100%rename from docs/media/dune.gifrename to docs/media/gallery/dune.gifdiff --git a/docs/media/fnf.gif b/docs/media/gallery/fnf.gifsimilarity index 100%rename from docs/media/fnf.gifrename to docs/media/gallery/fnf.gifdiff --git a/docs/media/jetpackjoyride.gif b/docs/media/gallery/jetpackjoyride.gifsimilarity index 100%rename from docs/media/jetpackjoyride.gifrename to docs/media/gallery/jetpackjoyride.gifdiff --git a/docs/media/monkeymart.gif b/docs/media/gallery/monkeymart.gifsimilarity index 100%rename from docs/media/monkeymart.gifrename to docs/media/gallery/monkeymart.gifdiff --git a/docs/media/stickmanhook.gif b/docs/media/gallery/stickmanhook.gifsimilarity index 100%rename from docs/media/stickmanhook.gifrename to docs/media/gallery/stickmanhook.gifdiff --git a/docs/media/tombofthemask.gif b/docs/media/gallery/tombofthemask.gifsimilarity index 100%rename from docs/media/tombofthemask.gifrename to docs/media/gallery/tombofthemask.gifdiff --git a/docs/media/turborush.gif b/docs/media/gallery/turborush.gifsimilarity index 100%rename from docs/media/turborush.gifrename to docs/media/gallery/turborush.gifdiff --git a/docs/media/uno.gif b/docs/media/gallery/uno.gifsimilarity index 100%rename from docs/media/uno.gifrename to docs/media/gallery/uno.gifdiff --git a/games/angrybirds/README.md b/games/angrybirds/README.mdindex 02ab2841..1b826a78 100644--- a/games/angrybirds/README.md+++ b/games/angrybirds/README.md@@ -17,7 +17,7 @@</p><p align="center">- <img src="../../docs/media/angrybirds.gif" width="640" alt="Angry Birds: the first level, aimed, fired and knocked down with one bird">+ <img src="../../docs/media/gallery/angrybirds.gif" width="640" alt="Angry Birds: the first level, aimed, fired and knocked down with one bird"></p>## Highlightsdiff --git a/games/donkeykong/README.md b/games/donkeykong/README.mdindex b8cdfb08..5e2f5f25 100644--- a/games/donkeykong/README.md+++ b/games/donkeykong/README.md@@ -17,7 +17,7 @@</p><p align="center">- <img src="../../docs/media/donkeykong.gif" width="640" alt="Donkey Kong: Mario climbs the 25m girders over Kong's barrels and reaches Pauline">+ <img src="../../docs/media/gallery/donkeykong.gif" width="640" alt="Donkey Kong: Mario climbs the 25m girders over Kong's barrels and reaches Pauline"></p>## Highlightsdiff --git a/games/dune/README.md b/games/dune/README.mdindex 1a8ec80b..dbfecf3b 100644--- a/games/dune/README.md+++ b/games/dune/README.md@@ -17,7 +17,7 @@</p><p align="center">- <img src="../../docs/media/dune.gif" width="640" alt="Dune: the Rainbow Bubble rolls down the Mountains dunes, flies over the line for coins and lands Perfect Slides">+ <img src="../../docs/media/gallery/dune.gif" width="640" alt="Dune: the Rainbow Bubble rolls down the Mountains dunes, flies over the line for coins and lands Perfect Slides"></p>## Highlightsdiff --git a/games/fnf/README.md b/games/fnf/README.mdindex cff41b9e..c68c190c 100644--- a/games/fnf/README.md+++ b/games/fnf/README.md@@ -17,7 +17,7 @@</p><p align="center">- <img src="../../docs/media/fnf.gif" width="640" alt="Friday Night Funkin': Ready, Set, Go, then Daddy Dearest sings and Boyfriend hits the notes back on the beat">+ <img src="../../docs/media/gallery/fnf.gif" width="640" alt="Friday Night Funkin': Ready, Set, Go, then Daddy Dearest sings and Boyfriend hits the notes back on the beat"></p>## Highlightsdiff --git a/games/jetpackjoyride/README.md b/games/jetpackjoyride/README.mdindex eb8f6805..97805022 100644--- a/games/jetpackjoyride/README.md+++ b/games/jetpackjoyride/README.md@@ -17,7 +17,7 @@</p><p align="center">- <img src="../../docs/media/jetpackjoyride.gif" width="640" alt="Jetpack Joyride: Barry grabs coins and rides the Profit Bird until it hits a zapper, then flies on past a missile">+ <img src="../../docs/media/gallery/jetpackjoyride.gif" width="640" alt="Jetpack Joyride: Barry grabs coins and rides the Profit Bird until it hits a zapper, then flies on past a missile"></p>## Highlightsdiff --git a/games/monkeymart/README.md b/games/monkeymart/README.mdindex f97d7427..d92e98f8 100644--- a/games/monkeymart/README.md+++ b/games/monkeymart/README.md@@ -17,7 +17,7 @@</p><p align="center">- <img src="../../docs/media/monkeymart.gif" width="640" alt="Monkey Mart: the monkey picks bananas and corn, fills the shelves and takes the money at the till while customers shop">+ <img src="../../docs/media/gallery/monkeymart.gif" width="640" alt="Monkey Mart: the monkey picks bananas and corn, fills the shelves and takes the money at the till while customers shop"></p>## Highlightsdiff --git a/games/stickmanhook/README.md b/games/stickmanhook/README.mdindex 2b9e2b14..61a0c174 100644--- a/games/stickmanhook/README.md+++ b/games/stickmanhook/README.md@@ -17,7 +17,7 @@</p><p align="center">- <img src="../../docs/media/stickmanhook.gif" width="640" alt="Stickman Hook: the stickman swings through a level, crosses the checkered line in slow motion and dances on the victory screen">+ <img src="../../docs/media/gallery/stickmanhook.gif" width="640" alt="Stickman Hook: the stickman swings through a level, crosses the checkered line in slow motion and dances on the victory screen"></p>## Highlightsdiff --git a/games/tombofthemask/README.md b/games/tombofthemask/README.mdindex 786e2b6d..560a42eb 100644--- a/games/tombofthemask/README.md+++ b/games/tombofthemask/README.md@@ -17,7 +17,7 @@</p><p align="center">- <img src="../../docs/media/tombofthemask.gif" width="640" alt="Tomb of the Mask: the player dashes from wall to wall up the tomb, picking up dots and coins">+ <img src="../../docs/media/gallery/tombofthemask.gif" width="640" alt="Tomb of the Mask: the player dashes from wall to wall up the tomb, picking up dots and coins"></p>## Highlightsdiff --git a/games/turborush/README.md b/games/turborush/README.mdindex 2673df42..4822d6b2 100644--- a/games/turborush/README.md+++ b/games/turborush/README.md@@ -17,7 +17,7 @@</p><p align="center">- <img src="../../docs/media/turborush.gif" width="640" alt="Turbo Rush: racing along Sunset Coast, passing a rival before a bend">+ <img src="../../docs/media/gallery/turborush.gif" width="640" alt="Turbo Rush: racing along Sunset Coast, passing a rival before a bend"></p>## Highlightsdiff --git a/games/turborush/tests/play.c b/games/turborush/tests/play.cindex 961a9628..eacae52e 100644--- a/games/turborush/tests/play.c+++ b/games/turborush/tests/play.c@@ -7,8 +7,8 @@* play shots DIR pictures of the screens (DIR/<name>.ppm)* play docs DIR the README's pictures (DIR/<name>.ppm)* play film DIR MS T [TIME] MS milliseconds of a race on circuit T (time of day 0..2), a bot driving- * (DIR/<frame>_<ms>.raw, for tools/record.py --frames: docs/media/turborush.gif is- * `play film DIR 24000 0`, 11000-20000)+ * (DIR/<frame>_<ms>.raw, for tools/record.py --frames:+ * docs/media/gallery/turborush.gif is `play film DIR 24000 0`, 11000-20000)*/#define main tr_app_main#include "../src/main.c"diff --git a/games/uno/README.md b/games/uno/README.mdindex d6c73172..e225c2fd 100644--- a/games/uno/README.md+++ b/games/uno/README.md@@ -17,7 +17,7 @@</p><p align="center">- <img src="../../docs/media/uno.gif" width="640" alt="UNO: the bots play their cards in turn, then you pick a card in your hand and play it">+ <img src="../../docs/media/gallery/uno.gif" width="640" alt="UNO: the bots play their cards in turn, then you pick a card in your hand and play it"></p>## Highlightsdiff --git a/tools/kit.py b/tools/kit.pyindex aea8f845..9ff6b03e 100644--- a/tools/kit.py+++ b/tools/kit.py@@ -5,7 +5,8 @@ The website (site/) runs GNU ld in the browser on the same objects the MakefileNumPlay.nwa from: base.o (the launcher), arena.o (the RAM the games share), an app name andicon, and one object per game, with a script made of script.json's parts (tools/gen_games.py).This copies them to OUT, gzipped, with kit.json (the games, their sizes, colours and-limits), each game's icon and thumbnail, and checks that linking the default games from OUT+limits), each game's icon and thumbnail, and checks that every game has the clip the website plays+(docs/media/previews/ or gallery/), that linking the default games from OUTgives NumPlay.nwa's bytes on the calculator, and that each big game ("xl", for calculatorswith Enlarged Extra Apps: up to xlAppSpace bytes of apps) links with the launcher alone. Theblocks of the script go in the games' order ("index"), so the big games come last: past the@@ -92,6 +93,13 @@ def icon_of(gid):return None+def preview_of(gid):+ """The clip the website plays on the screen for a game: from the emulator (tools/previews.py), else its+ gallery GIF (docs/media/previews/ or docs/media/gallery/, as kit.json's "preview" names it)."""+ return next((f"{d}/{gid}.gif" for d in ("previews", "gallery")+ if os.path.exists(os.path.join(ROOT, "docs", "media", d, f"{gid}.gif"))), None)++def rounded(src, dst):"""An app icon as the website shows it: the calculator's white outside its corners made transparent, withthe corners every game icon has (make_icon.corner_mask), so it sits on the page as they do."""@@ -130,6 +138,14 @@ def main():a = ap.parse_args()B, O = a.build, a.outmanifest = json.load(open(a.manifest))+ # every game's icon plays its clip on the website, so a game without one stops the kit (a language's+ # kit has none: its tree has no docs/, and the website plays the English kit's)+ if not a.english:+ missing = [g["id"] for g in manifest if not preview_of(g["id"])]+ if missing:+ raise SystemExit(f"kit: no preview clip for {', '.join(missing)}. Add docs/media/gallery/<id>.gif "+ "(tools/emu.py --frames, then tools/record.py --frames) or docs/media/previews/<id>.gif "+ "(tools/previews.py)")index = {g["id"]: n for n, g in enumerate(manifest, 1)}default, upsilon = a.default.split(), set(a.upsilon.split())script = json.load(open(os.path.join(B, "gen", "script.json")))@@ -177,9 +193,7 @@ def main():icon = icon_of(i)if icon:shutil.copy(icon, os.path.join(O, "icons", i + ".png"))- # the clip the website plays: from the emulator (tools/previews.py), else the gallery's GIF- preview = next((f"{d}/{i}.gif" for d in ("previews", "gallery")- if os.path.exists(os.path.join(ROOT, "docs", "media", d, f"{i}.gif"))), None)+ preview = preview_of(i)thumb = os.path.join(ROOT, "docs", "media", f"thumb_{i}.png")if os.path.exists(thumb):shutil.copy(thumb, os.path.join(O, "thumbs", i + ".png"))