Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old February 19, 2009, 03:49   #1
benhamill
Rookie
 
Join Date: Feb 2009
Posts: 5
benhamill is on a distinguished road
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
benhamill is offline   Reply With Quote
Old February 19, 2009, 04:15   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,480
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
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.
Nick is offline   Reply With Quote
Old February 19, 2009, 04:22   #3
benhamill
Rookie
 
Join Date: Feb 2009
Posts: 5
benhamill is on a distinguished road
'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
benhamill is offline   Reply With Quote
Old February 19, 2009, 04:45   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,480
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by benhamill View Post
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.
Nick is offline   Reply With Quote
Old February 19, 2009, 09:07   #5
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by benhamill View Post
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
Magnate is offline   Reply With Quote
Old February 20, 2009, 04:28   #6
benhamill
Rookie
 
Join Date: Feb 2009
Posts: 5
benhamill is on a distinguished road
Smile

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 at 05:30. Reason: Clarification.
benhamill is offline   Reply With Quote
Old February 20, 2009, 08:52   #7
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by benhamill View Post
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
Magnate is offline   Reply With Quote
Old February 20, 2009, 14:37   #8
benhamill
Rookie
 
Join Date: Feb 2009
Posts: 5
benhamill is on a distinguished road
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
benhamill is offline   Reply With Quote
Old February 20, 2009, 17:51   #9
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by benhamill View Post
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
Magnate is offline   Reply With Quote
Old February 20, 2009, 20:28   #10
benhamill
Rookie
 
Join Date: Feb 2009
Posts: 5
benhamill is on a distinguished road
Quote:
Originally Posted by Magnate View Post
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
benhamill is offline   Reply With Quote
Reply

Tags
compile, hardy heron, sdl, ubuntu, x11


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:55.


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