Python, Lua, or other?

Started by
3 comments, last by Ozymandias43 17 years, 2 months ago
Just hit a point writing my game where it could be beneficial to script game entities and the gui system. The problem I'm having is deciding which scripting language to integrate - Python, Lua, or something else perhaps. I have never used Python or Lua before, so I don't know what each has to offer really. The reason I'm considering scripting is to make it easy to make small changes without the need to recompile the entire game, tweak gameplay, and script behavior into levels with ease. So I was wondering, could someone who has integrated a scripting language into their game perhaps give me some idea of how easy each is to integrate, learn, etc. The game I'm working on is a Tactical Squad based RTS, as I'm guessing game type will hugely matter when it comes to scripting [smile] Anyways, Thanks in Advance!
Adventures of a Pro & Hobby Games Programmer - http://neilo-gd.blogspot.com/Twitter - http://twitter.com/neilogd
Advertisement
www.somedude.net/gamemonkey
Quote:Original post by evolutional
www.somedude.net/gamemonkey


well said, evolutional. :D
EDIT: you might also take a look at the following:
SeeR
+supposed to mimic C in a scripting language
+looks easy enough to use/integrate
-hasn't been updated for a while

or, thanks to a post recently, you could check out
Nasal
+looks fairly easy to use
+lots of nifty features (IMO) such as foreach
+threadsafe
+several useful built-in types(vectors, hashes)

or you could try GameMonkey like evolutional suggested, which I have used before and is fairly easy to use.

hope that helps some,
-Wynter Woods(aka Zerotri)
Lately I've been using Lua for a game project. I've found it easy to integrate with C++ (since it's designed for such) and it's pretty easy to load up and run scripts. That and it has a nice, not too complicated syntax. I'd recommend it it the people who are going to be scripting things aren't particularlly programmatically minded :). If you're using it for something like UnrealScript does and controlling a majority of the gameplay code through the scripts you might want something a bit fuller featured. Object orientation in Lua is a bit sketchy (though it does have some nice features like the : operator), so if you want to build bigger systems you might want to have a look around. I can highly recommend lua though!
----------Little known fact: Tsylatac is Catalyst backwards :).
I'm going to add this, and feel free to ignore it because it may sound like an absurdly bad idea, but I've really been enjoying using Ruby as a game scripting language. It binds pretty easily into C++ apps, it's got a sizable library of useful commands, and it's geared towards very rapid prototyping.

Still, it's not the fastest scripting language in the world, and performance is often a major factor in decisions like this, but as long as you aren't doing complex math with 10000 objects, it shouldn't be too bad.

This topic is closed to new replies.

Advertisement