Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old June 8, 2020, 20:38   #1
Tungwe
Rookie
 
Join Date: Jun 2020
Posts: 4
Tungwe is on a distinguished road
Question Some technical questions (sound/UI) from a beginner

Hi folks.

I just started to play Angband. I'm wondering if:
a) Is it possible to get sound in the terminal version on Linux?
b) Is it possible to somehow resize the terminals (without opening the game as several separate windows)? I'm currently launching the game with `angband -mgcu -- -n4` so I can have inventory/equipment, messages and monster list open along with the main game. But the windows take a lot of space, so it would be nice to resize or merge them somehow.
Tungwe is offline   Reply With Quote
Old June 9, 2020, 08:17   #2
fph
Knight
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 897
fph is on a distinguished road
Quote:
Originally Posted by Tungwe View Post
Hi folks.

I just started to play Angband. I'm wondering if:
a) Is it possible to get sound in the terminal version on Linux?
b) Is it possible to somehow resize the terminals (without opening the game as several separate windows)? I'm currently launching the game with `angband -mgcu -- -n4` so I can have inventory/equipment, messages and monster list open along with the main game. But the windows take a lot of space, so it would be nice to resize or merge them somehow.
Welcome! Do you have the option to switch to the SDL2 frontend (with X11 or Wayland)? That would solve both of your problems and give you a more configurable experience. If it is compiled in, `angband -msdl2` is enough to start it. To compile it in, you will need a few extra packages (I am not sure if the compilation instructions include the up-to-date list, but in any case I can help here if you post error messages).
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
Old June 9, 2020, 13:35   #3
moosferatu
Apprentice
 
Join Date: Feb 2020
Posts: 97
moosferatu is on a distinguished road
It is possible to use sound with the GCU version. You'll need the SDL devel libraries and sox (for converting the mp3 files into oggs) installed, and then compile Angband as follows:

Code:
cd angband
./autogen.sh
./configure --with-no-install --enable-sdl --enable-sdl-mixer
make
cp src/angband .
cd lib/sounds
for f in *.mp3 ; do sox -v `sox "$f" -n stat -v 2>&1` "$f" `basename "$f" .mp3`.ogg; done
sed -i -- 's/.mp3/.ogg/g' sound.cfg
cd ../../
Once compiled, run Angband like so:

Code:
./angband -ssdl -mgcu -- -n4
And then, in the game, hit "=", "a" to open the options menu and enable sound (option "b").

As far as I can tell, it is not possible to resize the sub windows in GCU. That said, I don't think there's a reason that these windows couldn't be sized manually (with environment variables like the X11 port), other than someone would have to add the code to main-gcu.c to do it.

Last edited by moosferatu; June 9, 2020 at 13:43.
moosferatu is offline   Reply With Quote
Old June 9, 2020, 13:56   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,345
Donated: $60
Nick will become famous soon enough
I have not used this - and certainly didn't write it, Gwarl did - but you can adjust subwindows in the gcu port (as of 4.2.0). Here is Gwarl's comment in full:
Code:
/* Parse Args and Prepare the Terminals. Rectangles are specified
      as Width x Height, right? The game will allow you to have two
      strips of extra terminals, one on the right and one on the bottom.
      The map terminal will than fit in as big as possible in the remaining
      space.

      Examples:
        angband -mgcu -- -right 30x27,* -bottom *x7 will layout as

        Term-0: Map (COLS-30)x(LINES-7) | Term-1: 30x27
        --------------------------------|----------------------
        <----Term-3: (COLS-30)x7------->| Term-2: 30x(LINES-27)

        composband -mgcu -- -bottom *x7 -right 30x27,* will layout as

        Term-0: Map (COLS-30)x(LINES-7) | Term-2: 30x27
                                        |------------------------------
                                        | Term-3: 30x(LINES-27)
        ---------------------------------------------------------------
        <----------Term-1: (COLS)x7----------------------------------->

        Notice the effect on the bottom terminal by specifying its argument
        second or first. Notice the sequence numbers for the various terminals
        as you will have to blindly configure them in the window setup screen.

        EDIT: Added support for -left and -top.
    */
I hope this helps
__________________
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 June 9, 2020, 14:00   #5
moosferatu
Apprentice
 
Join Date: Feb 2020
Posts: 97
moosferatu is on a distinguished road
Cool! I completely missed that when I checked the code...

[Edit] Oh, note that "-- -n" must NOT be specified. Otherwise, it will use the auto-configure behavior.
moosferatu is offline   Reply With Quote
Old June 9, 2020, 14:27   #6
moosferatu
Apprentice
 
Join Date: Feb 2020
Posts: 97
moosferatu is on a distinguished road
I just played around with it. I don't think I fully understand how it's configured yet, but here's an example large screen (based on a 24" monitor at 1920x1080) setup that has columns on the left and right and a row on the bottom.

Code:
./angband -ssdl -mgcu -- -right 40x27,* -left 40x27,* -bottom *x10
And the window configuration:

