SDL2 port when ?

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

    #31
    Originally posted by shirish
    @t4nk, I just did that, see above
    Good. We still have enough time: I'll amend the pull request tomorrow

    Comment

    • shirish
      Rookie
      • Aug 2018
      • 23

      #32
      @tn4k hope you are able to see my edited answer. It would be nice to have a windowed mode if possible, at least to show/share screenshots.

      something like -
      Code:
      $ ./angband --windowed
      Another one which might be of immense help is -

      Code:
      ./angband --version
      For the record apart from having skeleton as a wallpaper there isn't much difference in the SDL2 front-end.

      Also there is no sound.

      There also seems to be missing a debug-mode, something which tells what is going on

      Maybe at configure time I need to add some -debugging symbols as well ?
      Last edited by shirish; September 24, 2018, 17:27.

      Comment

      • t4nk
        Swordsman
        • May 2016
        • 336

        #33
        Originally posted by shirish
        @tn4k hope you are able to see my edited answer. It would be nice to have a windowed mode if possible, at least to show/share screenshots.
        Yes, I saw it. And there is a windowed mode! There is a menu in the top left corner with various functionality; clicking on "Fullscreen" toggles fullscreen on and off. Also, click on "Size" and "Move" buttons and drag the subwindows... Well, it shouldn't be hard to figure out (in my opinion )

        Code:
        ./angband --version
        Menu -> "About". Also the "V" command in Angband

        Comment

        • shirish
          Rookie
          • Aug 2018
          • 23

          #34
          right, my bad. So all looks good, except I don't hear either any sound or music

          Discover the magic of the internet at Imgur, a community powered entertainment destination. Lift your spirits with funny jokes, trending memes, entertaining gifs, inspiring stories, viral videos, and so much more from users.

          Comment

          • t4nk
            Swordsman
            • May 2016
            • 336

            #35
            For the record apart from having skeleton as a wallpaper there isn't much difference in the SDL2 front-end.
            The main differences are: the easier to use menu, less nasty color scheme, different method for controlling subwindows position and size, ability to use resizable fonts (put them in angband/lib/fonts directory), multiple windows.

            Originally posted by shirish
            Also there is no sound.
            Did you enable it in options? ("=" -> "User interface options" -> "Use sound").
            Sound is a bit problematic, because Angband uses MP3, which SDL2_mixer doesn't like very much. Alghough I'd expect Debian has it figured out (and used correct codecs when compiling SDL2_mixer...)

            There also seems to be missing a debug-mode, something which tells what is going on
            Hmm... why would you want debug mode?

            Comment

            • shirish
              Rookie
              • Aug 2018
              • 23

              #36
              Originally posted by t4nk
              The main differences are: the easier to use menu, less nasty color scheme, different method for controlling subwindows position and size, ability to use resizable fonts (put them in angband/lib/fonts directory), multiple windows.
              right.

              Originally posted by t4nk
              Did you enable it in options? ("=" -> "User interface options" -> "Use sound").
              Sound is a bit problematic, because Angband uses MP3, which SDL2_mixer doesn't like very much. Alghough I'd expect Debian has it figured out (and used correct codecs when compiling SDL2_mixer...)
              I can't see it in the menu, the options, it doesn't seem to be anywhere. I tried but perhaps I need a nudge to see in the right direction.



              Originally posted by t4nk
              Hmm... why would you want debug mode?

              Comment

              • t4nk
                Swordsman
                • May 2016
                • 336

                #37
                I can't see it in the menu, the options, it doesn't seem to be anywhere. I tried but perhaps I need a nudge to see in the right direction.
                Press "=" in game, then "a" ("User interface options"), then "b" twice ("Use sound"). From a cursory look, the option itself can't be compiled out, so it should be there.
                Angband's interface is far from ideal, don't you think? I imagine what many new players think when they try to figure out what to do with additional windows...

                Comment

                • shirish
                  Rookie
                  • Aug 2018
                  • 23

                  #38
                  Originally posted by t4nk
                  Press "=" in game, then "a" ("User interface options"), then "b" twice ("Use sound"). From a cursory look, the option itself can't be compiled out, so it should be there.
                  Angband's interface is far from ideal, don't you think? I imagine what many new players think when they try to figure out what to do with additional windows...
                  The options don't seem to be saved

                  I did try to see if ~/.angband/Angband has any options although ideally it should be using ~/.config/angband/$whatever to be in-line with freedesktop specifications but that's something for another day.

                  see https://specifications.freedesktop.o...t/ar01s02.html for what I mean but as shared that's something that angband people might think of looking into.

                  FWIW, even after toggling sound=yes I don't get any sound and there is also no way to know if that option is being saved in-game.

                  That's the reason I was thinking of having a debug-mode so you could knwo what all is happening, for things like this.

                  Comment

                  • t4nk
                    Swordsman
                    • May 2016
                    • 336

                    #39
                    Originally posted by shirish
                    The options don't seem to be saved
                    Well, that's the standard Angband thing... they're saved in the character savefile (and, if you run configure --with-no-install, the savefile is in angband/lib/save).

                    FWIW, even after toggling sound=yes I don't get any sound and there is also no way to know if that option is being saved in-game.

                    That's the reason I was thinking of having a debug-mode so you could knwo what all is happening, for things like this.
                    There are still some things we can do. We can look into object files:
                    Code:
                    ldd angband | grep mixer
                    and
                    Code:
                    nm angband | grep sound
                    (run them in the directory with the angband executable)

                    In any case, since there were some problems with compiling with sound initally, try to recompile:
                    Code:
                    make -f Makefile.sdl2 clean
                    SOUND=yes make -f Makefile.sdl2
                    Sound is a thing quite unrelated to main-sdl2.c... it doesn't require the SDL2 port at all and can work without it (still using the SDL2 library). I always suspected that Angband's sound doesn't work very well with SDL (either 1 or 2), but most people play without sound, so there weren't a lot of bug reports. Also, Angband on Windows uses the Windows method of playing sounds, instead of SDL.

                    Comment

                    • shirish
                      Rookie
                      • Aug 2018
                      • 23

                      #40
                      [QUOTE=t4nk;133428]Well, that's the standard Angband thing... they're saved in the character savefile (and, if you run configure --with-no-install, the savefile is in angband/lib/save). /QUOTE]

                      argh... that's horrible if I am seeing this right -

                      Code:
                      ~/games/angband-t4nk074/lib/save$ file Shirish 
                      Shirish: data
                      I was expecting a nice .json type file but it's not to be

                      Originally posted by t4nk
                      There are still some things we can do. We can look into object files:
                      Code:
                      ldd angband | grep mixer
                      and
                      Code:
                      nm angband | grep sound
                      (run them in the directory with the angband executable)

                      In any case, since there were some problems with compiling with sound initally, try to recompile:
                      Code:
                      make -f Makefile.sdl2 clean
                      SOUND=yes make -f Makefile.sdl2
                      Sound is a thing quite unrelated to main-sdl2.c... it doesn't require the SDL2 port at all and can work without it (still using the SDL2 library). I always suspected that Angband's sound doesn't work very well with SDL (either 1 or 2), but most people play without sound, so there weren't a lot of bug reports. Also, Angband on Windows uses the Windows method of playing sounds, instead of SDL.
                      I find games boring without having their own sounds and music , makes for an immersive experience.

                      I did as you shared and this time did hear a thunder but that's about it.


                      Code:
                      ~/games/angband-t4nk074$ ldd angband | grep sound
                      	libasound.so.2 => /usr/lib/x86_64-linux-gnu/libasound.so.2 (some memory address)

                      Code:
                      ~/games/angband-t4nk074$ nm angband | grep sound
                      00000000000acd60 T init_sound
                      00000000000e6da0 T init_sound_sdl
                      00000000000ac740 t load_sound
                      00000000000e6c40 t load_sound_sdl
                      000000000005abf0 T message_lookup_by_sound_name
                      00000000000aca40 T message_sound_define
                      000000000005ac40 T message_sound_name
                      00000000001633e0 b message_sounds
                      00000000001633d8 b next_sound_id
                      00000000000acca0 T parse_prefs_sound
                      000000000003e150 T play_ambient_sound
                      00000000000ac8a0 t play_sound
                      00000000000e6b50 t play_sound_sdl
                      00000000000acdf0 T print_sound_help
                      00000000000acd40 T register_sound_pref_parser
                      000000000005ac70 T sound
                      00000000001389a0 d sound_names.7204
                      00000000001389a0 d sound_names.7212
                      00000000001633d0 b sounds
                      000000000013da60 d supported_sound_files
                      00000000000e6bc0 t unload_sound_sdl
                      Nice. So it seems we have sounds, but doesn't seem to have any background music, although you might be better judge of that. Is that it as far as music is concerned ?

                      @Magnate , hope you are following the thread, please input if you have any questions/queries about sound/music etc as you know the game much better than I do.

                      Comment

                      • t4nk
                        Swordsman
                        • May 2016
                        • 336

                        #41
                        Originally posted by shirish
                        argh... that's horrible if I am seeing this right -

                        Code:
                        ~/games/angband-t4nk074/lib/save$ file Shirish 
                        Shirish: data
                        I was expecting a nice .json type file but it's not to be
                        Yes, Angband is pretty old Older than Javascript...

                        I did as you shared and this time did hear a thunder but that's about it.
                        Nice. So it seems we have sounds, but doesn't seem to have any background music, although you might be better judge of that. Is that it as far as music is concerned ?
                        TBH, I never played it with sound either. All sounds are in angband/lib/sound: looks like there are some twangs and clicks and that's about it. Pretty sure it doesn't have any music.

                        Comment

                        • t4nk
                          Swordsman
                          • May 2016
                          • 336

                          #42
                          If anyone has any bug reports or comments about the SDL2 port, don't hesitate to post here. Now that I opened the pull request, I'll be maintaining it. The compilation instructions are here: http://angband.oook.cz/forum/showpos...1&postcount=24
                          If you get errors, try to compile without sound. Anyway, I'll fix the branch soon

                          Comment

                          • t4nk
                            Swordsman
                            • May 2016
                            • 336

                            #43
                            I pushed some more small cleanups (to snd-sdl.c, as discussed previously, and also fixes to some comments), but it looks like sdl2 is already merged Thanks, Takkaria. I guess Makefile.sdl2 is not necessary. Anyway, you can find three more commits here: https://github.com/t4nk074/angband/commits/sdl2

                            Not sending it as a pull request, since it's utterly trivial stuff, but might be useful to Nick when he'll get around to it.
                            Last edited by t4nk; September 25, 2018, 08:12.

                            Comment

                            • Magnate
                              Angband Devteam member
                              • May 2007
                              • 5110

                              #44
                              Originally posted by takkaria
                              (Hi magnate!)
                              And hello takk!
                              "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                              Comment

                              • Nick
                                Vanilla maintainer
                                • Apr 2007
                                • 9637

                                #45
                                Originally posted by t4nk
                                I pushed some more small cleanups (to snd-sdl.c, as discussed previously, and also fixes to some comments), but it looks like sdl2 is already merged Thanks, Takkaria. I guess Makefile.sdl2 is not necessary. Anyway, you can find three more commits here: https://github.com/t4nk074/angband/commits/sdl2
                                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.
                                One for the Dark Lord on his dark throne
                                In the Land of Mordor where the Shadows lie.

                                Comment

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