LuaVerge Tutorial

wherein Kildorf tries to explain how to build games with Lua and Verge3 to the unwashed masses


Verge3 is a 2d game engine. Its main focus is to make it easier to create 2d RPGs, similar to games from the Super Nintendo era of gaming (or earlier). It has since been proven to be usable for other kinds of games. Fairly recently, the ability to use Lua to script Verge games was added. Unfortunately, we still lack a great deal of documentation - so far it's basically been a matter of "use Lua but uh you know also VergeC" which isn't very helpful or fun.

I, Kildorf, have been working on a Verge game for more years now than I like to count. When the ability to use Lua was added, I decide to jump in headlong and figure out how it worked, since I had been using Lua for other projects before then and I was reasonably familiar with VergeC. It also helps that I have access to bugfix in the main source of Verge so I could fix things as I found problems.

So anyway, the end of the story is that it's about time we actually told people how to use this thing. This is my attempt.

As you can see by the incomplete table of contents below, I'm still working on this tutorial. If you have any suggestions or questions or whatever please contact me at speveril@gmail.com. Also, I will be posting updates to my page (http://www.gearleaf.com/) as I work so if you keep an eye out there then you will know when it is updated.

Lastly, in case this gets mirrored other places (please let me know if you want to do this), the original and most-up-to-date version is available at http://www.gearleaf.com/docs/LuaVerge/


Table of Contents

  1. Setting up your workspace
  2. [ Loading a map, adding a player entity ]
  3. [ Blits, loops, UpdateControls/Render/ShowPage ]
  4. [ Trigger events on map zones and entities ]
  5. [ Using maped ]
  6. [ Persistent blits - Sprites, HookRetrace ]
  7. [ Fonts, string printing and handling ]
  8. [ HookKey, building menus ]
  9. [ Sounds and music ]
  10. [ Building a Dragon Warrior style battle system ]
    1. [ First steps - switching to battle mode, data models ]
    2. [ Putting everything on the screen, attacking monsters ]
    3. [ Other abilities, monsters attacking back, gaining XP and levels ]

Tutorial History


Miscellaneous Stuff

Written by Shamus "Kildorf" Peveril.

This tutorial is in a working state, as are the engine and libraries that it describes. It may be full of errors, false information, and outright lies. I try to make sure that it isn't but I can't make promises, you know?