Don't let screen geometry affect the game
issueid=1243 09-12-2012 10:13 AM
Junior Member
Number of reported issues by Arancaytar: 6
Don't let screen geometry affect the game
Terminal window size in Linux affects in-game behavior

Not sure if this is a bug or an undocumented feature:

In Linux, ADOM must be started inside a terminal window as it does not open a window on its own. There is a sanity check on the terminal size, but it is only a *minimum* size (25x77 characters) that is required for the program to run. Any larger size is accepted. This will affect the game, as larger random dungeons will be created. This also means saved games will only be compatible with windows of exactly the same width (the height can be safely increased but not decreased).

At the same time, I like that the game works independently of the terminal emulator (even directly inside a text-only terminal, without any window manager). That would break if the game tried to open a window or set the screen geometry.

Instead, I'd propose that the game should use exactly one geometry and in larger screens just sticks to the top-left corner or center or whatever is easiest. Then you could transfer saved games between terminals of any geometry as long as the minimum is met.

Not sure if the option to play with huge random dungeons is a desired effect, but even if so it'd be better to delegate that option to the configuration file, so you know exactly what you're doing. That still means saved games will be incompatible if that option is changed, or the window size is too small, but it'd be easier to deal with that than the current unexpected behavior. Particularly as you can't easily change the screen geometry in a non-window terminal.
Issue Details
Issue Number 1243
Project ADOM (Ancient Domains Of Mystery)
Category Linux
Status Unconfirmed
Priority Unknown
Affected Version ADOM 1.2.0 pre 3
Fixed Version (none)
Milestone (none)
Users able to reproduce bug 8
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




09-12-2012 11:12 AM
Ancient Member
I agree. Larger dungeons is an almost unused feature, whilst resizing terminals is a real hassle

09-12-2012 01:00 PM
Ancient Member
Quote Originally Posted by Grey
Larger dungeons is an almost unused feature
I don't use it because I play on the Windows port, and you can't resize the "terminal" there. But I would most certainly give it a try if it was possible.

09-12-2012 01:43 PM
Senior Member
I do like having the ability to have larger dungeons, if a person so wishes. It adds a bit of configurability to the game.

But I do agree that it becomes an issue more generally... so here's my suggest: add a flag somewhere, either as a launch parameter or in a config file. The flag tells the game whether to account for the terminal resolution, or to limit it to exactly the standard resolution. The default should be for the game to stick with its standard resolution, requiring that the terminal be at least as big as the standard resolution, but ignoring any additional spaces (perhaps it could also have multiple settings to say where in the terminal it is placed - 1 for top-left, 2 for top-centre... 5 for centred... 9 for bottom-right, you get the point; and 0 for fit-to-terminal-size).

Beyond that, perhaps the various versions could all have terminal-launchers provided that set the terminals to the standard sizes, in order to make the process as simple as possible. For Ubuntu, it should require a simple shell script, with the command in the shell script being:

gnome-terminal --geometry=77x25 -x ./adom

That instructs it to create a gnome terminal with 77 characters per row and 25 rows, and run ./adom inside it. If that's in the same folder as adom itself, it should work flawlessly. And since it's just a shell script, it should take seconds for a person to alter it to create a larger geometry, should one be desired.

09-12-2012 01:47 PM
Ancient Member
It's not an often used feature, but it's still a pretty enough feature. I think it would be missed. I think the change would help with keeping savegames straight, but it shouldn't come without the ability to change dungeon size some other way, like in the config file.

09-12-2012 01:47 PM
Ancient Member
I used to play in DOS with large dungeons before I came to these forums and found out that small dungeons are the "standard".

I vote against this feature. Playing with large dungeons is pretty cool. It changes the game a lot. The fact that most people here haven't tried doesn't mean that it's not a nice feature. There's probably people somewhere that always play with large dungeons, as I did before I discovered these forums.

If something is to be done, that should be making savegames compatible if the terminal you're using is *larger* than the one used when you saved. Or else, what Aileyn or Silfir say.

By the way, you can still get the large dungeons under Windows, with DosBox. Unfortunately it's not trivial because DosBox doesn't come with MODE.COM (a big mistake!). You have to get a MODE.COM from MS-DOS 5.0, and execute it in Dosbox with

