![]() |
#1 |
Rookie
Join Date: Jun 2020
Posts: 4
![]() |
![]()
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. |
![]() |
![]() |
![]() |
#2 | |
Veteran
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 1,020
![]() |
Quote:
__________________
Dive fast, die young, leave a high-CHA corpse. -- You read a scroll labeled 'lol gtfo' of Teleport Level. |
|
![]() |
![]() |
![]() |
#3 |
Apprentice
Join Date: Feb 2020
Posts: 99
![]() |
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 ../../ Code:
./angband -ssdl -mgcu -- -n4 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 14:43. |
![]() |
![]() |
![]() |
#4 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,464
Donated: $60
![]() ![]() |
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. */ ![]()
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
![]() |
![]() |
![]() |
#5 |
Apprentice
Join Date: Feb 2020
Posts: 99
![]() |
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. |
![]() |
![]() |
![]() |
#6 |
Apprentice
Join Date: Feb 2020
Posts: 99
![]() |
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 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 |
![]() |
![]() |
![]() |
#7 |
Rookie
Join Date: Jun 2020
Posts: 4
![]() |
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 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. ![]() |
![]() |
![]() |
![]() |
#8 |
Veteran
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 1,020
![]() |
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. |
![]() |
![]() |
![]() |
#9 |
Apprentice
Join Date: Feb 2020
Posts: 99
![]() |
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 |
![]() |
![]() |
![]() |
#10 |
Rookie
Join Date: Jun 2020
Posts: 4
![]() |
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! ![]() |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
A few beginner questions | moosferatu | Vanilla | 54 | July 3, 2020 00:27 |
Beginner questions: abilities and kemenrauko | Holy_Rage | Sil | 8 | September 1, 2016 19:36 |
Sil: technical prob fonts | manchu | Sil | 2 | June 16, 2013 22:53 |
Beginner Questions | ramier | Vanilla | 40 | June 4, 2010 18:06 |
[U] beginner | AR_chie | Variants | 21 | August 28, 2007 09:39 |