Perentie logo, featuring the smiling head of Petra the monitor lizard, next to the name in a futurist pixel font.

Perentie is a Lua-based graphical adventure game engine. The design is heavily inspired by LucasArts' SCUMM and GrimE adventure game engines.

Perentie is designed for the hardware constraints of Pentium-era MS-DOS. You can run it in any of the following environments:

  • MS-DOS, including as a child process from inside Windows 3.1/95/98
  • Natively on most platforms (via SDL3)
  • Embedded in a webpage (via SDL3 + Emscripten)

Featuring:

  • Lua-based scripting API
  • Co-operative threading
  • 320x200 resolution 256 colour VGA graphics
  • Programmable dithering engine (convert your graphics to EGA and CGA!)
  • Bitmap text rendering with support for UTF-8
  • PC speaker tone/sample playback
  • OPL2/OPL3 music playback
  • Debug shell over null modem/Telnet connection

Perentie was originally created for DOS Games Jam July 2024.

Download

You can obtain the latest version from the releases page.

Documentation

For general information about engine concepts, check out the Perentie guide.

For information about the Perentie Lua scripting API, check out the Perentie API docs.

Please check out the example game, Maura and Ash, along with the full source code

Compiling

In order to build Perentie, you will need the following tools in your PATH:

MS-DOS executable

You will also need:

source /path/to/djgpp/setenv
meson setup --cross-file=i586-pc-msdosdjgpp.ini build_dos
cd build_dos
ninja

SDL executable

You will also need:

  • A POSIX-compatible C compiler toolchain, such as GCC or Clang.
  • SDL3
meson setup build_sdl
cd build_sdl
ninja

For better debugging, you will probably want to turn off optimisation and turn on AddressSanitiser.

meson setup -Doptimization=0 -Db_sanitize=address build_sdl

It is possible to build Perentie for Windows using MSYS2. I haven't tried building it -in- Windows, but I was able to cross-compile from Linux using quasi-msys2 after installing the sdl3 package.

source /path/to/quasi-msys2/env/all.src
meson setup build_msys2
cd build_msys2
ninja

WebAssembly

You will also need:

  • Emscripten 4.0.4 or later
meson setup --cross-file=wasm32-emscripten.ini build_wasm
cd build_wasm
ninja

You will need to package your entire game contents into a single data.pt file, and store it in the same directory as the WebAssembly build.

../scripts/pack.py data.pt ../my_game/*.lua ../my_game/assets

To test the WebAssembly version locally, the following command will start a Python webserver:

ninja webserver

Documentation

You will also need:

ninja doc
ninja guide

Third-party

Perentie wouldn't be possible without the following third-party components:

In addition, Perentie incorporates code and algorithms from the following projects: