Simple Scripting Language Advice

This is a discussion on Simple Scripting Language Advice within the C++ Programming forums, part of the General Programming Boards category; I'm looking at extending my current game project with some sort of scripting language, but most of the mainstream ones, ...

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    26

    Simple Scripting Language Advice

    I'm looking at extending my current game project with some sort of scripting language, but most of the mainstream ones, like LUA, would be overkill for this. A script would have access to a single object, and only a few of it's members. Really all it's for is scripting status effects (poison, etc), so all I need is something that allows simple binding of functions specific to an object, and simple script execution.

    I have no experience what-so-ever with scripting, short of some incredibly simple tests with GameMonkey (which doesn't seem to allow the kind of interfacing I would like), so this is likely a stupid request, so I'm open to correction.

    Anyways, what would be the best (read: simplest) scripting engine to use for this?

    Thank you for your time,
    Timothy
    My Dev Blog - The most up-to-date info on my current projects.

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,584
    How is Lua overkill?

  3. #3
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    I absolutely agree with Bubba - Lua is great, and even if it is overkill for what you want to do, there's no reason not to use it.
    I'm pretty sure most scripting language APIs (at least, Python) have functions where all you do is pass a string or a file descriptor, and it gets interpreted. It doesn't get much simpler than that.

  4. #4
    Registered User
    Join Date
    Feb 2009
    Posts
    26
    I can give Lua a shot, but I don't really need that kind of power, and didn't know if there might be a simpler option.

    How well does Lua work with C++ classes and functions in them?

    From a tutorial a quick Google search turned up, registering a function works like this:
    Code:
    lua_register(L, "my_function", my_function);
    I'm assuming registering a class function would be more difficult than:
    Code:
    c_testClass newTest;  //This is assuming c_testClass has already been defined as a class, and has a function called "my_function"...
    lua_register(L, "my_function", newTest.my_function);
    ...

    Any advice for solid tutorials on LUA and C++?

    Thanks again!
    My Dev Blog - The most up-to-date info on my current projects.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reviving my old scripting language.
    By suzakugaiden in forum Game Programming
    Replies: 4
    Last Post: 06-15-2006, 03:02 PM
  2. Languages dying
    By Zewu in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 07-29-2003, 10:08 AM
  3. C Language And A Scripting Language
    By DarkSpy in forum C Programming
    Replies: 9
    Last Post: 06-26-2003, 08:05 AM
  4. How would I go about making a scripting language...
    By gcn_zelda in forum C++ Programming
    Replies: 1
    Last Post: 06-19-2003, 11:43 AM
  5. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 02:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21