'Best' Scripting language?
There are number of scripting languages out there. Ones that I've looked into a bit are 'Python' and 'Lua'.
I'd like to add an event scripting engine into a wargame. I'm curious about what scripting language is 'better'?
This will be used both as a general purpose event language and possibly for evaluating the AI position and orders.
If this has been discussed elsewhere, please feel free to send me to a reference.
Thanks.
Lua's supposed to be easy to interface to C, so if your app is written in C or C++ then that's a bonus. The ideal way to handle it would be to build a binding layer that exposes your game's api but doesn't depend too heavily on what language you bind it with. Then if you go with one language and don't like it, you have the option of moving to another without a crazy amount of retooling.
Personally, of the two I'd choose Lua because of my C/C++ background. I haven't read much about python, but I think it cares too much about whitespace. That's a big turnoff for me.
Personally, of the two I'd choose Lua because of my C/C++ background. I haven't read much about python, but I think it cares too much about whitespace. That's a big turnoff for me.
If you consider the Python in C++ route, do look at the boost.python library to help in binding. That could be a deal maker right there.
Python is a much larger language than Lua. If you are going to do some serious work in your scripts, it may be worth it. If you are just using them for simple stuff, it would probably be overkill.
Another option is Game Monkey Script. It's easier to interface to C than either Lua or Pyhton (at least by hand).
Another option is Game Monkey Script. It's easier to interface to C than either Lua or Pyhton (at least by hand).
I'd recommend looking at Angelscript. It's not nearly as widespread or (potentially) as stable as Lua, but I hope its userbase grows. 3 things I like about it:
1. Easy to integrate into your engine
2. Fast
3. Syntax is almost identical to C++, meaning anyone who has used C, C++, Java, javascript, Actionscript, Perl, or C# can adapt quickly to using it.<br><br><br>http://www.angelcode.com/angelscript
1. Easy to integrate into your engine
2. Fast
3. Syntax is almost identical to C++, meaning anyone who has used C, C++, Java, javascript, Actionscript, Perl, or C# can adapt quickly to using it.<br><br><br>http://www.angelcode.com/angelscript
Quote: Original post by Simian Man
Python is a much larger language than Lua. If you are going to do some serious work in your scripts, it may be worth it. If you are just using them for simple stuff, it would probably be overkill.
Another option is Game Monkey Script. It's easier to interface to C than either Lua or Pyhton (at least by hand).
Thanks. The scripting will be user accessable, so it's potentially going to be extensively used. I haven't been able to find anything reliable about interfacing to Lua, and AngleScript is too noew for me, so it looks like it will probably be Python.
Thanks all,
Ralph
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement