Angband Code Interface to GUI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pete Mack
    Prophet
    • Apr 2007
    • 6883

    #16
    The real guts of the graphics is in cave.c where the updates are done, and in z-term, which sends notifications to the various virtual terminals.

    You can figure out the contract, more or less, from main-xxx.c

    Comment

    • meeshoo
      Scout
      • Jan 2009
      • 27

      #17
      Thanks for info. I had a look at the z-term and main-xxx, main-win files and indeed there is where the fun happens, however I didn't know about cave.c, I will have a look at it too, but I pretty know what I have to do in the big picture, now I'm trying to build both Ogre3D and angband using code::blocks IDE & MinGW and then start an Ogre window from within angband. After I do that I will be able to focus more on the contract. As I said before I will also come up with a graphical design of the UI that I will post here for approval and suggestions. I will try to stay true to the original regarding messages and stats display, although using fancy graphics, the only true different thing will be the 3d view. I imagine first I will run both angband's original terminal and the 3d window which will have no interaction, it will just display what the other window does but in a fancy way, and only then work on the mouse interraction and menus that will allow the user to do certain actions without typing so many commands.

      Comment

      • Pete Mack
        Prophet
        • Apr 2007
        • 6883

        #18
        I was wrong about cave.c. The updates happen in dungeon.c

        Comment

        • meeshoo
          Scout
          • Jan 2009
          • 27

          #19
          Acknowledged

          Comment

          • AnonymousHero
            Veteran
            • Jun 2007
            • 1393

            #20
            I haven't worked on vanilla specifically, but I have a bit experience with the ToME code (which is probably reasonably similar), and I think you'll find that one of the major obstacles will be the way that Angband makes blocking calls to the UI. (I.e. control is basically inverted compared to how most UI toolkits/libraries work.)

            Comment

            • meeshoo
              Scout
              • Jan 2009
              • 27

              #21
              @AnonymousHero
              Thanks for the tip.

              Just wanted to say that I reached the first "milestone", that is setting my work environment. I managed to put an ogre application class (which is obviously just for testing, it won't be used at the end) into angband project (the Code::Blocks one) and built them all using MinGW. The next step will be to make some mockups of how I think the UI should look and, hopefully with your support, decide the best design of the interface, so it will be true to the original but in the same time it will be more user friendly in terms of interaction with the game.

              Some of the principles I thought of until now are:

              1. 3d view of character and it's surroundings, with possibility of moving the camera around and orbiting
              2. animations for characters, abilities and mobs
              3. fog of war effect on the visited but not lighted areas
              4. different textures for the type of wall you are seeing
              5. messages will appear in an expandable and scrollable list
              6. the status of the character (hungry, poison, etc) will be displayed in a status bar as it is now, but I will also put visual indication in the character's look
              7. HP and SP will be displayed as bars but with numbers on them to display their exact values.
              8. The rest of the stats won't be displayed all the time like they are now, but they can be displayed by opening a window that will display everything about character
              9. The user will be able to bring up a map that will look pretty much like the original one that will give the user the information it lacks. alternatively, this map can be just a zoom-out of the 3d view with an orthogonal projection, I haven't yet decided about it.
              10. Nice inventory and equipment windows (ala diablo style)
              11. Current spell selection, the user will be able to expand a list with all spellbooks and when pointing a book another menu will appear where the wanted spell can be selected, and it will remain selected as current, you will be able to cast it until you select another one.

              Please share any thoughts you have, and I will take them into considerration when I'll build the mock-ups.

              Comment

              • buzzkill
                Prophet
                • May 2008
                • 2939

                #22
                Are you talking about a first person, full-screen 3d, or a top down 3d view?
                www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
                My banding life on Buzzkill's ladder.

                Comment

                • meeshoo
                  Scout
                  • Jan 2009
                  • 27

                  #23
                  A top down view only when you want to see the map, the rest a 3rd person view, much like diablo was, but full 3d and with all types of camera movement (scroll, zoom, orbit).

                  Comment

                  • Elsairon
                    Adept
                    • Apr 2007
                    • 117

                    #24
                    I've thought about this for a while and I applaud your idea. What balked me was the thought of making so many hundreds of 3d models.

                    Saving time by using plain color models without skins and different colors for e.g. different ego swords for starters.

                    Comment

                    • Lebannen
                      Apprentice
                      • Apr 2008
                      • 61

                      #25
                      As a placeholder even 3D letters would be a good start

                      I think this would be lovely to see implemented, and could certainly extend the market Angband appeals to. I'm thinking Final Fantasy Tactics here - I know that was sprite based, but proper 3D would in many ways bypass a lot of issues with current drawing code.

                      You may also want to take a look at isometric mode in the variants that implement it, as that may have solved some issues in the code - Unangband is an example which supports isometric mode, although I think it was only Isoband/ZangbandTK which properly tackled isometric mode instead of just skewing the drawn field as Unangband does.

                      Comment

                      • andrewdoull
                        Unangband maintainer
                        • Apr 2007
                        • 872

                        #26
                        Originally posted by Lebannen
                        Unangband is an example which supports isometric mode, although I think it was only Isoband/ZangbandTK which properly tackled isometric mode instead of just skewing the drawn field as Unangband does.
                        Probably the most significant point I'd like to mention from the Unangband implementation (and one reason why the code from IsoAngband was never adopted) is that in order to determine correct wall orientation, you need to know more about the map than is visible to the player (e.g. you need to know every grid adjacent to that which is visible to the player as well).

                        Or more correctly, you need to know the direction of wall connections for the visible grids. This could be passed as a single byte encoding each cardinal direction as one bit.

                        I'm not sure about whether the new Angband GUI code (not having looked at it too closely) makes this possible.
                        The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
                        In UnAngband, the level dives you.
                        ASCII Dreams: http://roguelikedeveloper.blogspot.com
                        Unangband: http://unangband.blogspot.com

                        Comment

                        • meeshoo
                          Scout
                          • Jan 2009
                          • 27

                          #27
                          Originally posted by Elsairon
                          I've thought about this for a while and I applaud your idea. What balked me was the thought of making so many hundreds of 3d models.

                          Saving time by using plain color models without skins and different colors for e.g. different ego swords for starters.
                          Well, it is pretty clear for me that I won't be able to supply those models from start, I am not a 3D artist (although i did some modeling in the past, but i'm an awful animator). I was thinking at first to keep everything with placeholders, the best idea I have is to have cubes of different colors with letters on all side, the same letters that are currently used in the game. Then, as we go, I think more and more people will contribute with models and such, I also have some friends to get us started. It is a long project, it won't be easy to do, also it is a community project that I expect to grow up slowly.

                          Originally posted by Lebannen
                          You may also want to take a look at isometric mode in the variants that implement it, as that may have solved some issues in the code - Unangband is an example which supports isometric mode, although I think it was only Isoband/ZangbandTK which properly tackled isometric mode instead of just skewing the drawn field as Unangband does.
                          Well, I think the isometric mode was very dependent on the point of view, basically you will have to put tiles in the right place based on the position of the viewer (as Andrew underlined too). With 3D things get way simpler. Imagine you have a huge flat horizontal grid with empty squares. Based on what information you receive from the game, you place blocks on those squares. These blocks can be either tall blocks(walls) or small blocks (floor tiles). This is how I imagine it in the simplest form. The blocks don't depend on camera view, so you don't have to orient them in any way, they just exist there as blocks sitting next to each other.

                          Anyway, those are implementation details, please submit any suggestions so I can incorporate them into my design.

                          Comment

                          • meeshoo
                            Scout
                            • Jan 2009
                            • 27

                            #28
                            Here is a mockup of how I think the interface should look. All "textures" use here are ofcourse just to separate the screen space and are too ugly to be used in the real inteface. The central 3d view is taken from a real time (diablo style) dungeon crawler called Darkstone, but I think it looks a bit like I imagine the angband 3d view will look.
                            Attached Files

                            Comment

                            • Narvius
                              Knight
                              • Dec 2007
                              • 589

                              #29
                              Just a thought:
                              Screw models. 3D letters are:
                              1. Possible to do*
                              2. Look nicer anyways =D

                              * Imagine a hobbit @. Imagine a AMHD. Imagine both of them being the same size. Feels odd. With letters, there won't be that problem.
                              If you can convincingly pretend you're crazy, you probably are.

                              Comment

                              • tigpup
                                Apprentice
                                • Apr 2007
                                • 94

                                #30
                                I also applaud your enthusiasm and efforts here.

                                However, although the interface you show above looks nice, it has a few obvious drawbacks compared to top-down view:

                                1. Would need a cut-away walls option.
                                2. On-screen area is too small to make telepathy (and to a lesser extent detection) meaningful.
                                3. The current top-down view abstacts some things that might be difficult to deal with in a 3D view. Like: floorstacking of objects/gold and the fact that a square can contain gold, objects (or a trap) and a monster. What would a 'busy' square like this look like in a 3D view?
                                4. A diagonal 3D view like this could change the aspect when considering movement. Which way is UP?
                                5. Hight of objects / view blocking. If there is a Hill Giant standing in front of this character, will I be able to see the character, or the small mushroom on the floor behind him?
                                6. Distance scaling. If the viewable play area is made bigger, do distant square become smaller? Top-down view shows everything as the same size, which makes detection and telepathy workable. Also, some players (like me) have the player always centre-in-the-screen. Others prefer the area view. I'm not sure how a 3D view would work with both of these options.

                                I'm not trying to throw a spanner in the works, I'm just trying to imagine what a view like this might look like in certain real-game circumstances.

                                Neil.

                                Comment

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