That's a little disingenuous; the call-ins and outs are nearly an exact 1:1 mapping. Anyone who can write a bos can write a lus.For writing unit animation scripts, you can still use Scriptor. People will tell you to drop Scriptor and to write animation script in Lua instead. Sure, that's a possibility, but if you have 8 years of experience with Scriptor, do you really want to have to re-learn how to write an animation?
Lua vs cob
Moderator: Moderators
Lua vs cob
Re: Spring WD, the return.
When you aren't of the programmer kind, that nearly can make all the difference between getting the unit to work with a Ctrl+C, Ctrl+V of an old trusty recipe, and being stuck and puzzled for days, then leavin' the project on hold for lack of Lua coder in your team.FLOZi wrote:nearly
Re: Spring WD, the return.
All spring mod tutorials should encourage the use of scripting languages heavily!
Any mod dev that does not know any scripting language, and wants to make a mod with more then 10 units or so, is severely handicapped.
There are really simple scripting languages like AWK, which can be learned in a day. Ff one does not yet know Regular Expressions, add an other day.
These 1-2 days will probably be the well most spent in their virtual life.
Any mod dev that does not know any scripting language, and wants to make a mod with more then 10 units or so, is severely handicapped.
There are really simple scripting languages like AWK, which can be learned in a day. Ff one does not yet know Regular Expressions, add an other day.
These 1-2 days will probably be the well most spent in their virtual life.
Re: Spring WD, the return.
Artist != Coder
Sadly, the talent that makes one an excellent modeller and painter doesn't always correlate with coding skills. There's modders that can model and draw very well, but have trouble coping with any single line of code. And there's gifted coders that can't model anything but washed out potatoes. (Yes, there also those who can do both, and the mass who can do neither.)
Of course, it's always best to know the field adjacent to yours. A coder would better off knowing how to fix a .s3o, a modeller would be better off knowing how to write simple animations. But frankly, when you expect everyone to grok Regular Expression, you are not being reasonable. Maybe we have a higher concentration here than in your local mall, but not yet everybody here was born with a huge bulbous cold analytical brain. And it would be a pitty to exclude non-coding modders from Spring's talent pool.
Maybe you could replace Spring with a headless client, that you can only use to output the result of AI battle via commandline, if you want to ensure the project only attract those who have the hacker nature. Though I admit the move toward requiring Lua for everything is already a pretty good deterrent toward all those wannabee modders who can't just sit down and code for 6 hours like any regular person.
Sadly, the talent that makes one an excellent modeller and painter doesn't always correlate with coding skills. There's modders that can model and draw very well, but have trouble coping with any single line of code. And there's gifted coders that can't model anything but washed out potatoes. (Yes, there also those who can do both, and the mass who can do neither.)
Of course, it's always best to know the field adjacent to yours. A coder would better off knowing how to fix a .s3o, a modeller would be better off knowing how to write simple animations. But frankly, when you expect everyone to grok Regular Expression, you are not being reasonable. Maybe we have a higher concentration here than in your local mall, but not yet everybody here was born with a huge bulbous cold analytical brain. And it would be a pitty to exclude non-coding modders from Spring's talent pool.
Maybe you could replace Spring with a headless client, that you can only use to output the result of AI battle via commandline, if you want to ensure the project only attract those who have the hacker nature. Though I admit the move toward requiring Lua for everything is already a pretty good deterrent toward all those wannabee modders who can't just sit down and code for 6 hours like any regular person.
Re: Spring WD, the return.
It's easier to learn to code lua unit anims when you have a background in bos than it is to learn Wings when you have a background in Rhino.zwzsg wrote:When you aren't of the programmer kind, that nearly can make all the difference between getting the unit to work with a Ctrl+C, Ctrl+V of an old trusty recipe, and being stuck and puzzled for days, then leavin' the project on hold for lack of Lua coder in your team.FLOZi wrote:nearly
Re: Spring WD, the return.
What a load of nonsense. Lua has one of the smallest rule sets for syntax of any programming language, and the basics necessary to start basic lua coding is tiny. The learning curve is tiny.
Most of the learning curve of lua is in the API the program using it exposes, e.g. the spring API. Since BOS shares an almost identical API, this point is almost entirely nullified.
I don't see why nobody has implemented a bos -> lua converter already.
Most of the learning curve of lua is in the API the program using it exposes, e.g. the spring API. Since BOS shares an almost identical API, this point is almost entirely nullified.
I don't see why nobody has implemented a bos -> lua converter already.
Re: Spring WD, the return.
Counter-argument: pairs vs. ipairs.
Re: Spring WD, the return.
If you stick to what BOS is capable of then no way you're going to need pairs/ipairs.
Re: Spring WD, the return.
Citation needed.AF wrote:What a load of nonsense. Lua has one of the smallest rule sets for syntax of any programming language, and the basics necessary to start basic lua coding is tiny. The learning curve is tiny.
Lua is a rather high level language, and as such, even if it appears easy to use, the exact syntaxic rule has a lot more hidden complexity than, let's say, C or assembly. Stuff like autoconversion of integers to strings, the difference between pairs and ipairs, how to copy tables, are subtleties you won't have in simpler languages. Sure, it appears simple to use at first. But that only make exactly understanding what goes under the curtain more difficult.
Also, syntax is only a part of learning a language. Beyond syntax, it takes some times to get used to the programming style a language is made for. For instance, to make use of nil with constuction like or DefaultValue, to elegantly use tables, takes some practice when you're not used to the Lua mindset.
And you're still missing the point that the vast majority of mankind writhe in fear at the very idea of having to write a single line of code, regardless of programming language.
Re: Spring WD, the return.
@Z,
Lua may seem complex relative to C, but remember that Lua was developed as a backlash against the use of Perl, Python, etc. as embedded languages. Python is the easiest language to read, but in order to get that legibility the language has become horribly complex. Compared to most of its compatriots, the only simpler embedding language is Scheme... and that's a pantshittingly scary language to learn.
And what C lacks in complexity, it makes up for in catastrophic failure, and the difficulty in expressing complex concepts.
Lua may seem complex relative to C, but remember that Lua was developed as a backlash against the use of Perl, Python, etc. as embedded languages. Python is the easiest language to read, but in order to get that legibility the language has become horribly complex. Compared to most of its compatriots, the only simpler embedding language is Scheme... and that's a pantshittingly scary language to learn.
And what C lacks in complexity, it makes up for in catastrophic failure, and the difficulty in expressing complex concepts.
Re: Spring WD, the return.
Eh, no, just no.zwzsg wrote:Lua is a rather high level language, and as such, even if it appears easy to use, the exact syntaxic rule has a lot more hidden complexity than, let's say, C or assembly.
Converting an integer to a string or copying tables is still far and FAR easier in Lua then it is in C or assembly. (Heck, you'll need to implement something as powerful as tables in those languages yourself first...)Stuff like autoconversion of integers to strings, the difference between pairs and ipairs, how to copy tables, are subtleties you won't have in simpler languages.
Anyway the right solution IMO is to make enough nice assets to be able to convince a developer to join you and write code...
Re: Spring WD, the return.
Yes, because it's done by the bare the Lua language itself. So Lua is more complicated, not by how hard it is to use, but by all that it already does transparently to help you. That you have to write pages of code to do the same in C or assembly is a testimony of how simple C or assembly are by themselves.Tobi wrote:Converting an integer to a string or copying tables is still far and FAR easier in Lua then it is in C or assembly.
I'm not saying it's complicated to write code to convert an integer to a string in Lua. I'm saying that to make it so simple, as simple as no code at all really, even as simple as not even having to think about it, for the coder to convert integer to string in Lua, then Lua syntax and Lua compiler/interperter/machine/whatever has to be much more complicated than C syntax and compiler. Well C has so many little understood keywords it's a bad exemple.
Anyway, HQ9+ has a simpler syntax than Lua, so ha!
What's our current artist/coder ratio?Tobi wrote:Anyway the right solution IMO is to make enough nice assets to be able to convince a developer to join you and write code...
Re: Spring WD, the return.
I once threw a DCT at a bunch of professional artists. Their brains melted. Coders and artists have completely incompatible mental functions, a good artist relies on the right half of his brain while a good coder relies on the left. Being good at using your left will make the left interfere with your art and that's a bad thing.
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Spring WD, the return.
Yes and this is why GZ and other game devs who are more artistically oriented (me aswel) fail at code, and need help.coders and artists have completely incompatible mental functions, a good artist relies on the right half of his brain while a good coder relies on the left.
Edit: Not saying you suck at code GZ, just saying you could use a hand.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Spring WD, the return.
You know what? lets talk some facts here. I am tired of hearing retards whine at me to use lua for units.
BOS:
Easy to learn
Syntax doesn't suck
Can do just about anything you would need to do except things that require a lot of direct interaction with a widget/gadget (and that can be done via luacob anyway)
Built in debugger (of sorts) that will tell you when and where you fucked up.
LUA:
Not easy to learn
Shit syntax
Can do anything BOS can do while having direct access to widgets/gadgets
In Soviet Russia, Lua buggers YOU!
Did I mention the shit syntax and unintelligible code?
Slower than BOS (even if only a little bit)
****************************************************
Who actually needs lua for unit scripts? No one here that I can think of except maybe KDR and CA (and even that is a little dubious), probably s44 and maybe gundam (cause the both of them stray far from what spring's default stuff allows for). For the rest of us, there is absolutely no reason to use Lua over BOS. You can work much faster in BOS and it's easy to read.
Why do idiots yell and scream for us to rescript every unit we have into lua? Because they're idiots.
q: If I'm starting a new game from scratch do I need to use lua?
a: Nope. If you already know BOS and do not know Lua there is even less reason to use it, however, if you are more familiar with Lua and would rather stick with Lua, then you may as well use Lua for unit scripting, but IN NO WAY DO YOU NEED TO USE LUA.
****************************************************
If lua syntax was reminiscent of C# of C++ I would like it.
BOS:
Easy to learn
Syntax doesn't suck
Can do just about anything you would need to do except things that require a lot of direct interaction with a widget/gadget (and that can be done via luacob anyway)
Built in debugger (of sorts) that will tell you when and where you fucked up.
LUA:
Not easy to learn
Shit syntax
Can do anything BOS can do while having direct access to widgets/gadgets
In Soviet Russia, Lua buggers YOU!
Did I mention the shit syntax and unintelligible code?
Slower than BOS (even if only a little bit)
****************************************************
Who actually needs lua for unit scripts? No one here that I can think of except maybe KDR and CA (and even that is a little dubious), probably s44 and maybe gundam (cause the both of them stray far from what spring's default stuff allows for). For the rest of us, there is absolutely no reason to use Lua over BOS. You can work much faster in BOS and it's easy to read.
Why do idiots yell and scream for us to rescript every unit we have into lua? Because they're idiots.
q: If I'm starting a new game from scratch do I need to use lua?
a: Nope. If you already know BOS and do not know Lua there is even less reason to use it, however, if you are more familiar with Lua and would rather stick with Lua, then you may as well use Lua for unit scripting, but IN NO WAY DO YOU NEED TO USE LUA.
****************************************************
If lua syntax was reminiscent of C# of C++ I would like it.
Re: Spring WD, the return.
BOS isn't enough like C for that to help significantly, so what's the problem with lua's syntax vs. BOS?
[citation needed] on lua being slower than bos
I'm sure some people can do bos faster, but others can do lua faster, and certain aspects of animation are simpler to do or are only possible in lua.
Code: Select all
int foo;
int bar(int p) {
return p;
}
static-var foo;
bar(p) {
return p;
}
local foo
function bar(p)
return p
end
[citation needed] on lua being slower than bos
I'm sure some people can do bos faster, but others can do lua faster, and certain aspects of animation are simpler to do or are only possible in lua.
Re: Spring WD, the return.
Incomprehensible lua code is not a sign that lua is incomprehensible. Its a sign that you yourself are bad at naming your variables and functions.
Tables aren't a valid criticism against lua <-> bos because the bos equivilant of tables is non-existant, and a direct conversion to lua would not involve any lua tables unless you went in and added tables yourself, which would be an unnecessary action.
Also, Bos is a perverted form of C syntax. It is only easy for you compared to lua not because it is superior or simpler, but because it is familiar. Familiarity!
Heck Bos doesnt even support strings!
Tables aren't a valid criticism against lua <-> bos because the bos equivilant of tables is non-existant, and a direct conversion to lua would not involve any lua tables unless you went in and added tables yourself, which would be an unnecessary action.
Also, Bos is a perverted form of C syntax. It is only easy for you compared to lua not because it is superior or simpler, but because it is familiar. Familiarity!
Heck Bos doesnt even support strings!
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Spring WD, the return.
Bos:
Ugly syntax
Hard to learn
Requires complexities to communicate with Luarules land
Does not allow you to reload the script until you restart spring
Does not allow you to reload the script until you restart spring
Does not allow you to reload the script until you restart spring
Lua:
Not ugly syntax
Easy to learn
Already in Luarules land
Allows you to reload the script without restarting spring
Allows you to reload the script without restarting spring
Allows you to reload the script without restarting spring
Imagine you're typing a word document and every time you added a sentence you have to reload word and open your document again. Imagine you model in Wings/Blender/3Dstudio and every time you added or moved or rotated a piece you had to close the app, restart it and open your model file again.
Who is the real "retard" or "idiot" here?
Ugly syntax
Hard to learn
Requires complexities to communicate with Luarules land
Does not allow you to reload the script until you restart spring
Does not allow you to reload the script until you restart spring
Does not allow you to reload the script until you restart spring
Lua:
Not ugly syntax
Easy to learn
Already in Luarules land
Allows you to reload the script without restarting spring
Allows you to reload the script without restarting spring
Allows you to reload the script without restarting spring
Imagine you're typing a word document and every time you added a sentence you have to reload word and open your document again. Imagine you model in Wings/Blender/3Dstudio and every time you added or moved or rotated a piece you had to close the app, restart it and open your model file again.
Who is the real "retard" or "idiot" here?
Re: Spring WD, the return.
/reloadcob <unit_name>
CarRepairer wrote:Who is the real "retard" or "idiot" here?
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Spring WD, the return.
That never worked for me. Lua script worked the first time it was introduced.