mode 80

or

mode con:cols=80 lines=50

Then run ADOM, and you will get the large dungeons!

09-12-2012 03:29 PM
Ancient Member
If you have a 32-bit system, it should still be perfectly possible to run the DOS version without Dosbox - you can set the lines and columns in the cmd terminal, too.

Even on a 64-bit system, ADOM Sage can be resized in the same manner.

09-12-2012 03:54 PM
Ancient Member
Quote Originally Posted by Silfir
If you have a 32-bit system, it should still be perfectly possible to run the DOS version without Dosbox - you can set the lines and columns in the cmd terminal, too.
Running the DOS version directly makes it use 100% CPU, clogging the rest of the system. This doesn't happen under dosbox.

09-12-2012 04:46 PM
Junior Member
I use the linux command "screen" to run ADOM. I have made a custom configuration file:
Code:
width -d 80 25
hardstatus ignore
sessionname adom
startup_message off
screen /home/pipe/share/adom/adom
I run this with (sort of, there are more flags that I use that are not relevant):
Code:
screen -c adomscreenrc
The relevant line is of course "width -d 80 25", forcing the terminal size to 80 x 25 characters.

09-13-2012 09:13 AM
Senior Member
Quote Originally Posted by pipe
I use the linux command "screen" to run ADOM. I have made a custom configuration file:
Code:
width -d 80 25
hardstatus ignore
sessionname adom
startup_message off
screen /home/pipe/share/adom/adom
I run this with (sort of, there are more flags that I use that are not relevant):
Code:
screen -c adomscreenrc
The relevant line is of course "width -d 80 25", forcing the terminal size to 80 x 25 characters.
Is that the "terminal multiplexor" application? If so, it's not installed by default on Ubuntu, so it's probably not a good standard launcher to provide, unless adom gets packaged properly as a deb, and has it as a dependency.

03-26-2014 10:09 PM
Member
I don't know of any way to increase the priority of this bug or otherwise raise its visibility, but this is a serious problem in the non-noteye versions of the game for Linux (at least).

The biggest problem is that resizing the terminal ADOM is running in, at all, in any direction, will sometimes immediately and (so far as I can tell) unrecoverably crash the game. I lost an extremely promising character simply due to accidentally resizing the terminal and then not being able to save (or take any other action), even once I restored the terminal to its original size. That'll teach me not to make just-in-case backups in a prerelease, I guess, but seriously, the game should at least be able to automatically save and exit with an error message if it detects an output error.

03-26-2014 10:26 PM
Ancient Member
The not-eye version of the game no longer seems to resize dungeons based on size, which is handy since I want to see as much as I can with the graphics.
It would be nice if the text-version were compatible.
I don't know if the config should turn on/off the feature, or should allow you to scale up the dungeon, but I agree with the original poster that you should be able to play in a bigger window without resizing the dungeon.

03-26-2014 11:40 PM
Ancient Member
Quote Originally Posted by Harwin
I agree with the original poster that you should be able to play in a bigger window without resizing the dungeon.
Under Windows, you can change the Font_Size (and Font_Name) via adom.cfg.

05-25-2014 02:41 PM
Junior Member
This is still an issue when there is no way to reliably control the size of an emulated terminal - eg. in tiled window managers. The screen command only works inside a TTY; I just stumbled over this problem again in xmonad, using 1.2.0p23.

I'd be happy with just some kind of option in the config file that could let you hard-code the rows and columns used, overriding the check that adom performs at startup.

05-26-2014 03:00 AM
Junior Member
An option (maybe a config-file option?) to force ADOM to a standard (80x25) size, regardless of the terminal geometry, would certainly be desirable.

..I'd hope ADOM isn't changed to disallow larger terminal sizes though. I used larger dungeons a lot - usually around 86x26. Not to make a significant change to the dungeons per-se, but to make the two-row text buffer a little wider, and lessen the need to press the {more} key so much. Also many lists, such as the talents, spells, and attributes lists, look a lot tidier because almost no items wrap to two lines on the larger window.

Larger dungeons does add a food/time challenge to the game too. Would be a shame to stop players playing large dungeons, especially when ADOM has already been written to handle varied terminal sizes. Not an insignificant undertaking.

+ Reply