RPG creator - Level editor & NPC scripting editor

Overview of Level & script editors

This is a prototype 2D RPG game making program. Tested on PC and Android. The program features a level editor and a script editor. NPC routines are written in the scripting language Lua. A Lua interpretor, MoonSharp runs the NPC routines.

Lua code interacts with AI state through a simple API. Before the script is executed for that cycle, the NPC pushes its health, position etc. values to global variables in the Lua context. Once the script has finished executing, these values are copied back over. The script editor is accessible by selecting an NPC in the level editor and then clicking on its script name. The script editor features an error checker.

The level editor features box selection and pasting, multiple visual layers to simulate different heights, lighting and NPC placement.

The entire rendering process is done in a single shader. The shader is responsible for looking up tile offsets (supplied as a texture uniform), animating characters and placing characters at the correct depth.

[More content, video soon]