Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

View Poll Results: Should roguelike games have LUA included in the build?
Yes, it's essential. 2 14.29%
I suppose so, it can be useful. 3 21.43%
It's not really worth having but it's no big deal. 5 35.71%
No, I hate it! 4 28.57%
Voters: 14. You may not vote on this poll

Reply
 
Thread Tools Display Modes
Old February 20, 2009, 17:44   #11
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by takkaria View Post
First, it's not LUA, it's Lua, the Portuguese word for 'moon'. Don't shout.

Second, there is nothing that can be done in one Turing-complete language that can not be done in some other language. So you can do the same things in C, C++, Python, FreePascal, Lua, etc. since they are all Turing-complete. The reason people add scripting is because generally, higher-level languages (Lua/Python) make certain things easier in ways that lower-level (C) languages don't. It's also very much a matter of personal preference. If you don't want scripting, then you don't want Lua; if you prefer to put item effects outside the compiled game, then you want to use Lua (or some other scripting language).
What he says, I got really mad about bands last week and wrote a 3 page rant on the train without internet access. Some stuff I wrote was factually not true, so I didnt post it. This part of the rant still holds I think :

"lua !!! As I contemplate where the game industry is going, how much hellband could use some scripting, what a user community lua could attract from other games, I feel as if Robert was 10 years ahead of himself. Yes, lua might or might not ruin things for mobile phones and such , I just think the lua binding was done in a naive fashion. It should have looked at the lua files , check out the non standard functions and export only those instead of everything in extern.c . It was probably a bad move to go away from lua, yes I am contradicing my earlier self, sorry Konijn anno 2007. "

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old February 20, 2009, 21:27   #12
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,836
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by konijn_ View Post
What he says, I got really mad about bands last week and wrote a 3 page rant on the train without internet access. Some stuff I wrote was factually not true, so I didnt post it.
I so want to see the rest of it now. Did you insult anyone?
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is online now   Reply With Quote
Old February 23, 2009, 18:13   #13
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by CJNyfalt View Post
I just refuse to have to learn a little used scripting language like Lua. If I add scripting I'll choose a mainstream one like Python, which has 50 times more use and is easier to get documentation for.
What he said - though I think enhancing the functionality of the edit files would be more worthwhile than porting any of the code to Python.

CC
Magnate is offline   Reply With Quote
Old February 23, 2009, 19:00   #14
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by Magnate View Post
What he said - though I think enhancing the functionality of the edit files would be more worthwhile than porting any of the code to Python.

CC
A script language is not about _you_ , it's about the _users_.
So if you really think that indentation based code is more intuitive than c like code, fine. But again, the choice should not be solely based on what the developer likes. Notice though that very few ( I cant find any, but I didn't look hard ) script engines for game use python. I wonder why ?

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old February 23, 2009, 20:13   #15
zaimoni
Knight
 
zaimoni's Avatar
 
Join Date: Apr 2007
Posts: 590
zaimoni is on a distinguished road
Quote:
Originally Posted by konijn_ View Post
A script language is not about _you_ , it's about the _users_.
So if you really think that indentation based code is more intuitive than c like code, fine. But again, the choice should not be solely based on what the developer likes. Notice though that very few ( I cant find any, but I didn't look hard ) script engines for game use python. I wonder why ?

T.
More importantly, why did RR go with Lua when he took over maintainership of V, when he himself initially forked V2.8.3 to use Python scripting?

Also, Wesnoth did use Python scripting, back when I was there (sadly, the terrain changes from 1.3.2-1.3.7 broke Mystery Campaign beyond my ability to patch). One of the bigger issues then was computer security: Python's dev-team tore out what restricted-execution ability the language had in the 2.2/2.3 transition as it got in the way of the new backend class architecture. Among other things, this was the end of the line for the Grail web browser (written in Python).

That said, Python's dev-team routinely trashes future-compatibility of current scripts against later versions. This basically locked Wesnoth into using Python 2.4; it was technically infeasible for them to upgrade to Python 2.5.

(Those who read USENET have seen my flamey rants on this point. Python has C speed and efficiency when used properly, but it's not something I'd use for anything that had any risk of needing regular maintenance.)
zaimoni is offline   Reply With Quote
Old February 23, 2009, 22:06   #16
pav
Administrator
 
pav's Avatar
 
Join Date: Apr 2007
Location: Prague, Czech republic
Age: 39
Posts: 782
pav is on a distinguished road
Send a message via ICQ to pav
Quote:
Originally Posted by konijn_ View Post
Notice though that very few ( I cant find any, but I didn't look hard ) script engines for game use python. I wonder why ?
Sid Meier's Civilization IV had extensive use of python scripting.
__________________
See the elves and everything! http://angband.oook.cz
pav is offline   Reply With Quote
Old February 23, 2009, 23:17   #17
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by konijn_ View Post
A script language is not about _you_ , it's about the _users_.
So if you really think that indentation based code is more intuitive than c like code, fine. But again, the choice should not be solely based on what the developer likes. Notice though that very few ( I cant find any, but I didn't look hard ) script engines for game use python. I wonder why ?
Hmm. I do think Python is a lot more intuitive than C, but that's not the point here - we're essentially talking about modding the game, not rewriting it. Personally I think a well-designed and well-written game should allow modding by nothing more than editing of text files (and providing your own gfx/sounds/etc.) - so having to use any scripting language is IMO a bad thing. This is essentially the case with Angband, as you can add races, classes, stores, monsters, spells and items in the text files, and with very little work you could add breath weapons and other monster attacks (which are currently in the code but could easily be in text files instead). Just about the only thing you couldn't do in a text file is add an entirely new effect, for which there is no existing code.

My original position was that if you have to use a scripting language, at least use one which is worth your users learning; one they can use to do other things. Python fulfils this, and Lua doesn't. I read Zaimoni's comments about the Python dev team with interest, and perhaps Python isn't quite as great as I had previously thought - but it's still a whole lot more useful than lua.

CC
Magnate is offline   Reply With Quote
Old February 24, 2009, 00:28   #18
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,383
Donated: $40
Pete Mack is on a distinguished road
@magnate--script languages ARE text files. That is the whole point. With a script, it's possible to create a new activation or spell without any change to the source.

With table-based text files, there needs to be a small code fragment in the source for each genuinely new activation. Also, it's not possible to write effects that depend on character level or spell power without some logic. That means either script or C.

I'm not arguing in favor of script language, necessarily, but your argument doesn't convince. Certainly, I find the UnAngband model easier to read than the ToME model--I somewhat prefer having the code separate from the data in the UnAngband manner. But I haven't seen T3. Using a script language is likely to make modding easier. But clean source is more important still, whether the source is C or lua.
Pete Mack is offline   Reply With Quote
Old February 24, 2009, 09:26   #19
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by Pete Mack View Post
@magnate--script languages ARE text files. That is the whole point. With a script, it's possible to create a new activation or spell without any change to the source.

With table-based text files, there needs to be a small code fragment in the source for each genuinely new activation. Also, it's not possible to write effects that depend on character level or spell power without some logic. That means either script or C.

I'm not arguing in favor of script language, necessarily, but your argument doesn't convince. Certainly, I find the UnAngband model easier to read than the ToME model--I somewhat prefer having the code separate from the data in the UnAngband manner. But I haven't seen T3. Using a script language is likely to make modding easier. But clean source is more important still, whether the source is C or lua.
Agreed about clean source, but are you really saying that there is no difference to the end user between using formatted text files (which require knowledge of the game mechanics but nothing else), and having to learn a scripting language? Or are you saying that if the scripting language is implemented properly, it's transparent to the end user? (I'm not sufficiently familiar with script-enabled games to know whether this is possible.)

I don't agree with your middle point btw: I can't see any reason why it's not possible to make entries in text files dependent on clev (or mlev or spell power or anything else), providing the code exists to parse that. As you say, you need code for anything completely new - but it would be simple to edit init1.c to allow for level-dependent effects in text files.

I guess it's a case of YMMV. Ultimately you might be right - a scripting language might make modding easier - and it would definitely make modding more extensive. But as Konjin said, it's about the users, and I think quite a number of modders would be put off by having to learn one. I don't think we'd have had JLE's input to Angband if he'd had to learn Lua, for example.

CC
Magnate is offline   Reply With Quote
Old February 24, 2009, 09:35   #20
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,383
Donated: $40
Pete Mack is on a distinguished road
Quote:
Originally Posted by Magnate View Post
I don't agree with your middle point btw: I can't see any reason why it's not possible to make entries in text files dependent on clev (or mlev or spell power or anything else), providing the code exists to parse that. As you say, you need code for anything completely new - but it would be simple to edit init1.c to allow for level-dependent effects in text files.
That's what a scripting language is, more or less--a few if..else statements embedded in a text file. (Lua is not hard to understand, at all. Sort of a mini-C with extra string facilities, tiny compared to perl or python.)
Pete Mack is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Z+] LUA scripting Doken Variants 2 October 16, 2008 23:02


All times are GMT +1. The time now is 22:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.