Code:
#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# begin Dump window settings
# *Warning!*  The lines below are an automatic dump.
# Don't edit them; changes will be deleted and replaced automatically.

# Options

# Window 'Term-1', Flag 'Display monster list'
window:1:10:1

# Window 'Term-2', Flag 'Display item list'
window:2:12:1

# Window 'Term-3', Flag 'Display inven/equip'
window:3:0:1

# Window 'Term-4', Flag 'Display equip/inven'
window:4:1:1

# Window 'Term-5', Flag 'Display messages'
window:5:6:1


# *Warning!*  The lines above are an automatic dump.
# Don't edit them; changes will be deleted and replaced automatically.
#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# end Dump window settings
moosferatu is offline   Reply With Quote
Old June 9, 2020, 20:12   #7
Tungwe
Rookie
 
Join Date: Jun 2020
Posts: 4
Tungwe is on a distinguished road
Thanks everyone for the advice!

I tried the SDL2 frontend, but couldn't get any sound there. Also I have a strange issue with the SDL2 frontend where the game window is very small, and the rest of the screen is covered by some placeholder images (see attached image).

Regarding the sound in SDL2, it seems that there is a bug in the package in Gentoo (which is how I installed Angband). When I compile it with `sdl2` enabled and run `angband --help` there is no sound module listed under the line "-s<mod> Use sound module <sys>:". Stange since the package installs dependencies for sound such as sdl2-mixer. Will see if I can find the issue in the build file and report the bug to Gentoo maintainers.

I tried to recompile it without `sdl2` enabled, but with `sdl` enabled, and `angband --help` now outputs:

Code:
  -s<mod>        Use sound module <sys>:
     sdl   SDL_mixer sound module
and sound works in regular SDL mode, but still a strange resolution.

Would definitely prefer SDL2 over SDL if I could get these issues fixed since the GUI seems nicer. The terminal mode was used primarily because the resolution worked out of the box and it was simple to change the font/font size, but definitely open to using the SDL(2) version if I can get the resolution (and sound) to work.

@moosferatu Seems like a good approach. I would really prefer using the package manager for the installation if at all possible though.

Also will try the -right and -left flags for the terminal version for now and hope someone has hints on how to get a sensible resolution in the SDL/SDL2 version.
Attached Thumbnails
Click image for larger version

Name:	angband-sdl2.jpg
Views:	11
Size:	21.2 KB
ID:	1850  
Tungwe is offline   Reply With Quote
Old June 10, 2020, 12:55   #8
fph
Knight
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 897
fph is on a distinguished road
What you see is just a pre-configured default window size that is too small. That pattern is the background of a "virtual desktop" in which you can display terminal subwindows. You can move and resize the main window with the buttons in the top-right corner + your mouse, and display more terms with the buttons in the top-left one. The interface takes a minute to get used to, but anyway you are not going to resize windows too often.

I'm not sure about what is happening with the sound and I can't help with that, sorry.
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
Old June 10, 2020, 14:02   #9
moosferatu
Apprentice
 
Join Date: Feb 2020
Posts: 97
moosferatu is on a distinguished road
Tungwe, I agree with you, and think the GCU version looks the best. Personally, I use the GCU port without subwindows (also without sound...). All of the content can be accessed within the main window, and I don't like the "clutter" of having the subwindows always visible.

I don't know what's going on with your sound. Here's an old thread that I lifted the commands I suggested from:

http://angband.oook.cz/forum/showthread.php?t=7766

Additionally, here's the development thread for the SDL2 port, which includes some discussion about getting the sound working, but, after a brief skim, it wasn't immediately clear to me if the problems were ever satisfactorily resolved.

http://angband.oook.cz/forum/showthread.php?t=9076
moosferatu is offline   Reply With Quote
Old June 10, 2020, 17:42   #10
Tungwe
Rookie
 
Join Date: Jun 2020
Posts: 4
Tungwe is on a distinguished road
Managed to resize the window in SDL the way you suggested fph, thanks!

Thank you for the references moosferatu. I read through all the comments related to sound, as well as all commits I could find on the GitHub repo, but wasn't able to find out if they decided sound was working correctly in the SDL2 release... If someone has sound working in SDL2 it would be great to see the output of `angband --help` (in particular the sound module info).

Also, I went back to try moosferatu's approach with using the `-ssdl` flag together with the `-mgcu` flag and sounds worked correctly this way! Didn't need to manually convert the files or anything either, just using the default install. This approach should be good enough for me for now!
Tungwe is offline   Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
A few beginner questions moosferatu Vanilla 54 July 2, 2020 23:27
Beginner questions: abilities and kemenrauko Holy_Rage Sil 8 September 1, 2016 18:36
Sil: technical prob fonts manchu Sil 2 June 16, 2013 21:53
Beginner Questions ramier Vanilla 40 June 4, 2010 17:06
[U] beginner AR_chie Variants 21 August 28, 2007 08:39


All times are GMT +1. The time now is 06:48.


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