Lua

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Postby Mannequin » Fri May 25, 2007 12:50 pm

I've always needed a good excuse to learn Lua.

-M.
User avatar
Mannequin
"Because today is the car of the cdr of your life."
 
Joined: 15 Jul 2003
Location: On The Lonely Island somewhere.

Postby jallamann » Fri May 25, 2007 2:08 pm

If DoomScript ever comes to life I'd certainly prefer it to be ACS-like, at least in syntax, so it wouldn't alienate those of us who know ACS and other C-like languages.
User avatar
jallamann
isn't very active on the forums at all
 
Joined: 24 May 2004
Location: http://goo.gl/maps/VTSpm

Postby Karate Chris » Fri May 25, 2007 2:20 pm

Lua makes my head spin. :(
User avatar
Karate Chris
http://www.savageassassins.co.uk
 
Joined: 23 Aug 2006

Postby Nash » Fri May 25, 2007 2:58 pm

Necromage: Piet, yeah that's the one! Beautiful. :trippy:
User avatar
Nash
http://twitter.com/ISurvivorGame
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Postby skadoomer » Fri May 25, 2007 5:41 pm

Can i ask why so many of you (excluding the programmers) are so opposed to learning a new programming language? I've found that i understand the general concept of programming better by learning a new language. Besides, if you can't figure it out, chances are there will be those of us in the community that can , and will be glad to help the rest of you along. It happens now with Decorate and ACS, so i don't forsee a problem.

@programmers, If Lua is the problem you say it is, what would you guys recommend as the next zdoom scripting language?
skadoomer
 
Joined: 05 Sep 2003

Postby Doomguy0505 » Fri May 25, 2007 6:03 pm

They probably want a C-like language, such as ACS.
User avatar
Doomguy0505
sudo rm -rf /
 
Joined: 29 Mar 2005

Postby TheDarkArchon » Fri May 25, 2007 6:15 pm

ska: The complaints from both parties are one and the same: The syntax sucks.
User avatar
TheDarkArchon
This, ladies and gentlemen, is glee
 
Joined: 07 Aug 2004
Location: Some cold place

Postby randi » Fri May 25, 2007 9:19 pm

I disagree. It's different, sure, but it's not like it's earth-shakingly different.

C:
Code: Select allExpand view
if (x == 5)
{
    return 1;
}
else
{
    return 0;
}

Lua:
Code: Select allExpand view
if x == 5 then
    return 1
else
    return 0
end

There are also syntax highlighters for Lua already written to make keywords and such stand out while you edit.

If somebody is really bothered by the lack of braces for anything besides creating tables, I'm sure they could easily be added to the language, but I don't see the need.

As far as I can see, Lua has all the features I thought made Scheme cool but in a more readable imperative language, too.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

Postby Medricel » Fri May 25, 2007 9:34 pm

I personally wouldn't mind such a switch. I sort of like learning new languages :D
User avatar
Medricel
26 is the new 18 is the new 11!
 
Joined: 20 Nov 2004

Postby TheDarkArchon » Fri May 25, 2007 9:43 pm

Randy: Braces would be more than welcome, even if it's just for consistancy with ACS/DECORATE.
User avatar
TheDarkArchon
This, ladies and gentlemen, is glee
 
Joined: 07 Aug 2004
Location: Some cold place

Postby Nash » Fri May 25, 2007 10:08 pm

It definitely looks like there's less typing to do. ;) Syntax highlighters will compensate the lack of braces for me.

Don't we all want to have extended coding capabilities sooner than having to wait for DoomScript that'll probably never see the light of day?

I'm afraid if I keep waiting any further for the C-like implementation I'll probaby get old, get married and take up gardening as a hobby and forget computers because it'll make me unhealthy. :mrgreen:
User avatar
Nash
http://twitter.com/ISurvivorGame
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Postby Niya » Sat May 26, 2007 12:40 am

I dont think that anybody realises depth of the issue. As such you all reflect its pros and cons based on personal perspective and not really on the true gain of such a drastic change. With that said, I agree on all the points that argue against it. If I had my way I would simply build upon the already established standards(ACS/DECORATE). But isn't randy's goal to improve the port ?

With that in mind, it appears to me that staying with the old standards simply because of our preferences, would contradict that goal. Its like giving a child a candy upon every demand. It may seem like heaven to the child but that doesn't means its in the best interest of his future developments where his health is concerned.

But that still doesnt answer the question of why ?....Why change ?
Consider this :-

Raven sofware develops Heretic and soon after releases Hexen which is to
be superior in terms of gameplay to its predecessor. To meet this goal they choose to add scripting to it. Now, Hexen wasn't released with any level editor which would highlight the goals of the software..ie..to be played with the levels that came with it. Though user-made levels weren't discouraged, its wasn't exactly encouraged. Anyway, if they were not intending to provide any level-editing facilities, then there is no pressure to really consider how any of the inner mechanics of the engine would affect the users. They wanted scripted events to improve gameplay so why not use a language that everybody on the development team already knew ?...Its not like they were worried about if the users would understand it or not, or wheather its flexible enough to encompass a broad spectrum of human ingenuity. It was more or less for their own personal use.

Now when the source was released, I would imagine that through experimentation, various programmers (such as randy and Graf Zahl) could only make small changes before they were intimately familiar with the code. But these series of small changes added up to a multitude of extended ACS commands, DECORATE etc. and now that they can manipulate the code at will, it seems that the community had already grown really attached to the current system. A system that may not have been initially designed to boast maximum flexibility of its perceived intent, but rather because it was quicker for the original developers to implement as it was built on the very language that they were using to code the engine itself.

Conclusion :-

Personally, i'd prefer the present situation. But in my unbiased opinion, a change is definitely needed.

8-)
User avatar
Niya
 
Joined: 14 Sep 2006

Postby k0da » Sat May 26, 2007 1:57 am

Squirrel appears to be a decent alternative to LUA and has a C-style syntax. It's designed to be used as an embedded scripting language and claims to be lightweight. It might be worth investigating.
User avatar
k0da
 
Joined: 25 Jan 2007
Location: Tasmania, Australia

Postby Lamneth » Sat May 26, 2007 2:03 am

I propose we use brainfuck as the language for DoomScript.
Lamneth
They are hackers on STEROIDS
 
Joined: 26 Apr 2007
Location: Dark Falz's chamber

Postby Niya » Sat May 26, 2007 2:18 am

Lynching would probably be legalized if that happens.
User avatar
Niya
 
Joined: 14 Sep 2006

PreviousNext

Return to Editing

Who is online

Users browsing this forum: No registered users and 2 guests