[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: [ANN] Lua for Adventure Game Studio
- From: Duncan Cross <duncan.cross@...>
- Date: Thu, 8 Oct 2009 20:04:55 +0100
Adventure Game Studio , or AGS, is an IDE for creating 2D
point-and-click adventure games in the mould of 1980s-90s
Sierra/LucasArts titles like Monkey Island and the Space Quest series.
It is available at no cost but is closed-source, and can be used to
create freeware games, or shareware/commercial games subject to some
considerations . The AGS Editor is itself only officially developed
for Windows - while there are third-party projects around that allow
games created with AGS to be played on MacOS  and Linux , they
do not currently support plugins.
AGS has its own statically-typed, C-like language for scripting game
functionality, which I refer to as "AGS-Script" (that's not an
official name, I don't think there is one).
Lua For AGS  is an experimental AGS plugin I have been developing.
I'd say it's just about at beta status by now. It allows AGS-Script
code to run Lua scripts, call Lua functions and get/set Lua variables,
and allows Lua code to call AGS functions and methods on AGS objects.
It also provides a Scintilla based Lua script editor, and basic script
management, integrated into the AGS IDE. The Lua state is
automatically serialized and deserialized in AGS save game files.
The API presented to manipulate Lua from AGS-Script is not the full,
low-level C API, but a much simplified abstraction. For example,
calling a Lua global function is achieved like this:
LuaValueList* lparams = Lua.NewValueList();
lparams.Add(Lua.StringValue("Hxllo, and wxlcomx"));
LuaValueList* lresults = Lua.Call("string.gsub", lparams);
String result = lresults.AsStrings;
Internally, "LuaValueList*" objects are just specially-managed tables.
(I am not opposed to providing the low-level API as well, eventually,
but it is not a high priority at the moment.)
Any comments and feedback appreciated. I probably won't bring this up
again here but I thought I'd post about it in case anyone is