DEVELOPER NOTES
Game engine and testing
The repository contains two related but separate implementations: a TypeScript browser game and a native-C 3DS port.
Browser rules engine Web only
The web game's engine is platform-independent TypeScript. It uses deterministic 60 Hz ticks and seeded random numbers. A run can be reproduced from its seed and input log. The engine is separated from rendering so tests can inspect board state without a browser canvas.
The standard ruleset pipeline is:
piece source → settle → transform → match → expand → clear → settle againRulesets select their own piece source, matcher, gravity model, transform, clear expansion, attack behavior, and objective. Gravity variants include row-shift, cascade, paired, bonded, and sticky. The replay helpers can reconstruct runs and compare state hashes.
Web project map Web only
Origanal/src/core/— board, engine, random generator, matchers, gravity, expanders, transforms, pieces, scoring, and replay.Origanal/src/business/— bosses, jobs, styles, wages, shop items, and investments.Origanal/src/overworld/— worlds, levels, goals, route maps, and progress.Origanal/src/story/— dialogue and how-to text.Origanal/src/game/— screen flow, input, rendering, sound, and audio.Origanal/src/crates/— Warehouse rules and room maps.Origanal/test/— Vitest coverage.
Native C implementation 3DS only
The 3DS port maintains a separate platform-independent C gameplay library in 3DS-Port-v2/src/game.c and game.h, plus Warehouse rules in warehouse.c. The hardware app in main.c handles Citro2D/Citro3D rendering, screen input/touch, save data, and CSND audio. Campaign routes and simplified mode mechanics are implemented in that C code; it does not link the web TypeScript engine.
Tests and build checks
Web project Web only
npm test
npm run build
npm run verify
npm run roomsnpm test runs unit tests. npm run verify builds and drives the game headlessly with Playwright, validates assets and pixel output, and captures screenshots. npm run rooms checks the Warehouse solutions and can search for shortest solutions.
3DS port 3DS only
cmake -S . -B build-host
cmake --build build-host
ctest --test-dir build-host --output-on-failureThe CMake host build runs the native gameplay tests without 3DS hardware libraries. A devkitPro cross-build produces CIA and 3DSX deliverables.
Development-only behaviors
Web only The browser project contains a developer mode activated by a title-screen cheat sequence. It can win levels from the map or pause menu and is intended for testing, not ordinary play.
3DS only The native port includes hidden input chords for resetting save data from the title and immediately winning a level. They are intentionally not presented as normal gameplay controls. See Controls and menus.
Feature accuracy note
This wiki describes implemented behavior at the time it was written, based on the repository README and source. The Web and 3DS editions evolve independently; when a behavior matters for a specific build, check that edition's source and run its tests.