Skip to content
TimGoTheCreatorPublic

About

a reimplementation of GML in c++, currently tested against UNDERTALE. (experimental, crashes alot)

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

reGML

GameMaker VM runner in C++20

Bytecode 15 and 16, no YYC support

Tested with Undertale on Windows and with the Wii U build in Cemu 2.6 Linux builds are checked in CI

Compatibility is incomplete, no full playthrough verified Wii U hardware is untested and particle effects are slow

Build

Requires C++20, CMake 3.24+, libpng, zlib, libvorbisfile and SDL2

Windows

.\tools\build.ps1 -Configuration Release -Test

Dependencies default to the compiler's toolchain prefix Use -DependencyPrefix <path> for PNG, Vorbis and zlib, and -SdlPrefix <path> for SDL2 Use -NoVideo for a headless build

CMake

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
ctest --test-dir build --output-on-failure -C Release

For headless builds, add -DREGML_SDL2=OFF when configuring

Run

.\build\direct\regml.exe run 'C:\path\to\data.win'

Keep external audio files in the same directory as data.win Game files are not included

The PowerShell build outputs build/direct/regml.exe CMake outputs build/regml, build/regml.exe or build/Release/regml.exe

For 4x speed:

.\build\direct\regml.exe run 'C:\path\to\data.win' --speed 4x

--speed accepts values from 0.01 to 1000, with an optional x suffix Hidden and headless runs have no frame delay

Wii U

Install devkitPro and run these in its MSYS2 terminal Run the build commands from the repository root

pacman -Syu
pacman -S --needed cmake ninja wiiu-dev wiiu-sdl2 ppc-libpng ppc-libvorbis

/opt/devkitpro/portlibs/wiiu/bin/powerpc-eabi-cmake -S . -B build-wiiu -DCMAKE_BUILD_TYPE=Release -DREGML_WIIU=ON -DBUILD_TESTING=OFF
cmake --build build-wiiu --config Release

Outputs: build-wiiu/regml.rpx and build-wiiu/regml.wuhb

SD card

Put data.win and external audio files in sd:/reGML/

  • Aroma: copy regml.wuhb to sd:/wiiu/apps/reGML/ and launch with Homebrew on Menu
  • Tiramisu: copy regml.rpx to sd:/wiiu/apps/reGML/ and launch with the Homebrew Launcher

Saves: sd:/wiiu/apps/reGML/saves/

Cemu

Tested with Cemu 2.6

  1. Put data.win and external audio files in sdcard/reGML/ inside the Cemu directory
  2. Configure a Wii U GamePad in Input settings
  3. Enable TV audio in General settings > Audio
  4. Open build-wiiu/regml.wuhb through File > Load
Controller GML key
D-pad Arrow keys
A Z
B X
X / Y C
Start Enter

Trace logs and input scripts: docs/wiiu.md

Tools

.\build\direct\regml.exe inspect 'C:\path\to\data.win' --code --strings
.\build\direct\regml.exe audit 'C:\path\to\data.win'
.\build\direct\regml.exe disasm 'C:\path\to\data.win' 0 --linked

Tests

Undertale regression checks:

.\tools\test-undertale.ps1 -DataFile 'C:\path\to\data.win'

Audio decoding, mixing and collision mask checks:

cmake -S . -B build/audio-test -DREGML_UNDERTALE_DATA='C:\path\to\data.win'
cmake --build build/audio-test --config Release
ctest --test-dir build/audio-test --output-on-failure -C Release

Audio tests do not check playback through a physical output device

Contributing

Include the game version, reproduction steps and error output in bug reports Keep runtime fixes general to GameMaker Build and run the relevant tests before submitting changes

Do not commit game files, extracted assets, saves or screenshots

Screenshots

Undertale on desktop

Undertale running in reGML on desktop

Asriel encounter running in reGML on desktop

Asriel encounter running in reGML on desktop

Undertale with the Wii U build in Cemu

Undertale running in reGML's Wii U build in Cemu

About

a reimplementation of GML in c++, currently tested against UNDERTALE. (experimental, crashes alot)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages