Lua vs cob - Page 2

Lua vs cob

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Spring WD, the return.

Post by FLOZi »

Why do idiots yell and scream for us to rescript every unit we have into lua? Because they're idiots.
Who ever even suggested that? Nevermind screamed it at you of all people.

I encourage all new modders to use it so they only have to become familiar with one single text/code format throughout spring.

I personally plan to rescript S44 with lua, for numerous reasons, the key ones being ease of maintenance and a rewrite of the often buggy and inefficiently coded ammo system; but I'm not telling anyone else they must adopt it, though I will remind them of its superiority when something particularly neat pops up.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Spring WD, the return.

Post by AF »

Its an assumption a lot of people jump to. I always advise to use lua for new stuff, and immediatley get told off for suggesting that they convert all their units to lua, despite never saying such!

(Lua > bos)or(lua+newunits = good) not equal to (convertToLua( all bos scripts) )

It would be nice but nobody here expects people to actually do it to a large mod unless they have a tool to do most of it for them.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Spring WD, the return.

Post by Forboding Angel »

CarRepairer wrote:Who is the real "retard" or "idiot" here?
I didn't refer to anyone specifically as an idiot or retard, but you're insinuating that I, specifically, am an idiot or a retard. That's not very nice.

@flozi, as a matter of fact, I've been inundated with people in the lobby telling me that I should be writing unit scripts in lua, most of these people are also non-devs. Which explains why I'm just slightly irritated by it.

****************************************************
AF and Car, I was not referring to either of you, that much should have been obvious, but apparently it wasn't.
****************************************************

I can write a unit script in no time using bos. There is no need for anyone who is very familiar with bos to be writing unit scripts in Lua, unless you need to directly interact with Lua in the unit script, and even then, there is always luacob.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Spring WD, the return.

Post by AF »

There are numerous people who do that forb I wasnt responding directly to you, the OMG STOP OVERUSING COBOL CIRCA 1786 thread should have done that
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: Spring WD, the return.

Post by bobthedinosaur »

/splitthread CobVsLuaGriping
/reloadthread WD
User avatar
maackey
Posts: 490
Joined: 02 Jul 2008, 07:11

Re: Lua vs cob

Post by maackey »

User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lua vs cob

Post by AF »

Artists vs coders is a laod of tosh. Its a self defeatist arguement that is self perpetuating. Artists cannot do coder stuff because theyre always saying 'artists cannot do coder stuff'

Before I started learning C and faffing around with VB6, I spent every lunchtime doing GCSE Artwork. I did it after school, I did it everyday in lessons, I spent time looking into photoshop. I may not have been a modeller or an animator, but I was an artist. It managed a 52/60 on my GSCE coursework mark, and looking back, I was capable of doing better. I and 4 or 5 other people each managed to make enough coursework material to cover every single table and half the floor of the art room individually. My biggest regret about my schooling is that I didn't take Art related subjects any further.

Yet now I'm known here not as an artist but as a programmer.

Zwzsg, you cant use the artists vs coders argument either. You're too skilled at BOS to say that, you have some programming foo. Your not just an artist. It would be like me saying Programmers cant do art, oh wait, I'm a programmer, and Ive done art, I can draw, I can design, heck my artwork is on every page of this site sitting in the upper left corner.

I've spoken to artists in the game industry, and I remember having discussions about coding, they didn't see it as some voodoo to eb feared, they were actively curious about it and had aspirations to expand what they knew. I've seen people at game conferences talking about their roles in their companies being neither programmer, or artist but somewhere inbetween. Go talk to graphics programmers working on shaders/engines/etc on any console development team.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Spring WD, the return.

Post by Tobi »

Let me give some fact too ;-)

q: If I'm starting a new game from scratch do I need to use BOS?
a: Nope. If you already know Lua and do not know BOS there is even less reason to use it, however, if you are more familiar with BOS and would rather stick with BOS, then you may as well use BOS for unit scripting, but IN NO WAY DO YOU NEED TO USE BOS.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Spring WD, the return.

Post by Forboding Angel »

What I said (which says use lua if you're already familiar with it, or bos if you're already familiar with it, but you don't need to use lua):
Forboding Angel wrote: 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.
What Tobi said (Which is the exact inverse, that says use bos if you're already familiar with it, or lua if you're already familiar with it, but you don't need to use bos).
Tobi wrote: q: If I'm starting a new game from scratch do I need to use BOS?
a: Nope. If you already know Lua and do not know BOS there is even less reason to use it, however, if you are more familiar with BOS and would rather stick with BOS, then you may as well use BOS for unit scripting, but IN NO WAY DO YOU NEED TO USE BOS.
Cute, but most people here would agree that bos is far easier to learn than lua.
User avatar
KaiserJ
Community Representative
Posts: 3113
Joined: 08 Sep 2008, 22:59

Re: Lua vs cob

Post by KaiserJ »

:-) i understand neither! ignorance is bliss

for either one, we need MOAR TUTORIALS!
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Spring WD, the return.

Post by Tobi »

Forboding Angel wrote:Cute, but most people here would agree that bos is far easier to learn than lua.
Numbers? Or is this a "fact" too like all the opinions & unverifiable statements in your earlier post?

Were this people who already knew BOS, people who already knew Lua? In general, what was their background? OTA?

And when you're at it, ask them why, so stuff can be improved.

EDIT:

Btw for the casual reader, let me point out some advantages of starting out with Lua unit scripts instead of BOS (disregarding which is easier to learn):
  • Only one language to learn instead of two. At some point you'll want to modify some widget or gadget anyway.
  • Only one syntax to learn instead of two: not only unit scripts can be written in Lua, but all your unit stats can be supplied in Lua too.
  • Easier integration between units and gadgets (and as such also widgets).
  • Full LuaRules API is available in unit script, so lots of things are possible that would require ugly hacks spread over multiple files with BOS.
  • It's extensible. No ugly hacks needed for new functionality (e.g. `get PRINT' in BOS)
  • Floating point numbers are available so no need to deal with fixed point calculations.
  • Data structures (i.e. tables) are available, allowing for higher level of abstraction.
  • It has strings.
  • Lua unit scripts can be organised in multiple directories.
  • Lua is more useful to know outside Spring. Lua is used in other game engines/software. BOS is used only in Spring and a certain game from 1996(?).
  • No manual compilation step required for Lua.
  • No unmaintained win-only third party software required for this compilation step.
Of course there are also some disadvantages of Lua over BOS:
  • Lua is slightly more verbose when specifying animations. This can't really be prevented because BOS is a Domain Specific Language and Lua a General Purpose Language.
  • No manual compilation step required, so it's a bit harder to find errors without running the script.
  • BOS is less powerful, so there's less to learn before you reach the limit.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lua vs cob

Post by AF »

Technically the compilation step point isn't right. Lua will compile anything that isnt already compiled on load.

I don't know if its still there, but trepan said that one can compile the lua script with a standalone lua set up, then use it in spring, so long as the file name is changed. This would also allow you to check syntax beforehand, and distribute lua stuff without open sourcing it.

Also BOS doesn't support strings.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Lua vs cob

Post by Tobi »

Fixed, thanks (added 'manual' before compilation step)

Wrt strings, apart from easier debugging messages I couldn't come up with a real advantage of having them in Lua unit scripts. Will add anyway.

And yeah, you can definitely compile Lua outside Spring, but because it's a dynamic language this still won't catch as much as compiling a static language could do. (No clue if in practice scriptor gives decent errors.)

(Something like lualint could help here probably; never tried it on a unit script though.)

Distributing Spring Lua bytecode without open sourcing it is not allowed, even if it appears to be technically possible.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Lua vs cob

Post by zwzsg »

AF wrote:Zwzsg, you cant use the artists vs coders argument either. You're too skilled at BOS to say that, you have some programming foo. Your not just an artist.
I've been more prolific in code than in art, so I wasn't counting me as an artist. And yes, one of my earlier post admitted some people can be both.

Tobi wrote:q: If I'm starting a new game from scratch do I need to use BOS?
a: Nope. If you already know Lua and do not know BOS there is even less reason to use it, however, if you are more familiar with BOS and would rather stick with BOS, then you may as well use BOS for unit scripting, but IN NO WAY DO YOU NEED TO USE BOS.
But the setting was:
q: If I'm resuming work on old game and I have years of experience in BOS, do I need to use LUA?
q: Nope. If you already know Bos and do not know LUA then you can keep using BOS. IN NO WAY DO YOU NEED TO USE LUA for unit animation.

Well, at least, so I hope. I have secret fears of BOS support being deprecated.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lua vs cob

Post by AF »

Expect it to be deprecated within a year of a feasible bos -> lua converter being released
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Lua vs cob

Post by zwzsg »

Finally you admit it. Modders prefer BOS, but devs are forcing them to switch to Lua.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Lua vs cob

Post by FLOZi »

zwzsg wrote:Finally you admit it. Modders prefer BOS, but devs are forcing them to switch to Lua.
Only those who haven't bothered to actually try it
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Lua vs cob

Post by Tobi »

zwzsg wrote:Finally you admit it. Modders prefer BOS, but devs are forcing them to switch to Lua.
Yeah for next release I'll remove COB, even if it's just to pester you :twisted:
zwzsg wrote:
Tobi wrote:But the setting was:
q: If I'm resuming work on old game and I have years of experience in BOS, do I need to use LUA?
q: Nope. If you already know Bos and do not know LUA then you can keep using BOS. IN NO WAY DO YOU NEED TO USE LUA for unit animation.
Then the question was badly phrased because it said "... starting a new game from scratch, ..."
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: Lua vs cob

Post by oksnoop2 »

KaiserJ wrote::-) i understand neither! ignorance is bliss

for either one, we need MOAR TUTORIALS!

I'm with Kaiser on this one.
*thumbs up*, Kaiser
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Lua vs cob

Post by zwzsg »

Tobi wrote:Then the question was badly phrased because it said "... starting a new game from scratch, ..."
No, what it said was:
GrOuNd_ZeRo wrote:I am coming back with WD
Tobi wrote:Yeah for next release I'll remove COB, even if it's just to pester you :twisted:
I wouldn't be the most pestered.

In fact I would welcome it, as that would mean the death of BA. :mrgreen:
Post Reply

Return to “General Discussion”