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
Dune: README, screenshots and a recording
Mason363329dc98ab859
diff --git a/docs/media/dune.gif b/docs/media/dune.gifnew file mode 100644index 00000000..ea3ebe3cBinary files /dev/null and b/docs/media/dune.gif differdiff --git a/games/dune/README.md b/games/dune/README.mdindex accc40b4..aa6380e4 100644--- a/games/dune/README.md+++ b/games/dune/README.md@@ -1,44 +1,90 @@-# Dune+> **Dune is a [NumPlay](../../README.md) game that comes on its own.** It is too big to fit next to NumPlay on the calculator. Get `Dune.nwa` from the [latest release](https://github.com/Mason363/NumPlay/releases/latest).-Native NumWorks adaptation **By Bobydeluxe**, based on the supplied [Dune Rider reference by Inlogic Software](https://github.com/Gr4ys0n/Gr4ys0n.github.io/tree/29006b0f11904704c390b457f7055c9fa1e53484/public/assets/games/dune).+<p align="center">+ <img src="src/icon.png" width="84" alt="Dune icon">+</p>-Ride the dunes, release before the climb to take off, and hold in the air to dive onto a downslope. Crossing the height line gives 1–3 points according to launch speed. Long, fast slides earn the original Nice/Perfect Slide bonuses and momentum boosts. A hard landing on an uphill face ends the run. This compact edition retains only the original **second landscape, Mountains**, now free and always active. The shop contains **seven balls**: Basic Ball, Basketball, 8-Ball, Football, Donut, Smiley and Rainbow Bubble. Their original coin prices and cosmetic behaviour are retained.+<h1 align="center">Dune</h1>-| Key | Action |-| --- | --- |-| Hold OK, EXE or Shift | Speed up downhill / dive in the air |-| Release | Take off and preserve momentum |-| Back | Pause / return |-| Arrows and OK | Menu, shop, purchase and equip |-| 0 on the title screen | Controls |-| Home or Power | Save and exit |+<p align="center">+ <b>Roll down the dunes and fly off the next one, on the NumWorks calculator.</b><br>+ The web version of Dune!, with all 26 balls and 7 landscapes of its shop.+</p>++<p align="center">+ <a href="https://github.com/Mason363/NumPlay/releases/latest/download/Dune.nwa"><b>Download Dune.nwa</b></a>+ · <a href="#controls">Controls</a>+</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">+</p>++## Highlights-Ball sprites, the Mountains artwork, terrain textures, icons, rotation flags, trail patterns, score rules and retained shop entries come from the reference. UI/title lettering uses antialiased Segoe UI rasterized independently at 13, 22 and 32 pixels, with no bitmap enlargement and no displaced text shadow. Single-pass labels and solid HUD backgrounds improve contrast. There are no browser, audio, advert or network dependencies. Coins, record, purchases and equipped items persist in a versioned, checked **40-byte** save. Purchases ask for confirmation; equipping an owned item is free. Storage-full handling preserves other calculator files.+* **The ride:** hold to roll faster down a dune, let go to fly off the top of the next, and hold in the air to dive. The ball moves with the web game's own physics engine and numbers, checked step by step against its code.+* **Endless dunes:** the game's nine dunes, shaped by its own generator and shuffled as you go.+* **Points:** fly over the line for 1 to 3 points, more the faster you climb. Slide fast down a whole dune for a Nice Slide (+1) or, from near its top, a Perfect Slide (+3), each with a burst of speed.+* **Coins:** on the dunes, and in rows, blocks and letters in the sky when you fly over the line.+* **The shop:** all 26 balls, each with its own trail, and all 7 landscapes, from Night Land to Candy Land, at the game's prices.+* **The game's look:** its pictures, its landscapes with their moving layers, and its Bango Pro lettering.+* **Saved as you go:** coins count the moment you grab them. Home saves the run and quits, and the next start picks it up paused. Your best, coins and shop are also copied into `dune_saves.py`, so installing the app again doesn't erase them.-The `DUN2` save format imports the original `DUN1` file automatically. Record, coins, runs and retained purchases survive. A removed equipped ball returns to Basic Ball. Removed ball purchases and previously purchased landscapes are refunded once in coins; the refund saturates safely at the wallet limit. Subsequent saves use the new catalog indices and cannot repeat the refund.+<table>+ <tr>+ <td align="center"><img src="docs/shot.png" width="390" alt="The Basketball diving into a dune in Mountains"><br><sub>Mountains</sub></td>+ <td align="center"><img src="docs/line.png" width="390" alt="High over the line in Night Land, with coins and a Perfect Slide"><br><sub>Over the line in Night Land</sub></td>+ </tr>+ <tr>+ <td align="center"><img src="docs/slide.png" width="390" alt="A Perfect Slide in Mushroom Land"><br><sub>A Perfect Slide in Mushroom Land</sub></td>+ <td align="center"><img src="docs/volcano.png" width="390" alt="Coins in the sky over Volcano"><br><sub>Volcano</sub></td>+ </tr>+ <tr>+ <td align="center"><img src="docs/space.png" width="390" alt="The Donut in Outer Space"><br><sub>Outer Space</sub></td>+ <td align="center"><img src="docs/candy.png" width="390" alt="The Alien ball in Candy Land"><br><sub>Candy Land</sub></td>+ </tr>+ <tr>+ <td align="center"><img src="docs/ice.png" width="390" alt="The Melon in Ice Mountains"><br><sub>Ice Mountains</sub></td>+ <td align="center"><img src="docs/shop.png" width="390" alt="The shop's balls"><br><sub>The shop's balls</sub></td>+ </tr>+ <tr>+ <td align="center"><img src="docs/landscapes.png" width="390" alt="The shop's landscapes"><br><sub>The shop's landscapes</sub></td>+ <td align="center"><img src="docs/title.png" width="390" alt="The title screen"><br><sub>The title screen</sub></td>+ </tr>+</table>-## Native physics and rendering+## How to play-The world retains the original 665-pixel height, gravity 1,000, physical ball radius 42, terrain formula and coarse collision segments. Input acceleration, speed thresholds, altitude corrections, score thresholds, slide boosts and landing conditions follow the supplied JavaScript. A bounded circle/segment contact solver with four substeps replaces Phaser/p2. It preserves the mechanics and momentum but is not a bit-for-bit copy of p2's iterative contact solver. The camera keeps the original zoom rules and a view ahead of the ball. Simulation runs at 60 Hz; display updates target 30 Hz on all three calculator models.+Press **OK** on Play, then hold **OK** to go. Hold it while the ball rolls downhill to speed it up, and let go as it climbs the next dune to fly off the top. In the air, hold **OK** to dive back down. Land on a slope going down to keep your speed: landing hard on a slope going up ends the run.++Fly over the line to score and to fill the sky with coins. Spend the coins in the shop: pick a ball or a landscape with the arrows and press **OK** to buy it or to use it.++## Controls++| Key | What it does |+| --- | --- |+| OK, EXE or Shift | Hold to speed up downhill and to dive in the air; let go to fly |+| Arrows | Move the focus in menus and in the shop |+| OK | Choose, buy, use |+| Back | Pause: Resume, Restart, Shop, How to play, Quit game (it asks first) |+| Home | Save and quit |-Endless terrain uses nine reusable shapes and eight active segments. Coins use a fixed 32-entry pool. Long runs periodically shift world coordinates together to retain floating-point precision. Rotating balls and coloured triangular trails remain animated, including the Donut's hollow trail after catalog reindexing. The sole background is resized, precomposed and slowly scrolled; the original browser's separate moving layers/particles are consolidated for memory and storage. Terrain and ball movement remain continuous.+## Good to know-The release file is **71,444 bytes**, down from 211,996 bytes (**66.3% smaller**), including the new native-size font coverage masks. Removed landscapes, textures, thumbnails and ball sprites are omitted from both the source assets and compiled image. The retained background uses row-indexed RLE and a 32-colour RGB565 palette; sprites/textures use four-bit palette indices, and the icon uses the compact NWA packer. The renderer uses one 5,120-byte strip and a 460-byte row decoder; it never expands a complete background or framebuffer into RAM. Static app RAM remains **8,173 bytes**. No heap allocation is used during play.+* **On its own:** Dune is too big to fit next to NumPlay. Installing it from the NumWorks website swaps out NumPlay and the other apps, and installing NumPlay again swaps it back out.+* **The web version:** the dunes, numbers and shop are those of Dune! as Inlogic Software made it for the web. The phone game's later balls and modes aren't here.+* **Left out:** ads, the sound settings, and music and sound (the calculator has no speaker). The landscapes' candies, planets and mushrooms stand upright instead of at random angles.-## Build and validation+## Credits-Requires Python with Pillow, Node.js, `[email protected]` and ARM embedded GCC. All imported PNG/JSON assets and generated C data are included. Building does not download the original game.+Inspired by **Dune!** by Team Lava, not affiliated with them. Go play the original: it's free on iOS and Android.-```sh-python build.py --arm-bin /path/to/arm/bin --nwlink /path/to/nwlink/bin/nwlink-make test HOST_CC=cc-make test-assets-make test-arm NWLINK=nwlink-make fidelity HOST_CC=cc REFERENCE_JS=/path/to/pinned/dune/js/game.js-```+* The pictures (the balls, the landscapes, the coins and the icons), the Bango Pro lettering, the texts and the numbers come from Dune Rider, Inlogic Software's web version of the game (not affiliated with them), read by [tools/data.py](tools/data.py) into [src/art.c](src/art.c).+* The ball moves as in [p2.js](https://github.com/schteppe/p2.js) 0.7.1 by Stefan Hedman (MIT license), the physics engine the web game runs on, written again in C. [tests/oracle.cjs](tests/oracle.cjs) checks every step against the engine itself, reading it from the web build.+* Adapted for the calculator by **[Bobydeluxe](https://github.com/Bobydeluxe)**.-The build produces `output/dune.nwa` and copies it to the repository's `build/apps/Dune.nwa`. Run host tests before ARM tests. The ARM tests use NumPlay's emulator and require Unicorn, pyelftools and Pillow. Fidelity tests execute the pinned original JavaScript's terrain generator and input handler, verifying their source digest first. They compare 100 full terrain curves/contact meshes and 1,000 control cases. These checks do not claim that the replacement contact solver reproduces every p2 trajectory. See [VALIDATION.md](VALIDATION.md).+Made by Mason Chen as part of NumPlay.-The adaptation is local and independent of the launcher. Original game assets and data remain credited to their original authors and retain their rights. Inlogic's game is identified as Dune Rider, version 1.0.1, dated 20 April 2020 in its supplied script. Source revision/digest are recorded in `assets/provenance.json`; original catalog IDs are retained for migration. UI font masks are pre-baked in `assets/ui-fonts.json`; an installed font is not needed to build. `tools/import_fonts.py` regenerates these masks from supplied regular/bold TTF files. NumPlay's common app/file helpers and compact packaging tools retain their existing notices.+## License-This fan adaptation is not affiliated with Inlogic Software. UI masks are rasterized from Microsoft Segoe UI; no TTF files are distributed. Borrowed artwork and lettering retain their original rights.+The game's code is licensed under the GNU General Public License v3.0: see the `LICENSE` file at the root of the repository. The pictures, the lettering and the texts are their makers' and keep their own terms (see Credits).diff --git a/games/dune/docs/candy.png b/games/dune/docs/candy.pngnew file mode 100644index 00000000..163e0d99Binary files /dev/null and b/games/dune/docs/candy.png differdiff --git a/games/dune/docs/ice.png b/games/dune/docs/ice.pngnew file mode 100644index 00000000..c5c33a9aBinary files /dev/null and b/games/dune/docs/ice.png differdiff --git a/games/dune/docs/landscapes.png b/games/dune/docs/landscapes.pngnew file mode 100644index 00000000..837d33fbBinary files /dev/null and b/games/dune/docs/landscapes.png differdiff --git a/games/dune/docs/line.png b/games/dune/docs/line.pngnew file mode 100644index 00000000..187ac3c4Binary files /dev/null and b/games/dune/docs/line.png differdiff --git a/games/dune/docs/shop.png b/games/dune/docs/shop.pngnew file mode 100644index 00000000..2c206a2eBinary files /dev/null and b/games/dune/docs/shop.png differdiff --git a/games/dune/docs/shot.png b/games/dune/docs/shot.pngnew file mode 100644index 00000000..6edc188bBinary files /dev/null and b/games/dune/docs/shot.png differdiff --git a/games/dune/docs/slide.png b/games/dune/docs/slide.pngnew file mode 100644index 00000000..2dae1e74Binary files /dev/null and b/games/dune/docs/slide.png differdiff --git a/games/dune/docs/space.png b/games/dune/docs/space.pngnew file mode 100644index 00000000..cfbb8471Binary files /dev/null and b/games/dune/docs/space.png differdiff --git a/games/dune/docs/title.png b/games/dune/docs/title.pngnew file mode 100644index 00000000..b91eeaa0Binary files /dev/null and b/games/dune/docs/title.png differdiff --git a/games/dune/docs/volcano.png b/games/dune/docs/volcano.pngnew file mode 100644index 00000000..8c248920Binary files /dev/null and b/games/dune/docs/volcano.png differ