Jump to content
  • Advertisement
Sign in to follow this  
swinchen

Script engine choice.

This topic is 4677 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, Let me start by saying: I don't know any script type language (except a little bash). So I am wondering what are some good choices to use for a scripting engine in a game. So far I am looking at Lua, Python and Game Monkey Script.

Share this post


Link to post
Share on other sites
Advertisement
Thanks, I will check it out. What sort of features should I be looking for (or avoiding)? I obviously want it to have bindings to C++ seeing that is what I am using. Other than that I am not really sure what to look for.


Thanks.

Share this post


Link to post
Share on other sites
That's the kind of thing that you need to answer. Do you prefer a C like syntax, or do you not mind something more exotic? Do you want something with a small footprint or would you want something more powerful but maybe a little more bulky? What kind of language features do you want? Co-routines? Classes? Ability to write functions without classes? Reflection/introspection? Do you have speed requirements? How much work are you willing to do to integrate the language?

Share this post


Link to post
Share on other sites
I've used Lua in the past and have been happy with it. There's an article here at gamedev that will give you a intro to using it. Make sure you read the comments related to the article here as the article describes an older version of lua, and a minor change needs to be made to the code to get it working with the latest version of lua.

I've also heard good things about python but haven't gotten around to looking at it yet (need more free time).

Share this post


Link to post
Share on other sites
re SiCrane:

I should probably look into some scripting setup, but have not due to... a bit of laziness and a bit of 'not made here'...

I'd be interested in hearing the answer for something that is easy to integrate with C++ and get working, preferably with C-style syntax, power over footprint,
speedy enough [no speed requirements beyond practicality], and some sort of introspection would be gravy.

Mainly though, I'm looking for something that is exceptionally well documented, and easy to get working, so I don't get fed up with it.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
That's the kind of thing that you need to answer. Do you prefer a C like syntax, or do you not mind something more exotic? Do you want something with a small footprint or would you want something more powerful but maybe a little more bulky? What kind of language features do you want? Co-routines? Classes? Ability to write functions without classes? Reflection/introspection? Do you have speed requirements? How much work are you willing to do to integrate the language?


Ahhhh! So many questions.

Syntax... I guess it doesn't matter too much. It might be better if it isn't C style, just for the learning experience. Although I would like a syntax that clean, and consistent.

Size isn't too big of a concern, as long as it is somewhat speedy.

I had to look up Co-routines on wikipedia. I have no idea how I would use them, or even how useful they are (I am sure they are useful... )

Reflection - Same as Co-routines

Introspection?

Speed - I want it to be fast enough to use in any type of game that is heavily scripted.

I want to be easily integrated into C++.



Co-routines through Introsepction threw me. lol. I guess they aren't things you run into in C/C++?

Share this post


Link to post
Share on other sites
Well I think I am going to eliminate Python from my list. It looks like it is pretty difficult to integrate. So that is good... down to three choices.

In order of what I am thinking:
Lua
GameMonkey Script
AngelScript


These three look really easy to integrate.

Share this post


Link to post
Share on other sites
I'm going to go for AngelScript in my next project.. It has very C-ish syntax, is very easy to integrate and seems powerful..

I would _really_ like to see some benchmarks though.. Maybe I can find one in the scripting forum, or the AngelScript one..

Share this post


Link to post
Share on other sites
Actually, I'd say that Python isn't that difficult to integrate into C++ program if you use boost::python (http://www.boost.org/libs/python/doc/index.html). The learning curve isn't that bad. I had a simple application integrating python up within a couple of days. Once you've learned how boost::python works, it's really easy to export new functions and classes to the scripting language.

Just something to consider, if you weren't aware of that already.

LUA is quite good too though. I found LUA to be much easier to understand and use than python without boost::python.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!