Skip to content

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.

Isaac: README, pictures and GIFs

Mason3634ce738a258bb
diff --git a/docs/media/gallery/isaac.gif b/docs/media/gallery/isaac.gif
new file mode 100644
index 00000000..fefb2a6d
Binary files /dev/null and b/docs/media/gallery/isaac.gif differ
diff --git a/docs/media/isaac.gif b/docs/media/isaac.gif
new file mode 100644
index 00000000..de570bf4
Binary files /dev/null and b/docs/media/isaac.gif differ
diff --git a/docs/media/thumb_isaac.png b/docs/media/thumb_isaac.png
new file mode 100644
index 00000000..85f4b267
Binary files /dev/null and b/docs/media/thumb_isaac.png differ
diff --git a/games/isaac/README.md b/games/isaac/README.md
new file mode 100644
index 00000000..6d3ad45a
--- /dev/null
+++ b/games/isaac/README.md
@@ -0,0 +1,102 @@
+> **The Binding of Isaac is a [NumPlay](../../README.md) game that comes on its own.** It is too big to sit next to NumPlay. Get `BindingOfIsaac.nwa` from the [latest release](https://github.com/Mason363/NumPlay/releases/latest).
+
+<p align="center">
+ <img src="src/icon.png" width="84" alt="The Binding of Isaac icon">
+</p>
+
+<h1 align="center">The Binding of Isaac</h1>
+
+<p align="center">
+ <b>Cry your way down through the basement, on the NumWorks calculator.</b><br>
+ A whole run, as Rebirth plays it: the Basement, the Caves, the Depths and the Womb, Mom and her heart, then down to Sheol or up to the Cathedral.
+</p>
+
+<p align="center">
+ <a href="https://github.com/Mason363/NumPlay/releases/latest/download/BindingOfIsaac.nwa"><b>Download BindingOfIsaac.nwa</b></a>
+ &nbsp;·&nbsp; <a href="#controls">Controls</a>
+</p>
+
+<p align="center">
+ <img src="../../docs/media/isaac.gif" width="640" alt="Isaac clears a room of the Basement, then fights Monstro">
+</p>
+
+## Highlights
+
+* **Floors laid out as the game lays them out:** every floor is new, grown room by room the way the original does it (a tree of rooms from the start, between 7 and 20 of them), with the boss's room at its far end, the treasure room and the shop in other dead ends, a secret room tucked between rooms and a super secret room behind a lone wall.
+* **Nine floors and their looks:** the Basement or the Cellar, the Caves or the Catacombs, the Depths or the Necropolis, the Womb or Utero (each floor picks one of the two), then Sheol or the Cathedral, each with its own walls, floor and rocks from the game.
+* **The rooms of a floor:** 37 layouts of rocks, poop, pits, spikes, fire places, TNT and cobwebs, each filled with a group of the floor's monsters (49 groups); tinted rocks to bomb for what's inside, champions that hit harder and drop something, rewards for clearing a room, and doors that shut until it's cleared.
+* **Special rooms:** treasure rooms, shops with their shopkeeper, the boss's room, secret and super secret rooms (bomb the right wall), curse rooms behind spiked doors, arcades with slot machines, the blood donation machine, the fortune teller and beggars, sacrifice rooms, libraries, the seven deadly sins' rooms, challenge rooms, and after a boss, sometimes, the Devil's room (items for your heart containers) or an angel's.
+* **180 items, by their names in the game and doing what they do:** stat ups (The Sad Onion, Cricket's Head, Magic Mushroom, Pentagram...), tears that change (The Inner Eye, Spoon Bender, Polyphemus, The Parasite, Cupid's Arrow, Ipecac, Mutant Spider, 20/20, Proptosis, Tough Love, A Lump of Coal...), Brimstone's charged laser, Technology's lasers, Mom's Knife, Dr. Fetus's bombs, Chocolate Milk's charge, familiars (Brother Bobby, Sister Maggy, Demon Baby, Robo-Baby, Little Steven, Guardian Angel, Halo of Flies, Abel, Bum Friend...), active items with their charges (The Bible, The Book of Belial, The Necronomicon, The D6, Yum Heart, Mom's Bra, Shoop da Whoop!, Crack the Sky, Teleport!...), and each from the pools of the rooms it comes from.
+* **87 monsters, as they move in the game:** Gapers, Flies and Attack Flies, Pooters, Horfs, Clotties, Hosts that hide in their skulls, Hoppers and Leapers, Chargers and Knights, Globins that get back up, Boom Flies, Maws, Spiders, Fatties, Bonies that throw bones, Babies that vanish, Vis and Eyes with their beams, Leeches, burrowing worms, Mom's Hand coming down from above... from the game's own pictures.
+* **42 bosses and the seven deadly sins:** Monstro, Larry Jr., the Duke of Flies, Gemini, Gurdy Jr., Famine, Steven, the Widow, Pin, the Haunt, Dingle, the Blighted Ovum, Chub, Gurdy, Peep, Pestilence, the Carrion Queen, Mega Fatty, Polycephalus, the Husk, Monstro II, Loki, War, the Mask of Infamy, Gish, the Bloat, the Wretched, the Dark One, Blastocyst, Daddy Long Legs, Scolex, Death, Lokii, Conquest, Mama Gurdy, Mr. Fred, Triachnid, Teratoma, then Mom (her eye in the doors, her hand, her foot), Mom's Heart, Satan and Isaac; each with its "VS" screen.
+* **Isaac's health as the game keeps it:** red heart containers, soul and black hearts (a black heart lost hurts the whole room), eternal hearts, up to twelve; coins, bombs and keys; pills (thirteen colours, their effects new each run, found out by taking them) and the tarot and playing cards.
+* **Eight characters with Rebirth's stats and starting items:** Isaac, Magdalene (Yum Heart), Cain (Lucky Foot), Judas (The Book of Belial), then, once won, ???, Eve, Samson and Azazel.
+* **The endings:** Mom's, Mom's Heart's, Satan's and Isaac's, and the bosses you've beaten marked on the menu.
+* **Kept like the game keeps a run:** Home (or the pause menu) keeps the run where you are, the next start continues it. Your run and progress are also copied into `isaac_saves.py`, so installing the app again doesn't erase them.
+
+<table>
+ <tr>
+ <td align="center"><img src="docs/title.png" width="390" alt="The title, in Isaac's room"><br><sub>Isaac's room</sub></td>
+ <td align="center"><img src="docs/characters.png" width="390" alt="Choosing Judas"><br><sub>Choose who plays</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/basement.png" width="390" alt="A room of the Basement"><br><sub>The Basement</sub></td>
+ <td align="center"><img src="docs/item.png" width="390" alt="Isaac holds up the Odd Mushroom"><br><sub>A treasure room's item</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/shop.png" width="390" alt="The shop"><br><sub>The shop</sub></td>
+ <td align="center"><img src="docs/vs.png" width="390" alt="Magdalene versus the Duke of Flies"><br><sub>Every boss has its VS screen</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/monstro.png" width="390" alt="Fighting Monstro"><br><sub>Monstro</sub></td>
+ <td align="center"><img src="docs/caves.png" width="390" alt="Cain in the Catacombs"><br><sub>The Catacombs</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/mom.png" width="390" alt="Mom's foot comes down"><br><sub>Mom's foot</sub></td>
+ <td align="center"><img src="docs/womb.png" width="390" alt="Judas in the Womb"><br><sub>The Womb</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/devil.png" width="390" alt="The Devil's room"><br><sub>A deal with the Devil</sub></td>
+ <td align="center"><img src="docs/pause.png" width="390" alt="The pause menu, with the stats, the time and the seed"><br><sub>Paused: the stats, the items, the run's time and seed</sub></td>
+ </tr>
+</table>
+
+## How to play
+
+A run starts in a room with four doors. Each room you walk into shuts its doors until every monster in it is dead: cry your tears at them, keep out of their way and of their shots. Clearing a room can leave something behind: coins, hearts, bombs, keys, a chest, a pill or a card. The map in the top right shows the rooms you know of.
+
+Find the treasure room (the golden door) for an item, the shop for more, and the boss's room (the red door with teeth). Beat the boss and take the trapdoor down to the next floor. From the second floor, treasure rooms and shops are locked: a key opens them. A bomb next to a wall where a room should be may open a secret room. After a boss, a door to the Devil's room may open, where an item costs heart containers, or to an angel's room, where it's free.
+
+Walk over an item to take it: the game names it and says what it does. Active items have a charge bar beside them, filled by clearing rooms. A pill does something different each run (you learn what by taking it), and each card has its own effect.
+
+Mom waits at the end of the Depths, and her heart at the end of the Womb. Beyond, Sheol leads to Satan, and the Cathedral to Isaac himself.
+
+## Controls
+
+| Key | What it does |
+| --- | --- |
+| Arrows | Walk |
+| 8, 4, 6, 2 (or 5) | Cry tears up, left, right, down (the game's arrow keys) |
+| 9, Shift or × | Drop a bomb |
+| 7, Alpha or OK | Use the active item |
+| 1, 3 or − | Take the pill or use the card you hold |
+| Toolbox, Var or x,n,t | Hold to see the whole map |
+| Back | Pause: Resume, or Quit game (the run is kept) |
+| Home | Keep the run and quit |
+
+On the menu, **Controls** swaps the two: the number keys walk (as W A S D) and the arrows cry.
+
+## Good to know
+
+* **One app at a time:** The Binding of Isaac is too big to sit next to NumPlay or the other big games. Installing it from the NumWorks website swaps them out, and installing them again swaps it out. Your saves in each one are kept.
+* **What isn't in it:** the bigger rooms (two cells wide or tall), trinkets, the Chest and the Dark Room past Satan and Isaac, Greed mode and the challenges. The characters past the eight above, and Rebirth's later expansions, aren't in it either.
+* **No music or sound:** the calculator has no speaker.
+* **The same game:** the floors grow the way the original's do, the pictures are the game's (from the room editor its modders use), and the items, monsters and bosses do what they do in Rebirth, at its 30 frames a second, with room layouts of our own in its style.
+
+## Credits
+
+**The Binding of Isaac** is by **Edmund McMillen** and **Florian Himsl** (2011), and **The Binding of Isaac: Rebirth** by **Nicalis** and Edmund McMillen (2014). This is an independent fan version, written in C for NumPlay. Its pictures are the game's own, from the resources of [Basement Renovator](https://github.com/Basement-Renovator/basement-renovator), the room editor of the game's modders; the doors, the HUD and the other characters' looks are drawn from Isaac's own picture for this version. The titles use **Upheaval** by Brian Kent (freeware). Not affiliated with Edmund McMillen, Florian Himsl or Nicalis.
+
+It comes on its own as `BindingOfIsaac.nwa` from the [latest release](https://github.com/Mason363/NumPlay/releases/latest).
+
+Build: `make` (needs `arm-none-eabi-gcc` and Node.js for nwlink); `make host test` plays it on a computer with the sanitizers. `make data REF=<folder>` remakes `src/data.bin` from what `tools/fetch.py` downloads, and `python3 tools/media.py` the pictures above.
diff --git a/games/isaac/docs/basement.png b/games/isaac/docs/basement.png
new file mode 100644
index 00000000..6c5578a7
Binary files /dev/null and b/games/isaac/docs/basement.png differ
diff --git a/games/isaac/docs/caves.png b/games/isaac/docs/caves.png
new file mode 100644
index 00000000..1a294200
Binary files /dev/null and b/games/isaac/docs/caves.png differ
diff --git a/games/isaac/docs/characters.png b/games/isaac/docs/characters.png
new file mode 100644
index 00000000..31cd5434
Binary files /dev/null and b/games/isaac/docs/characters.png differ
diff --git a/games/isaac/docs/devil.png b/games/isaac/docs/devil.png
new file mode 100644
index 00000000..ab605e79
Binary files /dev/null and b/games/isaac/docs/devil.png differ
diff --git a/games/isaac/docs/item.png b/games/isaac/docs/item.png
new file mode 100644
index 00000000..527a480c
Binary files /dev/null and b/games/isaac/docs/item.png differ
diff --git a/games/isaac/docs/mom.png b/games/isaac/docs/mom.png
new file mode 100644
index 00000000..53c5595c
Binary files /dev/null and b/games/isaac/docs/mom.png differ
diff --git a/games/isaac/docs/monstro.png b/games/isaac/docs/monstro.png
new file mode 100644
index 00000000..40389978
Binary files /dev/null and b/games/isaac/docs/monstro.png differ
diff --git a/games/isaac/docs/pause.png b/games/isaac/docs/pause.png
new file mode 100644
index 00000000..406a2dfb
Binary files /dev/null and b/games/isaac/docs/pause.png differ
diff --git a/games/isaac/docs/shop.png b/games/isaac/docs/shop.png
new file mode 100644
index 00000000..4497ccb2
Binary files /dev/null and b/games/isaac/docs/shop.png differ
diff --git a/games/isaac/docs/title.png b/games/isaac/docs/title.png
new file mode 100644
index 00000000..764f7894
Binary files /dev/null and b/games/isaac/docs/title.png differ
diff --git a/games/isaac/docs/vs.png b/games/isaac/docs/vs.png
new file mode 100644
index 00000000..261968eb
Binary files /dev/null and b/games/isaac/docs/vs.png differ
diff --git a/games/isaac/docs/womb.png b/games/isaac/docs/womb.png
new file mode 100644
index 00000000..acf9ced2
Binary files /dev/null and b/games/isaac/docs/womb.png differ
diff --git a/games/isaac/src/floor.c b/games/isaac/src/floor.c
index cda12439..bef0e3d8 100644
--- a/games/isaac/src/floor.c
+++ b/games/isaac/src/floor.c
@@ -553,7 +553,7 @@ void floor_enter_room(int index, int from_dir) {
if (!ents_alive_monsters()) r->state |= RS_CLEARED;
}
g_room_was_cleared = r->state & RS_CLEARED;
- if ((r->kind == ROOM_BOSS || r->kind == ROOM_MINIBOSS) && !(r->state & RS_CLEARED) && g_mode == MODE_PLAY) g_boss_intro = 64;
+ if ((r->kind == ROOM_BOSS || r->kind == ROOM_MINIBOSS) && !(r->state & RS_CLEARED) && g_mode == MODE_PLAY) g_boss_intro = 64, banner_t = 0;
/* where he comes in */
static const float ex[5] = {160, ROOM_X + 14, 160, ROOM_R - 14, 160}, ey[5] = {ROOM_B - 12, 120, ROOM_Y + 14, 120, 140};
int d = from_dir < 0 || from_dir > 4 ? 4 : from_dir;
diff --git a/games/isaac/src/hud.c b/games/isaac/src/hud.c
index 18312db8..f16229fc 100644
--- a/games/isaac/src/hud.c
+++ b/games/isaac/src/hud.c
@@ -159,7 +159,7 @@ void hud_draw(void) {
/* banners: an item's name and what it does, or the floor's */
if (banner_t > 0) {
int a = banner_t > 8 ? 32 : banner_t * 4;
- int y = 62;
+ int y = 30; /* (over the top wall and the floor's edge, clear of him) */
int w = gfx_text_width(FONT_UPHEAVAL, banner_title, 2);
int ws = gfx_text_width(FONT_UPHEAVAL, banner_sub, 1);
if (ws > w) w = ws;
diff --git a/games/isaac/tools/media.py b/games/isaac/tools/media.py
new file mode 100644
index 00000000..ee1b3742
--- /dev/null
+++ b/games/isaac/tools/media.py
@@ -0,0 +1,76 @@
+#!/usr/bin/env python3
+"""The README's pictures and GIFs, played by the host build (make host) with tests/play.c's bot:
+
+ python3 tools/media.py build/play
+
+- docs/*.png: screens of the game, 320 x 240 as the calculator shows them
+- ../../docs/media/isaac.gif (640 x 480, How to play), ../../docs/media/gallery/isaac.gif (320 x 240),
+ ../../docs/media/thumb_isaac.png (160 x 120)
+A run's rooms come from its seed, so the same seeds give the same pictures."""
+import glob
+import os
+import subprocess
+import sys
+import tempfile
+
+from PIL import Image
+
+HERE = os.path.dirname(os.path.abspath(__file__))
+GAME = os.path.join(HERE, "..")
+MEDIA = os.path.join(GAME, "..", "..", "docs", "media")
+sys.path.insert(0, os.path.join(GAME, "..", "..", "tools"))
+import record # noqa: E402 (NumPlay's GIF writer: one palette for all the frames)
+
+PLAY = sys.argv[1] if len(sys.argv) > 1 else os.path.join(GAME, "build", "play")
+ENV = dict(os.environ, ASAN_OPTIONS="detect_leaks=0")
+ROOM_BOSS, ROOM_SHOP, ROOM_TREASURE, ROOM_DEVIL = 4, 3, 2, 13
+
+
+def frames(args, first, last, step=1):
+ """the frames first..last of a run of play with these arguments"""
+ with tempfile.TemporaryDirectory() as d:
+ shots = ",".join(str(f) for f in range(first, last + 1, step))
+ subprocess.run([PLAY, "--saves", d, "--out", d, "--frames", str(last + 1), "--shots", shots] + args,
+ env=ENV, check=True, capture_output=True)
+ out = []
+ for f in sorted(glob.glob(os.path.join(d, "shot_*.ppm"))):
+ im = Image.open(f)
+ im.load()
+ out.append(im.convert("RGB"))
+ return out
+
+
+def screen(name, args, frame):
+ frames(args, frame, frame)[0].save(os.path.join(GAME, "docs", name + ".png"))
+
+
+def main():
+ os.makedirs(os.path.join(GAME, "docs"), exist_ok=True)
+ # the screens
+ screen("title", ["--keys", "1:right"], 40)
+ screen("characters", ["--keys", "5:ok,15:ok,25:right,30:right,35:right"], 50)
+ screen("basement", ["--run", "--bot", "--immortal", "--seed", "8"], 160)
+ screen("item", ["--run", "--goto", str(ROOM_TREASURE), "--keys", "5-25:up", "--seed", "8"], 40)
+ screen("shop", ["--run", "--stage", "2", "--goto", str(ROOM_SHOP), "--seed", "4"], 30)
+ screen("vs", ["--run", "--goto", str(ROOM_BOSS), "--char", "1", "--seed", "8"], 30)
+ screen("monstro", ["--run", "--bot", "--immortal", "--seed", "8"], 1500)
+ screen("mom", ["--run", "--stage", "6", "--goto", str(ROOM_BOSS), "--bot", "--immortal", "--give", "4,7", "--seed", "3"], 160)
+ screen("womb", ["--run", "--stage", "7", "--bot", "--immortal", "--char", "3", "--seed", "6"], 150)
+ screen("devil", ["--run", "--stage", "3", "--goto", str(ROOM_DEVIL), "--seed", "5"], 30)
+ screen("pause", ["--run", "--bot", "--immortal", "--seed", "8", "--keys", "1500:back"], 1510)
+ screen("caves", ["--run", "--stage", "3", "--bot", "--immortal", "--char", "2", "--seed", "11"], 400)
+ # the GIFs: a room of the Basement, then Monstro
+ clip = frames(["--run", "--bot", "--immortal", "--seed", "8"], 150, 290) + \
+ frames(["--run", "--bot", "--immortal", "--seed", "8"], 1330, 1480)
+ timed = [(i * 33, im) for i, im in enumerate(clip)]
+ record.save_gif(timed, os.path.join(MEDIA, "isaac.gif"), 2, 30)
+ half = [(i * 66, im) for i, im in enumerate(clip[::2])]
+ record.save_gif(half, os.path.join(MEDIA, "gallery", "isaac.gif"), 1, 15)
+ thumb = Image.open(os.path.join(GAME, "docs", "monstro.png")).resize((160, 120), Image.LANCZOS)
+ thumb.save(os.path.join(MEDIA, "thumb_isaac.png"))
+ for f in ("isaac.gif", "gallery/isaac.gif", "thumb_isaac.png"):
+ print(f, os.path.getsize(os.path.join(MEDIA, f)) // 1024, "KB")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/tests/test_games.py b/tests/test_games.py
index f85fd6a5..aa678f38 100644
--- a/tests/test_games.py
+++ b/tests/test_games.py
@@ -156,10 +156,11 @@ GAMES = {
# Press OK to Play: the first scenario, its first goal closed, the city runs; then Continue
"finalearth2": ("FinalEarth2.nwa", "finalearth2.sav", presses((2000, "ok"), (3000, "ok")), 9000,
presses((2000, "ok")), 6000),
- # past the title, a new run: the floor's name, then Isaac walks and cries; Home keeps the run. Next time,
+ # past the title, a new run as Isaac: the floor's name, then he walks and cries; Home keeps the run. Next time,
# Continue, and the run goes on (quitting with On/Off)
"isaac": ("BindingOfIsaac.nwa", "isaacrun.sav",
- presses((1500, "ok"), (2200, "ok"), (2800, "ok"), (3300, "left", 1200), (3600, "6", 900), (4800, "up", 600)), 6500,
+ presses((1500, "ok"), (2200, "ok"), (2800, "ok"), (3400, "ok"), (3900, "left", 1200), (4200, "6", 900),
+ (5400, "up", 600)), 7000,
presses((1500, "ok"), (2200, "ok"), (2800, "right", 900), (3000, "8", 600)), 4500),
# a level, its message, then play; then back to the level select
"portal": ("PortalReturns.nwa", "portal.sav",