Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Vanilla (http://angband.oook.cz/forum/forumdisplay.php?f=3)
-   -   Ubuntu SDL Help? (http://angband.oook.cz/forum/showthread.php?t=1520)

benhamill February 19, 2009 04:49

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 February 19, 2009 05:15

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?

benhamill February 19, 2009 05:22

'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

Nick February 19, 2009 05:45

Quote:

Originally Posted by benhamill (Post 15748)
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:
http://angband.oook.cz/faangband/v.jpeg

Magnate February 19, 2009 10:07

Quote:

Originally Posted by benhamill (Post 15745)
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:

http://www.terminalarrogance.com/ang...1.1-1_i386.deb

Cheers,

CC

benhamill February 20, 2009 05:28

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

Magnate February 20, 2009 09:52

Quote:

Originally Posted by benhamill (Post 15825)
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

benhamill February 20, 2009 15:37

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

Magnate February 20, 2009 18:51

Quote:

Originally Posted by benhamill (Post 15846)
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

benhamill February 20, 2009 21:28

Quote:

Originally Posted by Magnate (Post 15855)
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


All times are GMT +1. The time now is 15:05.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.