59.9ticks per second
The Playground cartridge's observed game rate in the emulator, against a target of 60.
Preview them in the browser, then build a real .nds ROM. Both run the same compiled ES5 script.
Click the console to play with your keyboard.
This is the inserted cartridge's real source. Edits compile in your browser under the same ES5 rules as the command-line build, then run on the console above.
The TypeScript compiler runs on your computer. What reaches the console is plain ES5 text, run by your browser on this page or by the Duktape interpreter inside the ROM.
main.ts
Your game: one global TypeScript script.
tsc
Type-checks against ES5 and the SDK. Imports, Map and Promise are rejected here.
game.js
0 bytes of ES5 for the cartridge in the console.
script_gen.h embeds the same bytes as a C array..nds ROM inside Docker.melonDS 0.9.3 libretro core
59.9ticks per second
The Playground cartridge's observed game rate in the emulator, against a target of 60.
82KiBJavaScript heap
Shown by the ROM's own HUD, out of a 512 KiB budget.
0512 KiB
13.29msof a 16.7 ms frame
update 0.91 msdraw 12.38 ms
660.5Hzjump tone
Measured from captured audio. The script asked for 660 Hz.
3frames from tap to orb
A tap on the touchscreen relocates the orb within three emulated frames.
A second ROM changed only the movement multiplier from 2 to 3. Holding right for 30 ticks moved the orb 90 pixels instead of 60, and every native source hash stayed the same.
These figures describe the Playground cartridge in an emulator. Physical hardware has not been verified yet, and the other three cartridges have not been measured in an emulator.
Every game gets one global object, nds. Its full declarations live in sdk/index.d.ts.
nds-ts is a small 2D engine prototype. These are the edges you will meet first.
Map, Set or Promise.You need Node.js 22.12 or newer. ROM builds also need Docker, which runs a pinned BlocksDS image with networking turned off.
Clone the repository and install the locked dependencies.
Opens the browser preview at port 5174.
Writes build/nds-ts-demo.nds for an emulator or flashcart.
Point the same build at your own script.
$ git clone https://github.com/jiwonMe/nds-ts.git
$ cd nds-ts
$ npm ci
$ npm run dev
$ npm run build
$ npm run build -- examples/hinge-breakout/main.ts