Hellband OnLine

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • konijn_
    Hellband maintainer
    • Jul 2007
    • 367

    Hellband OnLine

    Greetings,

    just using this as a dumping ground for my efforts.

    Basically I am converting/rewriting HellBand so it can work in a browser.

    Why ? I had some good reasons but in the end it seems to be one of the projects I can come back to after a hiatus.

    I wanted to share one of the 'design decisions' with regards to the evil cave*bold macros's.

    //cave _floor_bold(y,x) -> cave[x,y].isLevel()
    //cave_ empty_bold(y,x) -> !cave[x,y].isOccupied()
    //cave _clean_bold(y,x) -> cave[x,y].isClean()
    //cave _naked_bold(y,x)-> cave[x,y].isEmpty()

    isLevel standing for 'flat' aka its a floor like cell. No walls or doors or bushes or trees or water. clean stands for no objects left. Empty means regular floor, clean and not occupied.

    How would you call this stuff ?

    T.
    * Are you ready for something else ? Hellband 0.8.8 is out! *
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9634

    #2
    Originally posted by konijn_
    Basically I am converting/rewriting HellBand so it can work in a browser.
    I think that's a brilliant idea. I've thought about doing that from time to time, but have never known if I actually could.

    //cave _floor_bold(y,x) -> cave[x,y].isLevel()
    //cave_ empty_bold(y,x) -> !cave[x,y].isOccupied()
    //cave _clean_bold(y,x) -> cave[x,y].isClean()
    //cave _naked_bold(y,x)-> cave[x,y].isEmpty()

    isLevel standing for 'flat' aka its a floor like cell. No walls or doors or bushes or trees or water. clean stands for no objects left. Empty means regular floor, clean and not occupied.

    How would you call this stuff ?
    It looks kind of neat, but I have no strong feelings about it. I'm sure others will
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • takkaria
      Veteran
      • Apr 2007
      • 1951

      #3
      A quick history lesson from #angband-dev:

      Code:
      2:44 < konijn> greetings
      22:44 < konijn> I have a question for historians
      22:44 < konijn> cave_empty_bold
      22:44 < konijn> why bold ??
      22:44 < konijn> what does it stand for ?
      ... some time later ...
      18:43 < ajps> Aw, konijn's gone
      18:44 < ajps> That bold question intrigued me, so I did some digging
      18:44 < ajps> It's bold because it makes assumptions about still being on the map, rather than cautious and doing 
                    bounds-checking, etc
      18:44 < ajps> Sorry, add "" liberally around words like "bold" for a proper Ben-like effect
      takkaria whispers something about options. -more-

      Comment

      • konijn_
        Hellband maintainer
        • Jul 2007
        • 367

        #4
        Originally posted by takkaria
        A quick history lesson from #angband-dev:
        Thanks, it is kind of bold. I might be a good idea to "unbold" those macro's ? Its not as if speed is a concern any more.

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

        Comment

        • PaulBlay
          Knight
          • Jan 2009
          • 657

          #5
          Originally posted by konijn_
          Thanks, it is kind of bold. I might be a good idea to "unbold" those macro's ? Its not as if speed is a concern any more.

          T.
          From ...

          Code:
          #define cave_floor_bold(Y,X) \
          	(!(cave_info[Y][X] & (CAVE_WALL)))
          To ...

          Code:
          #define cave_floor(Y,X) \
          	(!(cave_info[Y][X] & (CAVE_WALL)) && in_bounds_fully(Y,X))
          ?

          Also note that in_bounds_fully should use TOWN_WID and TOWN_HGT when on dlvl 0.
          Currently turning (Angband) Japanese.

          Comment

          • konijn_
            Hellband maintainer
            • Jul 2007
            • 367

            #6
            Originally posted by PaulBlay
            From ...
            Code:
            #define cave_floor(Y,X) \
            	(!(cave_info[Y][X] & (CAVE_WALL)) && in_bounds_fully(Y,X))
            You would have to do in_bounds_fully first so that the cave_info access can be prevented if the x or y are out of bounds.

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

            Comment

            • konijn_
              Hellband maintainer
              • Jul 2007
              • 367

              #7
              I am working the conversion as if I start a new character , starting with birth.c which requires some form of input and output.

              I am now in the last birth screen where mana calculation is done and where for the first time an equipment slot is mentioned ( wearing gloves is bad for mana ).

              So I am integrating items now.

              Base class is 'gizmo' which is anything that can be picked up by the player and be used somehow ( everything that is derived from k_info.txt ).

              For this I am scripting k_info text , which takes an enormous amount of time.

              One of the things that I have not found a good nomer for is 'pval' since its meaning is so different depending on the item type.

              I am also reworking rarity :

              1 Common
              2 Uncommon
              4 Special
              8 Exotic
              16 Rare
              32 Very Rare
              64 Ultra Rare

              So that a:20/8:30/4:40/1

              Becomes
              .rarity1 = "exotic20";
              .rarity2 = "special30";
              .rarity3 = "common40";

              I hope that is somewhat more understandable

              Just did the rings, am advancing nicely.

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

              Comment

              • konijn_
                Hellband maintainer
                • Jul 2007
                • 367

                #8
                Originally posted by konijn_
                1 Common
                2 Uncommon
                4 Special
                8 Exotic
                16 Rare
                32 Very Rare
                64 Ultra Rare
                So,
                I had to check my notes all the time for which value has which name.
                New descriptions are in place

                common
                not_so_common
                uncommon
                not_so_rare
                rare
                very_rare
                ultra_rare
                * Are you ready for something else ? Hellband 0.8.8 is out! *

                Comment

                • konijn_
                  Hellband maintainer
                  • Jul 2007
                  • 367

                  #9
                  All items are converted, quite a few bugs found in the k_info that were preventing items from being generated, there I was thinking I was just unlucky ;]

                  Finished the gear class which governs both equipment slots and the backpack.

                  'Finished' the evil mana calculation conversion, xcept it doesnt work so now am debugging for the first time Hellband in js...

                  I already wrote the town generation code, once I get mana calculaton right, I might have an @ working around on a screen somewhere this month.

                  Of note, I have contacted the author of spiderape and convinced him to port his javascript curses binding to the Google V8 engine. javascript can now use curses on linux machines and in some further future on Windows I assume.

                  That and XULrunner give any author the option to write standalone apps, online apps or even curses apps if one is so inclined.

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

                  Comment

                  • konijn_
                    Hellband maintainer
                    • Jul 2007
                    • 367

                    #10
                    Hah, 1 month...

                    @ is now running around in the town, which is properly generated.
                    Big question is now, first items or first monsters ?
                    The 16 of RL says monsters first, so I am re-reading monster1.c and monster2.c

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

                    Comment

                    • konijn_
                      Hellband maintainer
                      • Jul 2007
                      • 367

                      #11
                      Originally posted by konijn_
                      Hah, 1 month...

                      @ is now running around in the town, which is properly generated.
                      Big question is now, first items or first monsters ?
                      The 16 of RL says monsters first, so I am re-reading monster1.c and monster2.c

                      T.
                      Originally posted by konijn_
                      Hah, 1 month...

                      @ is now running around in the town, which is properly generated.
                      Big question is now, first items or first monsters ?
                      The 16 of RL says monsters first, so I am re-reading monster1.c and monster2.c

                      T.
                      Monsters read and mostly understood
                      I actually changed nothing in r_info.txt and pasted it verbatim into the js script which supports multiline strings. This way I can easily port back changes from the js version to the C versiona and vice versa. The amount of spelling mistakes in r_info is somewhat depressing, still a lot of work ahead of me.

                      I also took out the compile time option of 'hordes', did anyone ever play with hordes compiled into a 'Band ?

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

                      Comment

                      • konijn_
                        Hellband maintainer
                        • Jul 2007
                        • 367

                        #12
                        Monsters now get properly parsed, selected and put on the map.

                        Friends, escort and escorts do not work yet.

                        Birth items and wizard commands are next.

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

                        Comment

                        • Sirridan
                          Knight
                          • May 2009
                          • 560

                          #13
                          I've checked out hellband.net, it's going along quite nicely, much Kudos to you! Is there any way to enter buildings or go down into the dungeon yet?

                          Comment

                          • konijn_
                            Hellband maintainer
                            • Jul 2007
                            • 367

                            #14
                            No,

                            I would like to complete basic wizard commands and items, then get into dungeons, shops is probably really late in the list..

                            Since this is all very prototype, I guess testers will have to get their items thru wizard commands ;]

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

                            Comment

                            • konijn_
                              Hellband maintainer
                              • Jul 2007
                              • 367

                              #15
                              So,

                              monsters are generated now.
                              Birth items get set now.
                              pressing 'i' for inventory 'works' now.

                              I did not realize that the town dungeon had its width based on a screen that has the stats on the left size. Skewing the whole screen when the inventory appears, so that'll need some fixin'

                              I am flexible enough and get comments in small enough amounts that I can change my development plan according to input. So stores might actually get next.

                              Especially since the describe item is pretty tricky, I had to fix/run/fail/debug/fix/run/fail/debug waaay to often there. The stores should bring me a long way in finding the last bugs.

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

                              Comment

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