Why LUA?
Wavesonics
Join Date: 2006-12-02 Member: 58833Members
<div class="IPBDescription">Why not Squirrel or AngleScript?</div>I am currently investigating Scripting engines for my game, and I discovered a bunch out there:
LUA - <a href="http://www.lua.org/" target="_blank">http://www.lua.org/</a>
GameMonkey - <a href="http://www.somedude.net/gamemonkey/" target="_blank">http://www.somedude.net/gamemonkey/</a>
AngleScript - <a href="http://www.angelcode.com/angelscript/" target="_blank">http://www.angelcode.com/angelscript/</a>
Squirrel (The programming language) - <a href="http://squirrel-lang.org/" target="_blank">http://squirrel-lang.org/</a>
And Squirrel & AngleScript seem quite a bit better than LUA to be honest, so what influenced your decision to go with LUA?
LUA - <a href="http://www.lua.org/" target="_blank">http://www.lua.org/</a>
GameMonkey - <a href="http://www.somedude.net/gamemonkey/" target="_blank">http://www.somedude.net/gamemonkey/</a>
AngleScript - <a href="http://www.angelcode.com/angelscript/" target="_blank">http://www.angelcode.com/angelscript/</a>
Squirrel (The programming language) - <a href="http://squirrel-lang.org/" target="_blank">http://squirrel-lang.org/</a>
And Squirrel & AngleScript seem quite a bit better than LUA to be honest, so what influenced your decision to go with LUA?
Comments
But Beta was still better than VHS <img src="style_emoticons/<#EMO_DIR#>/wink-fix.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink-fix.gif" />
Like, Squirrel has a JIT compiler to native x86! How damn cool is that!
AngleScript is run time compiled to fast byte code, also much easier on the application programming side than LUA.
But I know for a fact that Charley is a brilliant programmer, so I was interested in why he specifically chose it.
LUA - <a href="http://www.lua.org/" target="_blank">http://www.lua.org/</a>
GameMonkey - <a href="http://www.somedude.net/gamemonkey/" target="_blank">http://www.somedude.net/gamemonkey/</a>
AngleScript - <a href="http://www.angelcode.com/angelscript/" target="_blank">http://www.angelcode.com/angelscript/</a>
Squirrel (The programming language) - <a href="http://squirrel-lang.org/" target="_blank">http://squirrel-lang.org/</a>
And Squirrel & AngleScript seem quite a bit better than LUA to be honest, so what influenced your decision to go with LUA?<!--QuoteEnd--></div><!--QuoteEEnd-->
We chose Lua because we know Lua is solid. It's been used in tons of projects (including games) and there's lots of support around it including binding libraries, add-on libraries, patches to mod it, etc. Since our entire game is basically written in Lua (only the engine is C++), we didn't really want to get 75% of the way through the project and discover a fundamental issue with the scripting language.
I briefly considered GameMonkey, but I don't see any real benefit to it over Lua and as far as I know hasn't really been proven. I also considered Python, but ultimately chose Lua because it always wins performance shoot outs. There's also a JIT compiler for Lua btw (LuaJIT).
If I had to make the decision today, I'd also favor Lua because there's a <a href="http://www.unknownworlds.com/decoda" target="_blank">kickass debugger</a> for it! I'd also consider JavaScript in the mix if I was deciding today as well.
I will say that I also spent some time creating a scripting language (not for work, just as a side project) because I thought there were some things I could improve about Lua. After a little bit for effort I came to realize that the way Lua is designed is really great and it's like that for a reason. The only thing I'm not crazy about with Lua is the Pascal-like syntax, but that could be modified quite easily I think (we've made a few changes to vanilla Lua for NS2).
That's what I was looking for. Sorry for assuming Charley made the decision.
Btw, I posted a while back, not sure if you saw it, but I'd be very interested in some of how you implemented your shadowing and volumetric lighting: <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=105253" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=105253</a>
Keep up the good work, it's inspiring to see a small indie team doing some fantastic AAA work.
<!--quoteo(post=1697390:date=Jan 9 2009, 04:32 PM:name=Wavesonics)--><div class='quotetop'>QUOTE(Wavesonics @ Jan 9 2009, 04:32 PM) <a href="index.php?act=findpost&pid=1697390"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Well saying "big companies use it there for it must be good" doesn't cut it for my analytical mind <img src="style_emoticons/<#EMO_DIR#>/wink-fix.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink-fix.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
<!--quoteo(post=1697392:date=Jan 9 2009, 05:10 PM:name=Max)--><div class='quotetop'>QUOTE(Max @ Jan 9 2009, 05:10 PM) <a href="index.php?act=findpost&pid=1697392"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Big companies use it therefore it must be good.<!--QuoteEnd--></div><!--QuoteEEnd-->
<!--quoteo(post=1697393:date=Jan 9 2009, 05:23 PM:name=Wavesonics)--><div class='quotetop'>QUOTE(Wavesonics @ Jan 9 2009, 05:23 PM) <a href="index.php?act=findpost&pid=1697393"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Awesome, thanks for the reply max!
That's what I was looking for.<!--QuoteEnd--></div><!--QuoteEEnd-->
lol.
Thanks Max. <img src="style_emoticons/<#EMO_DIR#>/nerd-fix.gif" style="vertical-align:middle" emoid="::nerdy::" border="0" alt="nerd-fix.gif" />
Wave - That's not what I'm looking for.
Max - Big companies are using it so we're using it too.
Wave - That's what I was looking for, thanks Max.
<img src="http://i217.photobucket.com/albums/cc15/Domining/Emots/emot-psyduck.gif" border="0" class="linked-image" />
Edit: Beaten by a couple of hours, had this window open for a while. XD
Your point was terrible and didn’t require the smart ass response you gave it... Only reason you were right was because a large amount of the industry uses it, no reasons or logical thought process other than follow the leader.
Only Chime in on discussions that you can add value to.
Max, like most of UWE's discussions; a well thought out process went into this. Nice to see this holds true throughout the process.
Yay <img src="style_emoticons/<#EMO_DIR#>/tounge.gif" style="vertical-align:middle" emoid=":p" border="0" alt="tounge.gif" />, BR-power
Well of course I had no logical thought process such as the fact that they've invented an in-house debugging tool to handle it, or that they already have themselves invested to a degree of some depth. I certainly wasn't thinking about how reliable it's proven itself to be in multi-million dollar projects with people whose jobs rest on determining the most effective language frontends.
Clearly the only reason I posted was because I wanted to cheer on the hive mind mentality. Thank you for pointing out my mistake Emanon.
Clearly the only reason I posted was because I wanted to cheer on the hive mind mentality. Thank you for pointing out my mistake Emanon.<!--QuoteEnd--></div><!--QuoteEEnd-->
Pure gold.
Thanks for spreading the word about AngelScript. It's greatly appreciated.
Hopefully one day AngelScript will obtain the same widespread use as Lua.
<!--quoteo(post=0:date=:name=goblin)--><div class='quotetop'>QUOTE(goblin)</div><div class='quotemain'><!--quotec-->Lua is from my country <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
AngelScript is also from Brazil. <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" />
---
When choosing a scripting library that is going be a major part of your product you have to choose carefully. And when millions of dollars is at stake you have to try to eliminate as many unknown risks as possible. For that reason alone I believe Max made a wise choice when going for Lua.
I humbly believe AngelScript has more potential than Lua, but it has not reached the same maturity yet, and probably won't do so for several years. It is already used by developers all over the world, but there is still many more features that I need to implement.
Regards,
Andreas
PS. I look forward to playing NS2.
Clearly the only reason I posted was because I wanted to cheer on the hive mind mentality. Thank you for pointing out my mistake Emanon.<!--QuoteEnd--></div><!--QuoteEEnd-->
Good points, glad you thought things out. Just wish you had the maturity to post this previously and in a way not to belittle anyone.
I briefly considered GameMonkey, but I don't see any real benefit to it over Lua and as far as I know hasn't really been proven. I also considered Python, but ultimately chose Lua because it always wins performance shoot outs. There's also a JIT compiler for Lua btw (LuaJIT).
If I had to make the decision today, I'd also favor Lua because there's a <a href="http://www.unknownworlds.com/decoda" target="_blank">kickass debugger</a> for it! I'd also consider JavaScript in the mix if I was deciding today as well.
I will say that I also spent some time creating a scripting language (not for work, just as a side project) because I thought there were some things I could improve about Lua. After a little bit for effort I came to realize that the way Lua is designed is really great and it's like that for a reason. The only thing I'm not crazy about with Lua is the Pascal-like syntax, but that could be modified quite easily I think (we've made a few changes to vanilla Lua for NS2).<!--QuoteEnd--></div><!--QuoteEEnd-->
lua is great, far cry used it and garry mod.
but im a but im be on edge about virus.
garry mod have one of them, the problem is, if you join a server, you never know what lua script the server is using.