LUA in roguelikes - yes or no?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PaulBlay
    Knight
    • Jan 2009
    • 657

    LUA in roguelikes - yes or no?

    I admit to a certain degree of confusion as to exactly what LUA does for you (and how it should be added to a project). There are a number of variants that use it, and many that don't. And I don't see that ones 'with' are doing things that ones 'without' can't (but maybe I'm missing stuff).

    Anyway, your thoughts please.
    17
    Yes, it's essential.
    0%
    2
    I suppose so, it can be useful.
    0%
    4
    It's not really worth having but it's no big deal.
    0%
    5
    No, I hate it!
    0%
    6
    Currently turning (Angband) Japanese.
  • Psi
    Knight
    • Apr 2007
    • 870

    #2
    As WinCE is one of the few platforms that LUA does not compile on, I'd rather it vanished from the Roguelike landscape.

    Comment

    • PaulBlay
      Knight
      • Jan 2009
      • 657

      #3
      Originally posted by Psi
      As WinCE is one of the few platforms that LUA does not compile on, I'd rather it vanished from the Roguelike landscape.
      At least that's a nice clear opinion and reason. Thanks.
      Currently turning (Angband) Japanese.

      Comment

      • zaimoni
        Knight
        • Apr 2007
        • 590

        #4
        The only Angband variant that clearly uses Lua to do things that are painful in C, is ToME. (Not impossible, just painful: casting function pointers around to what they need to be.) Lua's prioritization of backward compatibility makes it a very reasonable choice of C-extension language, in spite of its feature similarity to C.
        Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
        Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
        Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

        Comment

        • takkaria
          Veteran
          • Apr 2007
          • 1951

          #5
          Originally posted by Psi
          As WinCE is one of the few platforms that LUA does not compile on, I'd rather it vanished from the Roguelike landscape.
          That's more a deficiency of the C compiler for WinCE than it is of Lua, though...
          takkaria whispers something about options. -more-

          Comment

          • takkaria
            Veteran
            • Apr 2007
            • 1951

            #6
            Originally posted by PaulBlay
            I admit to a certain degree of confusion as to exactly what LUA does for you (and how it should be added to a project). There are a number of variants that use it, and many that don't. And I don't see that ones 'with' are doing things that ones 'without' can't (but maybe I'm missing stuff).

            Anyway, your thoughts please.
            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).
            takkaria whispers something about options. -more-

            Comment

            • Pete Mack
              Prophet
              • Apr 2007
              • 6883

              #7
              Originally posted by takkaria
              That's more a deficiency of the C compiler for WinCE than it is of Lua, though...
              That may or may not be the case. It's not constructive though, and a quick google shows that it is possible to use lua on WinCE, with a little effort.

              Comment

              • Psi
                Knight
                • Apr 2007
                • 870

                #8
                Originally posted by takkaria
                That's more a deficiency of the C compiler for WinCE than it is of Lua, though...
                WinCE lacks some of the standard C library functions that Lua depends on. I'm not going to defend WinCE - it just happens to be the platform that I always have available

                Comment

                • CJNyfalt
                  Swordsman
                  • May 2007
                  • 289

                  #9
                  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.

                  Comment

                  • Variaz
                    Portralis Maintainer
                    • Jul 2007
                    • 21

                    #10
                    In Portralis, I use lua a lot to make customizable monsters, abilities, complex quests with events, etc... So in my case, LUA has proven to be very useful, especially since sometimes, you can post fixes to very annoying bugs without having to make a release just for it.

                    Comment

                    • konijn_
                      Hellband maintainer
                      • Jul 2007
                      • 367

                      #11
                      Originally posted by takkaria
                      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! *

                      Comment

                      • Nick
                        Vanilla maintainer
                        • Apr 2007
                        • 9637

                        #12
                        Originally posted by konijn_
                        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.

                        Comment

                        • Magnate
                          Angband Devteam member
                          • May 2007
                          • 5110

                          #13
                          Originally posted by CJNyfalt
                          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
                          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                          Comment

                          • konijn_
                            Hellband maintainer
                            • Jul 2007
                            • 367

                            #14
                            Originally posted by Magnate
                            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! *

                            Comment

                            • zaimoni
                              Knight
                              • Apr 2007
                              • 590

                              #15
                              Originally posted by konijn_
                              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.)
                              Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
                              Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
                              Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