Perentie is a Lua-based graphical adventure game engine for DOS. The design takes several cues from LucasArts' SCUMM and GrimE adventure game engines.
The design is still work-in-progress, however a lot of the base functionality has been implemented. Try it and see!
Featuring:
- Lua-based scripting API
- Co-operative threading
- 320x200 256 colour VGA graphics
- Bitmap text rendering with support for UTF-8
- Debug shell over null modem/Telnet connection
Perentie was originally created for DOS Games Jam July 2024.
In order to build Perentie, you will need the following tools in your PATH:
- A copy of the DJGPP cross-compiler toolchain, such as from https://github.com/andrewwutw/build-djgpp
- lua and luac version 5.4
- GNU make
Running make all in the src directory should be enough to compile the single DOS EXE file perentie.exe.
Perentie supports exactly one image format: PNG. Speifically, PNGs in 8-bit indexed or grayscale format.
Don't worry too much about palettes; Perentie will keep a running tab of all the colours used and convert your graphics for the target hardware.
You can convert a normal PNG to 8-bit with ImageMagick:
magick convert source.png -colors 256 target.png
Perentie includes a built-in Lua shell, accessible over a COM port via a null-modem connection. For DOSBox Staging users, all that's required is to add the following line to your dosbox.conf:
[serial]
serial4 = nullmodem telnet:1 port:42424
When the engine is running, you can connect to the shell on port 42424 using a Telnet client:
$ telnet localhost 42424
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
┈┅━┥ Perentie v0.6 - Console ┝━┅┈
Lua 5.4.7 Copyright (C) 1994-2024 Lua.org, PUC-Rio
>> PTVersion()
"0.6"
>>
Calls to Lua's print function will display the output in the debug shell.
Perentie wouldn't be possible without the following third-party components:
- DJGPP - port of GNU development tools to DOS
- CWSDPMI - DPMI extender for DOS protected mode
- Lua - embedded scripting engine
- miniz - zlib/DEFLATE library
- libspng - PNG image library
- BMFont - bitmap font packer and atlas format
- The Ultimate Oldschool PC Font Pack - pixel fonts
- inspect.lua - human-readable object representation for Lua debugging
In addition, Perentie incorporates code and algorithms from the following projects:
- PCTIMER - high-frequency timer interrupt replacement
- LoveDOS - framework for making 2D DOS games with Lua
- ScummVM - engine for playing narrative-based games
- Reality Adlib Tracker - OPL3 music tracker/player