Help for a Newbie Programmer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • billiam106
    Rookie
    • Jan 2010
    • 4

    Help for a Newbie Programmer

    Hello Angband community! I'm hoping to get a little help with working with the Angband source code. I have a rudimentary knowledge of C, so really all I need is a push in the right direction.

    I've been a long time player, and I *really* enjoy OoD monsters/pits/vaults. They are to me the type of thing that keeps me coming back. So imagine my dismay when I finally get around to upgrading to the newest version of Angband, and there is no autoscummer!

    I know a lot of people don't like it, but I would like to ask for some help in hacking it back in there -- Is the level autoscumming code still floating around somewhere?

    I run a mac with xcode installed, and I'm pretty sure I can compile Angband that way (I don't really want to install code warrior). So here is what I'm asking you fine fellow Angband-ers

    1) A link (or perhaps an email including) the scumming code
    2) A hint of where/how to put it in. I'm fairly sure it goes in the generate.c, but clarification on this would be awesome
    3) A quick explanation of if/how to use the makefile. I've read some of the stuff on how to compile Angband, but it is all with CodeWarrior, so perhaps an xcode explanation would be rad.

    Or maybe one of you fearless coders has already done all this and can send me a version! Who knows.

    Anyway, THANKS!!! This is a sort of needy first post, and I appreciate any and all help
  • tummychow
    Apprentice
    • Sep 2009
    • 93

    #2
    I'm sure you can find it if you look in back builds on rephial's code repository.
    By the way, Angband is done in C++, and advanced C++ at that. C++ is far beyond C in nature and, in addition, Angband implements a heavy dose of curses (at least for windows, but probably also for mac). (I program C++ in my spare time and let me tell you, curses is at least upper-mid-level.) If your programming knowledge really reaches that deep into C++, I believe you can find the code for current versions pretty easily. The old code however I'm not sure where to find. This directory, whose purpose I cannot quite ordain, might be of service: http://trac.rephial.org/browser

    Comment

    • konijn_
      Hellband maintainer
      • Jul 2007
      • 367

      #3
      Originally posted by billiam106
      <big snip>

      Anyway, THANKS!!! This is a sort of needy first post, and I appreciate any and all help
      Greetings & Welcome,

      since you love the 'unusual rooms' I would not put in the scum patch, but consider changing the DUN_UNUSUAL constant.

      If you look at the following statement in generate.c

      /* Attempt an "unusual" room */
      if (randint0(DUN_UNUSUAL) < p_ptr->depth)

      In current angband DUN_UNUSUAL is 200, reducing this constant will give you more special rooms, or you replace p_ptr->depth with a constant, whatever suits you.

      I don't know how to build within XCode, but from the command line,
      Code:
      make -fmakefile.osx
      should work.

      Cheers,
      T.
      * Are you ready for something else ? Hellband 0.8.8 is out! *

      Comment

      • billiam106
        Rookie
        • Jan 2010
        • 4

        #4
        konijn: GREAT idea!! I fiddled with that and now Angband is creating some truly devilish rooms *cackles*

        thanks!

        Comment

        • Pete Mack
          Prophet
          • Apr 2007
          • 6883

          #5
          Also, use:
          $ make -f Makefile.osx OPT=-g
          for debug symbols. (Debugger won't work fully without them.)

          Comment

          • Nick
            Vanilla maintainer
            • Apr 2007
            • 9634

            #6
            Originally posted by tummychow
            By the way, Angband is done in C++, and advanced C++ at that.
            No, it's all C.
            One for the Dark Lord on his dark throne
            In the Land of Mordor where the Shadows lie.

            Comment

            • Pete Mack
              Prophet
              • Apr 2007
              • 6883

              #7
              @Nick: whoosh.

              Comment

              • Nick
                Vanilla maintainer
                • Apr 2007
                • 9634

                #8
                Originally posted by Pete Mack
                @Nick: whoosh.
                Twice, apparently...
                One for the Dark Lord on his dark throne
                In the Land of Mordor where the Shadows lie.

                Comment

                • konijn_
                  Hellband maintainer
                  • Jul 2007
                  • 367

                  #9
                  Originally posted by Pete Mack
                  Also, use:
                  $ make -f Makefile.osx OPT=-g
                  for debug symbols. (Debugger won't work fully without them.)
                  Actually, I would use -ggdb.
                  Without it I could not attach XCode to the process, YMMV.

                  T.
                  * Are you ready for something else ? Hellband 0.8.8 is out! *

                  Comment

                  • Pete Mack
                    Prophet
                    • Apr 2007
                    • 6883

                    #10
                    @konijn - Didn't know about that one.

                    You can also make an XCode project, so long as you use the same -D and -I flags as in Makefile.osx (the link flags too, though XCode will give most of those by default.)

                    Comment

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