Why was lua chosen?

Why was lua chosen?

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Why was lua chosen?

Post by Das Bruce »

A brief attempt at searching gave me nothing and I don't remember the original discussion, so why was lua chosen?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Why was lua chosen?

Post by Argh »

Because I said "use Lua", basically, and enough people agreed with me at the time. One of the coders put the basic functionality into the engine, where it just sat there until Trepan came along.

Ancient history, man, this wasn't long after SJ GPL'd the engine, IIRC.

I think all of this was lost in the Great Forum Wipe, so I guess that means you just have to take my word for it, since very few others from that time are even here now, and we've all slept a few times since then. IIRC, Smoth spoke up for it as well- we were all excited about what Dawn of War and WarC III had done with Lua at the time.

I certainly didn't do anything useful with Lua until years later- for a long time, it was a scrap without any structural support, nothing like after Trepan got done hooking it into Spring, so I helped to beg/whine/plead for some of the tag-forest we have now, which is one of the few things I actually regret doing, but it's a little late now. Maelstrom and a few others played with it, but nobody got very far. It was a non-useful stub feature for quite awhile, basically.

Then Trepan came on board, worked on it for about a year solid, made it actually useful, CA guys really picked up steam, and voila, we're here today.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Why was lua chosen?

Post by aegis »

1
2
3
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Why was lua chosen?

Post by Argh »

You sure you dredged up the right thread? Might want to read a bit more.
Twas discussed before and for various reasons of which I don't recall was rejected.
This went 'round and 'round a bit. But I distinctly remember making a fairly lengthy blog-post about it.

And 2 happened after Lua support was in the engine source, IIRC. So did 3. We had a fairly lengthy time period when it was "available" but nobody could get anywhere with it. Maelstrom wrote some of the earliest stuff, IIRC- new start-scripts.

Oh, here we go.
In my ideal world... I'd like Spring to be:

1. Capable of duplicating most other RTS game designs, including their special features.
2. Graphically competitive with commercial game engines.
3. Easy to make maps with, and easy to mod.
4. Open-Source, or with an SDK that will allow extensions to the core.
5. Able to use text-based scripts to radically change the behavior of the game engine. I'm really heavily voting for Lua support here, because I've used it in Dawn of War and Freelancer... and I think it kicks ass.
Hmm. March, 2005. That list is still pretty much what I'm nattering about today. Glad to know I wasn't hallucinating it, though.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Why was lua chosen?

Post by aegis »

Argh wrote:As usual, the following post just represents my opinions. I am not a member of the Spring team, nor do I claim to speak for them in any way, shape or form. Nothing said here is garanteed to become a part of Spring.
Das Bruce wrote:why was lua chosen?
Argh wrote:Because I said "use Lua", basically
let there be light
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Why was lua chosen?

Post by Argh »

<shrugs> Just sayin', I really was there, doing pretty much what I do now- being obnoxious and thinking about the future out loud, and pushing for things to happen. I still think that essay's valid, although I'd certainly write it differently now.

Never got the N.U.F., of course. That was too big, too early, and I think the original dev crew was worn out by the time Spring pushed through the first release. I am hoping jK's proposed change finally makes that semi-reality, it's been something I've wanted for a very long time.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Why was lua chosen?

Post by Regret »

I like how you are able to make this about yourself.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Why was lua chosen?

Post by Argh »

What can I say? It's a gift.

Seriously, though, it's not about me, beyond the hazy idea that I probably provided some incentive to put it into the engine- I don't know, I wasn't privy to that decision, and I certainly didn't provide specifications or anything. I seriously doubt Trepan knew any of this stuff had happened, when he built Lua into what it became. If he'd had a strong preference for PERL or whatever, we'd be using that, I presume.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Why was lua chosen?

Post by Tobi »

I think all the replies until now at best apply to the tiny, now removed, Lua startscripts.

I think only trepan knows why he made all his bindings (LuaRules, LuaGaia, LuaUI, etc.) in Lua; I don't recall this being discussed ever. It just was there after some commit :wink:

EDIT: whoops, what Argh said in his last post indeed :-)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Why was lua chosen?

Post by Argh »

That's hilarious, Tobi. I would've thought he'd at least talk to you guys about it, plan stuff out, something.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Why was lua chosen?

Post by zwzsg »

Argh wrote:Because I said "use Lua", basically
Argh saw Lua, that it was good. And so Argh spokedth, and there was Lua. :lol:
Tobi wrote:I think only trepan knows why he made all his bindings (LuaRules, LuaGaia, LuaUI, etc.) in Lua; I don't recall this being discussed ever. It just was there after some commit :wink:
Much more realistic explanation: Stuff don't happens after lenghthy discussion careful weighting the pros and cons. Stuff happens when someone goes ahead and code them.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Why was lua chosen?

Post by Argh »

Argh saw Lua, that it was good. And so Argh spokedth, and there was Lua.
Wish it was that easy. More like herding cats up a hill while wearing roller skates.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Why was lua chosen?

Post by AF »

Are we having a simon cowell moment there argh?

Trepan did it in one of his giant uber commits out of the blue, he may have discussed it elsewhere but I never saw it.

Fnordia did it of his own accord too, probably easier to put a lua script in than compile stuff on his TV
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Why was lua chosen?

Post by aegis »

I read most of the dev forum(s) from way back and those topics were really the closest thing I could find to people talking about lua - spring developement really doesn't seem to be as structured/discussed as it could be
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Why was lua chosen?

Post by Forboding Angel »

Argh suggested and did some light arguing for it, then for a while nothing came of it, then trepan came in with "surprise buttsecks (Lua)" and the rest my friends, is history.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Why was lua chosen?

Post by Das Bruce »

Argh wrote:That's hilarious, Tobi. I would've thought he'd at least talk to you guys about it, plan stuff out, something.
All truly good developers know the only way to achieve results is by going dark.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Why was lua chosen?

Post by smoth »

Argh wrote:Because I said "use Lua"
No.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6243
Joined: 29 Apr 2005, 01:14

Re: Why was lua chosen?

Post by FLOZi »

Can't remember who it was that added in the lua startscripts, think it was an SY, maybe Fnordia. I recall a few supporters of lua back when it was discussed, but ultimately that had no bearing on trepan's decision. Possibly the knowledge that supcom was going to use lua or its popularity as a game scripting language at the time, or just because trepan was familiar with it and liked it.

There's also the fact that its eminently suitable for the application.
Post Reply

Return to “Lua Scripts”