Puzzlescript for Sega Master System
PuzzleScript
Open Source HTML5 Puzzle Game Engine — with a Sega Master System ROM exporter.
Github repository: https://github.com/haroldo-ok/puzzlescript-sms
Try the upstream engine at https://www.puzzlescript.net.
Running it locally
PuzzleScript is a static site — it just needs to be served over HTTP (opening the files with file:// won't work because the browser blocks some requests).
- Start a web server in the project root.
- Windows: double-click
runserver.bat(it prints your IP and startspython -m http.serveron port 8000). - macOS / Linux: run
python3 -m http.serverin this folder.
- Windows: double-click
- Open the editor. Browse to http://localhost:8000/ — the root
index.htmlautomatically redirects to the editor atsrc/editor.html.Previously the server showed a bare directory listing because there was no page at the root; the redirect fixes that. If you still land on a file list, go straight to http://localhost:8000/src/editor.html.
That's it — you can now write, run and share games in the browser.
If you're interested in recompiling / modifying / hacking the engine, there is development setup info here. To learn how to make games, the documentation is here.
Exporting to Sega Master System
This fork adds two buttons to the editor toolbar:
- EXPORT SMS — builds a Sega Master System ROM and downloads it as a
.smsfile. Run it in any SMS emulator (Emulicious, Meka, RetroArch with Genesis Plus GX / SMS Plus GX) or on real hardware. - PLAY SMS — builds the same ROM and launches it immediately in an embedded emulator (EmulatorJS) in a new tab, with no download. The ROM is passed in memory; only the emulator runtime is streamed from EmulatorJS's CDN, so this button needs an internet connection. (Offline? Use EXPORT SMS instead.)
Each PuzzleScript object (a 5x5 sprite) is scaled up to a 16x16-pixel tile, so a level of up to 16x12 cells fills the 256x192 screen. The ROM contains a generic PuzzleScript runtime written in Z80 C; your game's compiled rules, graphics and levels are appended as data. Full details, limits and the build instructions for the runtime are in sms/README.md.
Command-line export (no browser):
node sms/tools/export_cli.js src/demo/microban.txt microban.sms
| Status | Released |
| Category | Tool |
| Platforms | HTML5 |
| Rating | Rated 5.0 out of 5 stars (1 total ratings) |
| Author | haroldo-ok |
| AI Disclosure | AI Assisted, Code |



Comments
Log in with itch.io to leave a comment.
Hi Im making 2 games with this its so easy and fun thanks!! I dont know how similar this is but https://dungeonscript.farbs.org/editor.html makes puzzlescript in 3d... not sure if that would work for sms.. i did make a puzzlescript to msx game PuzzleScript on MSX | MSX Resource Center before so you'd know more than me what is possible (c64 conversion heheh)! keep on gaming :)
Thanks, it's cool to see people making games for Puzzlescript4SMS!
That Puzzlescript to MSX is pretty awesome, too!
Maybe Dungeonscript could be used to make first person dungeons for Sega Master System as long as they are implemented in a flick screen style.
couldnt make sms games without your software !! thanks!
Thanks! Glad to be of help!
Thank you! https://zartan917.itch.io/sega-master-system-double-feature
Congratulations!!
this works great! Im trying to see "Compiler Support: If your specific version of the PuzzleScript-SMS fork includes an integrated MML-to-SN76489 compiler, then yes, any valid MML code you include in your project file will be translated into machine code and packed into the final
.smsfile during the export process." way to add some 8 bit music?!Nice idea! I'll take a look at it later
thank you! Keep retro platforms alive! :) https://raidersoftheradar.com/
Many thanks!
Twoje narzędzie wygląda ciekawie, mam zamiar spróbować. A jakie gry konkretnie można w nim robić?
Here's a gallery of Puzzlescript games:
https://www.puzzlescript.net/Gallery/index.html