Sound/Message Use

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TricksterWolf
    Scout
    • Sep 2012
    • 43

    Sound/Message Use

    So, after a lot of headdesk, I think I figured something out.

    variable.c defines const char** angband_sound_name, and z-msg.h contains a corresponding enum of const ints. Neither one of these has any description or documentation, but they have to be in perfect sync for the sounds and messages to work properly. Is this correct?

    I have no idea how I was supposed to figure this out by myself, and I'm honestly gobsmacked by all the concrete dependencies between separate files with no documentation. I mean, I expect free software source to be bad, but not nearly this bad, particularly given the length of time Angband has been around. Is there something fundamental I'm missing about how to read and interpret the code base?
  • Derakon
    Prophet
    • Dec 2009
    • 9022

    #2
    I think what you're missing is that Angband has been around for 20 years and has only ever been worked on by hobbyists, who tend to lack the kind of dedicated energy needed to perform major overhauls of the codebase. Honestly Angband's code is in fantastic shape, considering that. There's a reason there've been so many more variants of Angband than, say, NetHack.

    I do sympathise with you though. The code isn't always easy to understand. My best advice is to hang out in the #angband-dev IRC channel on irc.freenode.net and ask for help there. Or post threads in the development forum here. There's really no need to try to go it alone.

    Comment

    • TricksterWolf
      Scout
      • Sep 2012
      • 43

      #3
      I appreciate the response and am not trying to criticize (you guys are all awesome srsly), though I did need to vent a bit. I just don't know why:

      // Names must match enum order in z-msg.h.

      ...isn't somewhere around line 245 of variable.c. I'm not requesting a rewrite of the entire code base*, just a clue here or there about where the large, game-destroying dependencies lie. Fortunately, it seems there is a strong correlation between "commonly edited" and "documented", at least, so this isn't popping up in every situation.

      * I'd love to rewrite it in Java, but honestly, that would be a bigger project than what I'm currently attempting.

      Comment

      • Derakon
        Prophet
        • Dec 2009
        • 9022

        #4
        We're working on the rewrite. Seriously. That's what Pyrel is -- a rewrite in Python with an eye towards keeping things easy to modify and better-documented. It's a slow process though, especially when developers are short on spare time.

        Comment

        • TricksterWolf
          Scout
          • Sep 2012
          • 43

          #5
          Oh, that's fantastic news!

          Python is a natural choice for the text version; but with the graphics and sound, wouldn't it be easier to write a platform-independent version in Java...?

          Comment

          • Derakon
            Prophet
            • Dec 2009
            • 9022

            #6
            Java has no inherent advantages in terms of making GUIs compared to Python, and they're both about equally cross-platform.

            In any event, 15k lines have been written so far, so I doubt we'll be switching languages.

            Comment

            • TricksterWolf
              Scout
              • Sep 2012
              • 43

              #7
              Neat. I'd love to help out sometime after my current project set cools off a bit, if you wouldn't mind.

              Comment

              • Derakon
                Prophet
                • Dec 2009
                • 9022

                #8
                Contributors are welcome. The project is on Bitbucket; the wiki should help get you started. Feel free to ask questions here or on IRC.

                Comment

                • takkaria
                  Veteran
                  • Apr 2007
                  • 1951

                  #9
                  Originally posted by TricksterWolf
                  I appreciate the response and am not trying to criticize (you guys are all awesome srsly), though I did need to vent a bit. I just don't know why:

                  // Names must match enum order in z-msg.h.

                  ...isn't somewhere around line 245 of variable.c. I'm not requesting a rewrite of the entire code base*, just a clue here or there about where the large, game-destroying dependencies lie. Fortunately, it seems there is a strong correlation between "commonly edited" and "documented", at least, so this isn't popping up in every situation.
                  You make a fair point. It is really unclear how the bits can fit together but we are actively working on fixing that so that the bits fit together in a more obvious way and you don't have two lists of the same things in different places. Takes time though!
                  takkaria whispers something about options. -more-

                  Comment

                  • molybdenum
                    Apprentice
                    • May 2013
                    • 84

                    #10
                    Originally posted by TricksterWolf
                    Is there something fundamental I'm missing about how to read and interpret the code base?
                    I've taken to thinking that working on Angband is like playing Angband. Some areas a nice and well lit and others are just nasty mazes filled with things that you should just run away from.

                    But yeah, it's a tricky code base to learn. Just keep poking around and eventually it will start to make some sense as to how things fit together.

                    Comment

                    • DaviddesJ
                      Swordsman
                      • Mar 2008
                      • 254

                      #11
                      Originally posted by TricksterWolf
                      I appreciate the response and am not trying to criticize (you guys are all awesome srsly), though I did need to vent a bit. I just don't know why:

                      // Names must match enum order in z-msg.h.

                      ...isn't somewhere around line 245 of variable.c.
                      Because you didn't submit it? I'm pretty sure that anyone who wants to help document the code is very welcome.

                      Comment

                      • TricksterWolf
                        Scout
                        • Sep 2012
                        • 43

                        #12
                        In all honesty? I'm actually not too good on the how-to-integrate-all-this-crap thing at the moment.

                        At present, I'm idly modifying my build and on occasion update my repo, but it's already pretty far from ang. I don't know how to separate out the changes that might benefit ang and/or submit them without duplicating work.

                        It's been a pretty rough go, in part because I cannot search some of the files properly. In most cases I think it's due to the preprocessor mangling things or the undocumented details being handled in one or two tiny places, but I suspect my IDE may be missing something due to the syntax that makes code look like comments in a couple of the files. It's hard to find stuff like, every place a particular stat is mentioned, for example. A lot of the changes I want to do are simple rewrites to names and descriptions for essential parts of the game.

                        At present I have a new scheme and setup for the attribute system (no naming changes but the stat values are all different and some calculations at birth have changed), redid all the sound files, am trying to add/remove some from the design, and have the monster and item lists planned for the next changes. As much as I want to handle folding in Z-like stuff (like separate spell categories and new spells and racial powers), those sorts of things are much, much harder to puzzle out so they'll be coming later.

                        Comment

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