Jump to content
Sign in to follow this  
idl0r

Lua instead of SQF/SQS

Recommended Posts

I'd suggest to use Lua or something else in future ARMA games.

I don't like Lua tbh but Lua would be *much* better than the current SQF/SQS stuff. I think both sides would benefit from it. You can do a lot more than currently possible and at least Lua is also portable.

Share this post


Link to post
Share on other sites

I have no idea what you're talking about and I'm too lazy to google it.

Share this post


Link to post
Share on other sites

I also don't understand what this dude is on about and how exactly LUA will give ArmA2 engine more possibilities than devs themselves.

As well as what he means by "portable" either

Share this post


Link to post
Share on other sites
I have no idea what you're talking about and I'm too lazy to google it.

Well for the effort you put into saying that you could have more easily Googled it :D ;)

I don't know whether I dreamed it, but I swore I once saw some LUA activity in VBS2 trying to get some DCS action in it. Maybe the other way around, maybe it was just a PoC discussion (I was somewhat dabbling in VBS2 at the time).

---------- Post added at 01:37 PM ---------- Previous post was at 01:36 PM ----------

I also don't understand what this dude is on about and how exactly LUA will give ArmA2 engine more possibilities than devs themselves.

As well as what he means by "portable" either

Maybe portable isn't the main value LUA could bring, but certainly inter-app crossover. Imagine DCS interfacing via LUA with VBS2/ArmA2.

Share this post


Link to post
Share on other sites

...but Lua would be *much* better than the current SQF/SQS stuff.

Why is that?

Share this post


Link to post
Share on other sites

I think it's a pretty typical knee-jerk reaction to encountering SQF for the first time. Its syntax is peculiar and this lends it a sort of 'home-made' quality, I know when I started with it I'd have much preferred something more familiar. However having used it for a while I have a lot of respect for its consistency and speed of execution, I suspect something like Lua might even be a bit sluggish by comparison. Many's the time in my day job now I wish I could just [] Spawn {... things.

Share this post


Link to post
Share on other sites

portable = runs on windows as well as linux and other systems...

I don't care about GTA or any scriptkiddies at all..

Lua has a better syntax and way more functions/capabilities. I personally don't like Lua either but as I said it's IMHO better than the current SQF/SQS stuff.

Even ruby/python/perl would be ok to me if Lua is too scriptkiddy like for you...

Share this post


Link to post
Share on other sites

Lua has a better syntax...

I guess that depends on who your asking, i like the .sqf syntax.

...and way more functions/capabilities.

Like what?

Share this post


Link to post
Share on other sites

Portable to where? The game hosts the script engine on either Linux or Windows, what more need is there for portability?

There are lots of very experienced coders here doing a lot of cool stuff with SQF and you don't hear them calling for different languages. Suck it up and learn it and you won't give Lua a second thought, you'll be too busy making stuff happen to care.

Share this post


Link to post
Share on other sites
I think it's a pretty typical knee-jerk reaction to encountering SQF for the first time. Its syntax is peculiar and this lends it a sort of 'home-made' quality, I know when I started with it I'd have much preferred something more familiar. However having used it for a while I have a lot of respect for its consistency and speed of execution, I suspect something like Lua might even be a bit sluggish by comparison. Many's the time in my day job now I wish I could just [] Spawn {... things.

Right, its the first time. From what I've seen its very limited. With a external library (like Lua) you could even fix bugs yourself or extend it with new functions capabilities as you want and simply replace the lib by your own/fixed one as the source is available as well.

Ok, I don't know much about the performance thingy so if its poor compared to SQF then I agree that Lua should not be taken.

Share this post


Link to post
Share on other sites

Ew. Why do people always have the false impression that Lua is a good scripting language? IMO, it's nothing special, and the only reason it's used so much is because it's easier to implement; and that doesn't necessarily make it better. I really don't see any benefits or logical reasons for BI to switch.

Share this post


Link to post
Share on other sites

Incidentally I've heard that 'SQF' is actually a licensed or open source package properly known as 'O2 Script', is that right? Does anybody know anything more about it? My Google-fu has failed me.

Share this post


Link to post
Share on other sites

external library? as in custom functions by users and such? I think CBA already did that... with sqf of course. Either way... I would think switching to LUA would be more costly than benefit that it might bring.

Besides, a lot of regulars are already familiar and get used to it. so changes can be... "quite a sight" to behold....

Share this post


Link to post
Share on other sites

So what would this look like in Lua?

if (!isServer or !alive player) exitWith {hint "lol"};

while {true} do {
sleep 1;
for "_x" from 1 to 10 do {
	player addMagazine "HandGrenade_Stone";
};
hintSilent format ["%1",time];
};

Share this post


Link to post
Share on other sites
portable = runs on windows as well as linux and other systems...

On which ArmA2 doesn't run you mean?

I don't care about GTA or any scriptkiddies at all..

Apparently others do.

Lua has a better syntax and way more functions/capabilities.

Who cares if none of them will fit or work in ArmA2?

I personally don't like Lua either but as I said it's IMHO better than the current SQF/SQS stuff.

Why?

This reminds me about "Make ArmA3 on CryEngine3!!1" childish threads. Like suddenly changing an engine or scripting language to something more mainstream will suddenly turn the game into a stuff of your dreams, not slow the development process down by forcing to rewrite everything.

Share this post


Link to post
Share on other sites
Lua has a better syntax

No it doesn't. Lua's syntax is extremely simple, but it's also extremely ambiguous. Syntatically, SQF is closer to more traditional programming languages. And I don't understand the point in Lua having such simple syntax; IMO it's better if non-programmers actually learn how to use more traditional syntax than further seperating them from actual programming; that has more benefits in my opinion.

Share this post


Link to post
Share on other sites

Lua only allows you to do what it was implemented for. You could argue that SQF could do the same and should there be the commands to support it.

The only thing SQF lacks and what actively bothers me is the lack object-oriented programming and simple incrementation/incrementation (_i++; _j--).

Share this post


Link to post
Share on other sites

..and calling commands like function, something like:

distance(player, car2)

instead of

player distance car2

...and accesing array using [] operator

Share this post


Link to post
Share on other sites
Lua only allows you to do what it was implemented for. You could argue that SQF could do the same and should there be the commands to support it.

The only thing SQF lacks and what actively bothers me is the lack object-oriented programming and simple incrementation/incrementation (_i++; _j--).

because it's super difficult to write _i = _i + 1 or _i = _i - 1 ?

Share this post


Link to post
Share on other sites
Because programmers are lazy and like pure code and because incrementation operator is cute

When I code in Java, I use _i + _i = 1 all the time. I have the ability to use _i++, but I don't :P

Share this post


Link to post
Share on other sites
because it's super difficult to write _i = _i + 1 or _i = _i - 1 ?

I'm writing code, not an essay.

Share this post


Link to post
Share on other sites
I'm writing code, not an essay.

Not even a valid reason... it's 3 extra characters

_i++

_i=_i+1

Share this post


Link to post
Share on other sites
Not even a valid reason... it's 3 extra characters

_i++

_i=_i+1

Another way of saying it is that it's 100% extra work ;)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×