Hasty Briefsbeta

Bilingual

Show HN: Rewriting Scratch 3.0 from scratch in Lua (browser-free native runtime)

6 months ago
  • #GameDevelopment
  • #Scratch
  • #LÖVE
  • ScratchLove is a native reimplementation of the Scratch 3.0 runtime in Lua for the LÖVE framework, designed to overcome browser limitations.
  • It supports a wide range of platforms including desktop, mobile, embedded Linux systems, gaming consoles, and handheld gaming devices.
  • Features include full Scratch 3.0 compatibility, cross-platform support, high performance via LuaJIT, IR-based compiler, and optimization passes.
  • Additional features: lazy loading, automatic cleanup, visual effects, SVG rendering, and color-based collision detection.
  • Limitations: Only the Pen extension is supported; lacks user input, microphone input, and full cloud variables support.
  • Installation requires LÖVE 11.x and optionally LuaJIT for running tests.
  • Usage includes running with local .sb3 files, Scratch project IDs, or drag & drop functionality.
  • ScratchLove leverages LÖVE's cross-platform capabilities for distribution to Windows, macOS, Linux, Android, iOS, and handheld devices.
  • Project structure includes directories for compiler, VM, renderer, pen, audio, loader, parser, UI, utils, resvg, tests, and lib.
  • Development tips include running in debug mode, skipping compilation, and using timeouts for testing.
  • Contribution guidelines emphasize type annotations, testing, documentation, and code style.
  • License: GNU Affero General Public License v3.0 (AGPL-3.0).
  • Acknowledgments to TurboWarp, Scratch Team, LÖVE, and contributors.