View Full Version : ClanLib Lua Bindings
rboehme
01-05-2008, 03:21 PM
Hi there. I want to use ClanLib in Lua. I've found references to a Lua binding for ClanLib called clanLua, and indications that it uses a library or program called 'tolua' to translate the ClanLib header files into Lua.
Does anyone know where to get current (0.80) versions of these, or if there is a better or supported Lua binding for ClanLib?
Magnus Norddahl
01-09-2008, 06:41 PM
clanLua is an old abandoned project - clanlib has no direct lua support today.
In general you do not really want ClanLib lua bindings for game scripting. A game scripting system rarely want to do something as "low level" as manual screen drawing, and so doesn't require to call clanlib objects directly.
The approach used by most games is to have some higher level objects, which are exported to lua. If we take World of Warcraft as an example of this, their lua API looks like this:
http://www.wowwiki.com/World_of_Warcraft_API
As you can probably see, none of those functions deal with direct game drawing. When lua scripts do need to draw things on screen, such as for UI stuff, the approach is to make abstract objects (like the Widget API in WoW), which then as a result of the lua scripting performs the actual rendering.
rboehme
02-02-2008, 01:48 PM
OK, so what I do is I do low level stuff using C++ and then create an API to interface objects to Lua.
Is that correct?
Also, where can I find clanlib examples (title screen, object movement and collision, etc.)?
hi~~,when yesterday i was ready to make the lua edition for clanlib,i named it just as "clanlua". It is an accident:D.I think i should give it another name now.
madmark
02-28-2008, 01:12 PM
OK, so what I do is I do low level stuff using C++ and then create an API to interface objects to Lua.
Is that correct?
Also, where can I find clanlib examples (title screen, object movement and collision, etc.)?
I hate to be like this, but you could get my book...
http://www.amazon.com/Game-Development-LUA/dp/1584504048
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.