Ubuntu SDL Help?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • benhamill
    Rookie
    • Feb 2009
    • 5

    Ubuntu SDL Help?

    I installed the most recent Angband version on a Windows machine and it was nice: I could spawn other windows and map in various displays, etc. However, on my Linux box (where I'd *actually* like to play), I guess I did something wrong.

    I've got Ubuntu (Hardy Heron) installed and 3.1.0 isn't in the package repo yet, so I wanted to install from source. I had to install some X11 libraries before the config output reported 'yes' for it. In reading about all of that, though, I read that the SDL interface was much nicer, so I installed some SDL libraries and configure reports yes for that, now.

    I typed angband again, but it didn't look any different from before. I tried angband -msdl and it told me "angband: Unable to prepare any 'display module'!" Sad Ben.

    I'm a total Linux noob, so I may be doing something really dumb. Any help or suggestions? I'll be happy to provide more information, I'm just not sure what else would he helpful. Thanks in advance.


    Ben
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9637

    #2
    This does seem puzzling. Do you get any other message? SDL is working fine for me on Intrepid - I do use kubuntu, though. It is just possible that restarting might help. What does 'which angband' tell you?
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • benhamill
      Rookie
      • Feb 2009
      • 5

      #3
      'which angband' tells me /usr/games/angband

      I think I may have discovered something that will shed some light. I guess the package-installed Angband didn't get over-written with the source install, so when I thought I was invoking the new one, it was still hitting the old one.

      When I went into .../src/ and did ./angband -msdl it launched with a new UI and let me spawn windows (I didn't find an arrangement that was awesome, but still). It couldn't save anything, though, due to permissions issues. I'm going to uninstall the package and see where that gets me.

      Thanks again, and any other suggestions are mightily appreciated.


      Ben

      Comment

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9637

        #4
        Originally posted by benhamill
        When I went into .../src/ and did ./angband -msdl it launched with a new UI and let me spawn windows (I didn't find an arrangement that was awesome, but still). It couldn't save anything, though, due to permissions issues. I'm going to uninstall the package and see where that gets me.
        If you try to run ./angband from src, it will not see the /lib directories. You need to cp angband one level up, and run it from there.

        For more info, run ./configure --help - that will tell you probably way more than you need to know

        Just as an example, here's my SDL setup:
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

        • Magnate
          Angband Devteam member
          • May 2007
          • 5110

          #5
          Originally posted by benhamill
          I typed angband again, but it didn't look any different from before. I tried angband -msdl and it told me "angband: Unable to prepare any 'display module'!"
          AFAICT, that message means that SDL support was not properly compiled into the version you are using.

          When you build from source, SDL is not enabled by default. You need to:

          (0. ./autogen.sh - if building from trunk)
          1. ./configure --enable-sdl
          2. make
          3. make install (or debian/rules binary if you want a deb)

          If you have an i386 machine (ie. not AMD64) then you can try this deb:



          Cheers,

          CC
          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

          Comment

          • benhamill
            Rookie
            • Feb 2009
            • 5

            #6
            Thanks, everyone, for your help and advice. I finally got SDL working. I think there was something left over from the package install that was borking the source install, so I deleted everything related to Angband I could find from my machine and then redownloaded the source, did a ./config with everything default except --enable-sdl, then make and sudo make install... viola! It works. So pleased.

            When I quit and start a new Angband session, the positions and sizes of the SDL windows get lost. Is that normal, or should it save from session to session where things were? Thanks, again, so much, all!


            Ben
            Last edited by benhamill; February 20, 2009, 06:30. Reason: Clarification.

            Comment

            • Magnate
              Angband Devteam member
              • May 2007
              • 5110

              #7
              Originally posted by benhamill
              When I quit and start a new Angband session, the positions and sizes of the SDL windows get lost. Is that normal, or should it save from session to session where things were?
              This happens to me too - I don't know if it is WAD or a bug. You can edit ~/.angband/Angband/sdlinit.txt manually though - it's tedious, but you only need to set it up once.

              CC
              "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

              Comment

              • benhamill
                Rookie
                • Feb 2009
                • 5

                #8
                Where can I find documentation about what needs to be in that file? I couldn't get google to tell me anything helpful. I'm totally willing to edit some text file by hand, however tedious. Tedious for a longish time once > tedious for a short time repeatedly.


                Ben

                Comment

                • Magnate
                  Angband Devteam member
                  • May 2007
                  • 5110

                  #9
                  Originally posted by benhamill
                  Where can I find documentation about what needs to be in that file?
                  No idea - I worked it out from first principles. Each window has settings for TOP, LEFT, HEIGHT and WIDTH. These are in pixels. It also has settings for VISIBLE (0 or 1) and FONT. You multiply the font size by the number of rows/cols you want to get height and width. Put your main window (window 0) at 0,0 and arrange your other windows accordingly. I use a 9x15 font for the main window, and I have it as the standard 80x24 (I'm not sure if you can use bigscreen with SDL). This means that the adacent windows have TOP=360 or LEFT=720 (which are the main window's HEIGHT and WIDTH, respectively).

                  What fonts you choose and how big your windows are kind of depends on how much screen real estate you have available.

                  Hope this helps. Sadly the machine I'm typing this on doesn't support SDL, otherwise I'd post my sdlinit.txt - I'm happy to do that later if need be.

                  CC
                  "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                  Comment

                  • benhamill
                    Rookie
                    • Feb 2009
                    • 5

                    #10
                    Originally posted by Magnate
                    Sadly the machine I'm typing this on doesn't support SDL, otherwise I'd post my sdlinit.txt - I'm happy to do that later if need be.
                    That would be awesome. I don't appear to have one at all, so I have literally no idea what syntax it wants or anything. I actually have a creeping suspicion that it's not looking at ~/.angband but somewhere else. I haven't been able to put in the time to track down where it might be pointing, though.

                    Thanks!


                    Ben

                    Comment

                    • Nick
                      Vanilla maintainer
                      • Apr 2007
                      • 9637

                      #11
                      Originally posted by Magnate
                      Sadly the machine I'm typing this on doesn't support SDL, otherwise I'd post my sdlinit.txt
                      Here is mine:sdlinit.txt

                      I suspect the non-saving is a path or permission issue - my FA, O and older versions of V save them fine, it's just V3.1.0 (which is not a local install) that doesn't.
                      One for the Dark Lord on his dark throne
                      In the Land of Mordor where the Shadows lie.

                      Comment

                      • Magnate
                        Angband Devteam member
                        • May 2007
                        • 5110

                        #12
                        Originally posted by Nick
                        Here is mine:[ATTACH]147[/ATTACH]
                        Thanks Nick.

                        What do the keys= lines mean? I never did know that.

                        CC
                        "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

                          #13
                          Originally posted by Magnate
                          What do the keys= lines mean? I never did know that.
                          I still don't.
                          One for the Dark Lord on his dark throne
                          In the Land of Mordor where the Shadows lie.

                          Comment

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