Results 1 to 5 of 5

Thread: ClanLib Lua Bindings

  1. #1
    Peasant
    Join Date
    Jan 2008
    Posts
    9

    Default ClanLib Lua Bindings

    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?

  2. #2
    Master Sorcerer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    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.

  3. #3
    Peasant
    Join Date
    Jan 2008
    Posts
    9

    Default

    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.)?

  4. #4
    Serf
    Join Date
    Feb 2008
    Posts
    1

    Default

    hi~~,when yesterday i was ready to make the lua edition for clanlib,i named it just as "clanlua". It is an accident.I think i should give it another name now.

  5. #5
    Lesser Knight
    Join Date
    May 2007
    Posts
    46

    Default

    Quote Originally Posted by rboehme View Post
    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-Developme.../dp/1584504048

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •