LUA in roguelikes - yes or no?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pav
    Administrator
    • Apr 2007
    • 793

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

    Comment

    • Magnate
      Angband Devteam member
      • May 2007
      • 5110

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

      Comment

      • Pete Mack
        Prophet
        • Apr 2007
        • 6883

        #18
        @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.

        Comment

        • Magnate
          Angband Devteam member
          • May 2007
          • 5110

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

          Comment

          • Pete Mack
            Prophet
            • Apr 2007
            • 6883

            #20
            Originally posted by Magnate
            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.)

            Comment

            • Magnate
              Angband Devteam member
              • May 2007
              • 5110

              #21
              Pav - any chance you could move this thread to the Development forum?
              "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

              Comment

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