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
Docs: the live emulator and building on Windows
Mason363446e931c4243
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 27973472..3a3f227c 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -23,7 +23,7 @@ git clone https://github.com/Mason363/NumPlay.gitpython3 NumPlay/tools/setup.py```-`tools/setup.py` gets the ARM compiler, nwlink and the Python packages into `~/.numplay` and tells you the one line that puts them on your PATH (`source ~/.numplay/env.sh` on macOS and Linux). On macOS, run `xcode-select --install` first if `make` is missing. Rust is needed only for Tetris: [rustup.rs](https://rustup.rs), then `rustup target add thumbv7em-none-eabihf`. On Windows, building all of NumPlay needs GNU make (Git Bash or WSL); a single game builds with `make -C games/<game>` the same way.+`tools/setup.py` gets the ARM compiler, nwlink and the Python packages into `~/.numplay` and tells you the one line that puts them on your PATH (`source ~/.numplay/env.sh` on macOS and Linux). On macOS, run `xcode-select --install` first if `make` is missing. Rust is needed only for Tetris: [rustup.rs](https://rustup.rs), then `rustup target add thumbv7em-none-eabihf`. On Windows, `python tools/build_windows.py` builds NumPlay natively (`--doctor` checks your setup), or use WSL.Then:@@ -36,6 +36,7 @@ Then:| `make -C games/<game> test` | That game's tests on your computer (most games have them) || `python3 tests/test_games.py build/apps` | Plays every app in the emulator and checks its saves || `python3 tools/emu.py app.nwa --ms 5000 --shots 2000 --out shots` | Runs any `.nwa` in the emulator and takes pictures |+| `python3 tools/emu_live.py app.nwa` | The emulator in a window, to play with the mouse and keyboard; `--live` rebuilds as you save |## How the code is laid outdiff --git a/README.md b/README.mdindex 07d1ea7a..c028c389 100644--- a/README.md+++ b/README.md@@ -242,7 +242,7 @@ NumPlay is a fan project, made out of love for these games and for the NumWorks- **[Gabriele Cirulli](https://github.com/gabrielecirulli/2048)** made 2048.- **Block Blast!** by [Hungry Studio](https://www.hungrystudio.com) inspired NumPlay's Block Blast, written in C for NumPlay with no code or art from it. Its blocks, scoring and colours follow measurements of the app by the players behind [blockblast-Self-Improvement-loop](https://github.com/Kucze3205/blockblast-Self-Improvement-loop).- Snake, Solitaire and Block Breaker look and play like **Google's games** in Search. They are drawn from scratch; nothing is taken from Google.-- **Chrome's dinosaur game** by Google inspired Chrome Dino, which ports its rules, numbers and pictures from [Chromium's source](https://chromium.googlesource.com/chromium/src/+/main/components/neterror/resources/dino_game/) (BSD license). **[LilyTheCatgirl](https://github.com/LilyTheCuteCatgirl)** brought it to NumPlay. Not affiliated with Google.+- **Chrome's dinosaur game** by Google inspired Chrome Dino, which ports its rules, numbers and pictures from [Chromium's source](https://chromium.googlesource.com/chromium/src/+/main/components/neterror/resources/dino_game/) (BSD license). **[LilyTheCatgirl](https://github.com/LilyTheCuteCatgirl)** brought it to NumPlay, and also made the live emulator (`tools/emu_live.py`) and the Windows builder. Not affiliated with Google.- **[gd3ds](https://github.com/AleFunky/gd3ds)** by AleFunky and friends, whose research into Geometry Dash made NumDash possible. Clubstep, Deadlocked and Dash also rely on [gdsolver](https://github.com/gdsolver/gdsolver)'s measurements of Geometry Dash 2.2, level data from [gmdkit](https://github.com/UHDanke/gmdkit) by HDanke and checks against [GDRWeb](https://github.com/iliasHDZ/GDRWeb) by IliasHDZ.- **Balatro** by LocalThunk inspired NumPlay's Balatro, which uses art adapted from the game and the **m6x11** font by Daniel Linssen.- **Minecraft** by Mojang inspired NumBlocks, which follows Minecraft 1.8.8 exactly: it makes its worlds the way Minecraft 1.8.8 does and uses its blocks, items, recipes, textures, font and screens.diff --git a/docs/make-a-game.md b/docs/make-a-game.mdindex 45790a64..d24a5cf2 100644--- a/docs/make-a-game.md+++ b/docs/make-a-game.md@@ -27,7 +27,7 @@ python3 NumPlay/tools/setup.py| --- | --- || **macOS** (Apple silicon or Intel) | If `make` is missing, run `xcode-select --install` first. Then, in each new terminal: `source ~/.numplay/env.sh` || **Linux** | Same as macOS: `source ~/.numplay/env.sh` |-| **Windows** | `tools/setup.py` prints the PowerShell line to use. To build all of NumPlay, use Git Bash and GNU make, or WSL |+| **Windows** | `tools/setup.py` prints the PowerShell line to use. `python tools/build_windows.py` builds NumPlay natively (it gets GNU make for you), or use WSL |## 2. Start a game@@ -51,7 +51,13 @@ You get `games/mygame/output/mygame.nwa`. Now change `games/mygame/src/main.c` ipython3 tools/emu.py games/mygame/output/mygame.nwa --ms 6000 --keys "1500-1600:ok,2000-4000:right" --shots 1400,3900 --out shots```-`--keys` holds keys over time ranges in milliseconds (`ok`, `back`, `left`, `up`, `exe`, `home`, `1`...`9`, `shift`, `alpha`...). `--gif 0-5000` records a GIF, `--model n0110` emulates the slower N0110 and N0115 (if your game is smooth there, it's smooth everywhere), `--system upsilon` emulates Upsilon. It runs at about the speed of an N0110.+To play it with your mouse and keyboard instead, open it in the live emulator, a calculator in a window (made by LilyTheCuteCatgirl). With `--live` it builds your game again each time you save a file and reloads it:++```bash+python3 tools/emu_live.py games/mygame/output/mygame.nwa+```++`tools/emu.py`'s `--keys` holds keys over time ranges in milliseconds (`ok`, `back`, `left`, `up`, `exe`, `home`, `1`...`9`, `shift`, `alpha`...). `--gif 0-5000` records a GIF, `--model n0110` emulates the slower N0110 and N0115 (if your game is smooth there, it's smooth everywhere), `--system upsilon` emulates Upsilon. It runs at about the speed of an N0110.## 4. Put it on a calculator@@ -82,6 +88,7 @@ And the tools, all in `tools/`:| `setup.py` | Gets the compiler, nwlink and the Python packages || `new_game.py` | Starts a game from the template || `emu.py` | Runs a `.nwa` in an emulator: pictures, GIFs, scripted keys, files kept between runs, profiling |+| `emu_live.py` | The emulator in a window: click the keys or use your keyboard; `--live` rebuilds when you save (`watch.py` on macOS and Linux, `build_windows.py` on Windows) || `icon.py` | Makes the 55 x 56 app icon from any picture, with the rounded corners every NumPlay icon has || `record.py` | Makes GIFs from the emulator's frames || `sizes.py` | How much flash and RAM each game takes inside NumPlay |