SDL2 port when ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • t4nk
    Swordsman
    • May 2016
    • 335

    #46
    Originally posted by Nick
    Thanks, I have merged these.

    The latest build on the nightlies page has this plus a failed attempt to get the standard build system to build the SDL2 port. I have at least left it so that the build system works if you don't try to use SDL2, and so that you can use Makefile.sdl2 to use the SDL2 port. If anyone is better at getting the build system and autotools to work (and surely someone must be), please have a go.
    Thanks, Nick! After some f...g around it seems to work for me:
    Looks like there were three things wrong: main-sdl2.c: USE_SDL2 is defined in autoconf.h, so it must be included (via angband.h) before "ifdef USE_SDL2". configure.ac: AM_PATH_SDL2, o...

    At least, it brings us closer to the goal, I think

    Comment

    • fph
      Knight
      • Apr 2009
      • 956

      #47
      Works for me, too (Ubuntu 18.04), after installing the sdl2 devel packages and running autogen.sh from scratch. Thanks t4nk!
      --
      Dive fast, die young, leave a high-CHA corpse.

      Comment

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9351

        #48
        Originally posted by t4nk
        Thanks, Nick! After some f...g around it seems to work for me:
        Looks like there were three things wrong: main-sdl2.c: USE_SDL2 is defined in autoconf.h, so it must be included (via angband.h) before "ifdef USE_SDL2". configure.ac: AM_PATH_SDL2, o...

        At least, it brings us closer to the goal, I think
        Awesome! That all works for me too - you can't configure with both SDL2 and SDL, but (a) they both work separately and (b) why would you want to? That's merged now and the new build is up on the nightlies page. I guess at some point the guts of Makefile.sdl2 can be rolled into Makefile.std and Makefile.sdl2 removed.

        The thing that was really getting me was why I couldn't get it to use sdl2-config, which I assume was the AM_PATH_SDL2 thing. Thanks for clearing that up
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

        • t4nk
          Swordsman
          • May 2016
          • 335

          #49
          Originally posted by Nick
          Awesome! That all works for me too - you can't configure with both SDL2 and SDL
          It's impossible to link with both at the same time anyway - they have plenty of functions with same names (and use headers with same names, too, like that SDL.h). The build system should probably prevent attempts to use both... alternatively, consider deprecating SDL1

          I guess at some point the guts of Makefile.sdl2 can be rolled into Makefile.std and Makefile.sdl2 removed.
          Well, if you want to revive Makefile.std, I can do it.
          I also noticed that the long-standing bug with panel redraws while running is still there. I should probably fix that, too.
          Again, in several days, maybe

          Comment

          • fph
            Knight
            • Apr 2009
            • 956

            #50
            Issue: the SDL2 port does not display the cursor. This makes the 'look' command, for instance, almost unusable.
            --
            Dive fast, die young, leave a high-CHA corpse.

            Comment

            • t4nk
              Swordsman
              • May 2016
              • 335

              #51
              Originally posted by fph
              Issue: the SDL2 port does not display the cursor. This makes the 'look' command, for instance, almost unusable.
              You probably disabled it in menu? (the one in the top left corner: Menu -> Angband -> Cursor). TBH, I don't even remember why this option is there

              Comment

              • fph
                Knight
                • Apr 2009
                • 956

                #52
                Yep, good call, thanks! I must have clicked on it inadvertently when I was playing around to get the window sizes right.
                Last edited by fph; October 7, 2018, 16:09.
                --
                Dive fast, die young, leave a high-CHA corpse.

                Comment

                • wkmanire
                  Rookie
                  • Jun 2017
                  • 5

                  #53
                  Looking good!

                  I tried out the new SDL2 graphics mode and it is really looking great. I love the @ background too. I have a couple of suggestions for the menu behavior though.

                  Toggling Menu Items
                  For toggle-able menu options, such as whether to show the cursor or not, there really should be some kind of checkbox interface. When menu items are "greyed out" or "black", they seem like they're disabled and not available for being clicked on as opposed to being toggled off.

                  Resizing Windows
                  For some reason, I did not see the resize and move options in the right hand side of the menu bar for a good 5 minutes. I kept searching for a way to resize the windows the same way it worked in the SDL1.2 version. I think this new design is clean and it reduces the possibility of accidentally moving or resizing windows (for people that use the mouse to interact with the game). At the same time, it's probably not intuitive, especially for users going to SDL2 from SDL1. I don't have a suggestion for how to improve this though, other than the standard resize behavior of mousing over the border of a window and seeing the cursor change.

                  Great work dudes! Looking forward to seeing this UI land in an official release.
                  Experience Points: 19 dead characters

                  Comment

                  • t4nk
                    Swordsman
                    • May 2016
                    • 335

                    #54
                    Hi, thanks for feedback! Sorry for abandoning you guys temporarily.

                    Originally posted by wkmanire
                    I tried out the new SDL2 graphics mode and it is really looking great. I love the @ background too. I have a couple of suggestions for the menu behavior though.

                    Toggling Menu Items
                    For toggle-able menu options, such as whether to show the cursor or not, there really should be some kind of checkbox interface. When menu items are "greyed out" or "black", they seem like they're disabled and not available for being clicked on as opposed to being toggled off.
                    Reasonable complaint. Perhaps the text of menu items should also be highlighted on mouseover? (like buttons do)

                    Resizing Windows
                    For some reason, I did not see the resize and move options in the right hand side of the menu bar for a good 5 minutes. I kept searching for a way to resize the windows the same way it worked in the SDL1.2 version. I think this new design is clean and it reduces the possibility of accidentally moving or resizing windows (for people that use the mouse to interact with the game). At the same time, it's probably not intuitive, especially for users going to SDL2 from SDL1. I don't have a suggestion for how to improve this though, other than the standard resize behavior of mousing over the border of a window and seeing the cursor change.
                    Actually the main reason for doing the UI like that was what Grotug said ("I don't like to see any elements that aren't part of the game on my screen. Therefore, it's really important to me to have the main Angband window take up as much of my screen as possible, and for there to be no white space anywhere on the screen ...")
                    One of the things I really didn't like about SDL1 port is that UI elements are small and bright (yellow), while the game itself is very dark. Small, bright elements of dark background attract attention, which is the opposite of how the UI should be - it's the game that is the foreground, and UI is background! The buttons (especially "Size" and "Move") are hard to notice, which is a problem, but on the other hand, it's a feature
                    Anyway, it's indeed a bit of a problem and I think the way to fix it is to add "Help" item to the menu, which will display a short help file, describing how to use the UI. Come to think of it, I can reuse Angband's help reader for that... Anyone wants to write the help file?

                    Comment

                    • Bandobras
                      Knight
                      • Apr 2007
                      • 676

                      #55
                      Oooh, great news! I'd like to try that. I couldn't find any summary on the first post of this thread. Could you tell me how to compile your work? Is it on some branch or just master?
                      Last edited by Bandobras; January 20, 2019, 00:25.

                      Comment

                      • fph
                        Knight
                        • Apr 2009
                        • 956

                        #56
                        @Bandobras: it is in master. I have recently posted instructions on how to compile it (for Linux) in another thread: http://angband.oook.cz/forum/showpos...63&postcount=9 .
                        --
                        Dive fast, die young, leave a high-CHA corpse.

                        Comment

                        • Bandobras
                          Knight
                          • Apr 2007
                          • 676

                          #57
                          Thank you very much. I've got it to compile on Ubuntu 16.04 with `./configure --with-no-install --enable-sdl2 --disable-sdl2-mixer` and it runs perfectly, except for 2 quirks. First, I couldn't get rid of the transparency and actually start playing until I quit and restarted for the first time. Second, I can't get rid of the top row, the SDL menu. If the "Top" option is supposed to show/hide it, it doesn't and it seems to have no effect.

                          Comment

                          • t4nk
                            Swordsman
                            • May 2016
                            • 335

                            #58
                            Originally posted by Bandobras
                            First, I couldn't get rid of the transparency and actually start playing until I quit and restarted for the first time.
                            What do you mean "get rid of transparency"?

                            Second, I can't get rid of the top row, the SDL menu.
                            It's always shown. I considered adding an option to hide it, but decided that it's small enough already.

                            If the "Top" option is supposed to show/hide it, it doesn't and it seems to have no effect.
                            This option is applied to terms (subwindows), and it means "always on top". This can be useful if you play with a mouse (except noone plays Angband with a mouse )
                            Someone really should write a readme
                            I am still pretty busy ATM, but hopefully soon I will find some time to work on the port. In the meantime, people, keep reporting about various issues!

                            Comment

                            • Bandobras
                              Knight
                              • Apr 2007
                              • 676

                              #59
                              All fair enough.

                              Originally posted by t4nk
                              What do you mean "get rid of transparency"?
                              Initially the game window was partially transparent, with the @ warrior picture below it. Which was quite distracting. When I restarted, either the main game window became fully opaque, or the picture below vanished. Anyway, the background is black now, which is what I wanted.

                              Comment

                              • Bandobras
                                Knight
                                • Apr 2007
                                • 676

                                #60
                                BTW, I'd like to report the scaled font I'm aspiring to contribute to Angband (https://github.com/angband/angband/b...s/16x16xw.woff) works fine with the SDL2 frontend. The only problem: 'size' ends at 21 points, and the font (being cheaply generated from a bitmap font) looks best at 16, 24, 32, etc. For 4K monitors it would make sense to bump it to 32 or even 64.
                                Last edited by Bandobras; January 26, 2019, 11:15.

                                Comment

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