[OLD-1] AGS engine Linux port

Started by BigMc, Sun 03/06/2012 19:04:20

Previous topic - Next topic

Radiant

Several users report that the game runs in fullscreen despite having windowed=1 in its config. Any thoughts on what might cause this?

Crimson Wizard

Quote from: Radiant on Thu 06/10/2016 20:09:58
Several users report that the game runs in fullscreen despite having windowed=1 in its config. Any thoughts on what might cause this?
Writing log (or copying console messages if engine is run from console) should explain everything.

Radiant

#582
Quote from: Crimson Wizard on Thu 06/10/2016 21:21:42
Writing log (or copying console messages if engine is run from console) should explain everything.

Here you go,

Spoiler
ci_find_file: cannot change to directory: Compiled
Adventure Game Studio v3.4 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2016 others
ACI version 3.4.0.12

Initializing allegro
Reading configuration
Looking for game data file
Game data file: /home/rob/Errand/data/game.ags

Game data version: 43
Requested engine version: 3.3.0.1162
Setting up window
Initializing TTF renderer
Initializing mouse: number of buttons reported is 3
Checking memory
Initializing audio vox
Audio vox found and initialized.
Initializing keyboard
Install timer
Initialize sound drivers
Trying digital driver ID: 'Auto' (0xffffffff), MIDI driver ID: 'Auto' (0xffffffff)

Unable to initialize your audio hardware.
[Problem: /dev/sequencer: No such file or directory]
Installed digital driver ID: 'ALSA' (0x414c5341), MIDI driver ID: 'None' (0x0)
Install exit handler
Initialize path finder library
Load game data
Game data version: 43
Requested engine version: 3.3.0.1162
Game GUI version: 116
Errand
Checking for disk space
Initializing MOD/XM player
Initializing resolution settings
Game native resolution: 320 x 200 (32 bit)
Device display resolution: 1400 x 1050
Game settings: windowed = no, screen def: max, screen size: 0 x 0, match device ratio: yes, game scale: max_round
Using graphics factory: DX5
Created graphics driver: Allegro/DX5
Supported gfx modes (32-bit):
   640x480;800x600;800x600;1024x768;1280x1024;1400x1050;1600x1200;1680x1050;
   1920x1080;1920x1600;2048x1536;2560x1440;2560x1600;
Supported gfx modes (24-bit):
   640x480;800x600;800x600;1024x768;1280x1024;1400x1050;1600x1200;1680x1050;
   1920x1080;1920x1600;2048x1536;2560x1440;2560x1600;
Requested gfx filter: StdScale
Using gfx filter: StdScale
Switching to graphics mode
Attempting to find nearest supported resolution for screen size 1400 x 1050 (32-bit) fullscreen
Attempt to switch gfx mode to 1400 x 1050 (32-bit) fullscreen; game frame: 1280 x 800
Succeeded. Using gfx mode 1400 x 1050 (32-bit) fullscreen
   filter dest (60, 125, 1339, 924 : 1280 x 800), render dest (60, 125, 1339, 924 : 1280 x 800)
Preparing graphics mode screen
Initializing colour conversion
Mouse control: off, base: 1.000000, speed: 1.000000
Check for preload image
Initialize sprites
Set up screen
Initialize game settings
Cannot open translation: default.tra
Prepare to start game
Mouse confined: (60,125)-(1339,924) (1280x800)
Audio is processed on the main thread
Checking replay status
Engine initialization complete
Starting game
***** ENGINE HAS SHUTDOWN
[close]

Crimson Wizard

It sais "windowed = no" in log.
Maybe they put windowed=1 into wrong section? Name of the section has changed in 3.4.0, now display mode is set up in "[graphics]".
TBH I had a request to support old configs, which may be a good idea to add.

Radiant

Quote from: Crimson Wizard on Fri 07/10/2016 14:12:09
It sais "windowed = no" in log.
Maybe they put windowed=1 into wrong section? Name of the section has changed in 3.4.0, now display mode is set up in "[graphics]".
TBH I had a request to support old configs, which may be a good idea to add.

Aha, that explains it. I was using the config file from an earlier version, and did not know that fullscreen had to be moved (and linux doesn't have a GUI for config). Note that this is an issue for backwards compatibility: if you take an earlier-version game and open it with the 3.4 engine, it will not work as expected.

Crimson Wizard

Quote from: Radiant on Fri 07/10/2016 14:14:52
Aha, that explains it. I was using the config file from an earlier version, and did not know that fullscreen had to be moved (and linux doesn't have a GUI for config). Note that this is an issue for backwards compatibility: if you take an earlier-version game and open it with the 3.4 engine, it will not work as expected.
Yes, that may be an annoying issue, I am not sure why but I forgot to keep support for old settings.
New options are explained here: https://github.com/adventuregamestudio/ags/blob/master/OPTIONS.md

Radiant

Sounds like a five-minute fix, no? :)

If I understand correctly, I should set auto_lock to 0 on Linux; and the log=1 command will write startup messages to a logfile instead of to stdout / stderr?

Radiant

#587
Wait, do the config settings digiwin, midiwin, digiindx, midiindx, digiwinindx, and midiwinindx (automatically generated in earlier versions) still do anything? What about gamecolordepth, defaultres, screenres, letterbox, defaultgfxdriver, and titletext; or the [disabled] section in the config file? If not, as of which version are they ignored? Does it harm anything if they're still present?

Also, is there something I can pass to midiid to disable midi entirely (since it causes error messages)?

Crimson Wizard

#588
Quote from: Radiant on Fri 07/10/2016 20:28:48
Wait, do the config settings digiwin, midiwin, digiindx, midiindx, digiwinindx, and midiwinindx (automatically generated in earlier versions) still do anything? What about gamecolordepth, defaultres, screenres, letterbox, defaultgfxdriver, and titletext; or the [disabled] section in the config file? If not, as of which version are they ignored? Does it harm anything if they're still present?

Yes, this list misses some options, mainly ones that are only required for winsetup (not engine).

digiwinindx and midiwinindx are used only on Windows. They define internal index of audio in AGS.
digiid and midiid are used on all other platforms. They contain packed ID of the Allegro's audio driver
digiwin and midiwin are some old options, that were never used by engine since AGS 3.2.1 at least (when we got open source).

defaultres, letterbox, gamecolordepth, as well as newer game_width and game_height options are describing game properties for setup program, but they are passed by the engine now, and ones in config are ignored. This is done for safety, because config content may be erroneous.

screenres was obsoleted since somewhere around 3.1, I think. It meant selection between low-res and high-res version of the game in the times when there were no scaling filters. It is potentially possible to support it again (currently you get similar effect using "upscale" options from "override" section).

titletext should be working.

defaultgfxdriver is obsoleted, and honestly I do not remember why it was required for setup.

disabled section should be working, and supporting following items: "speechvox",  "16bit", "filters" and separate filter names.


Quote from: Radiant on Fri 07/10/2016 20:28:48
Also, is there something I can pass to midiid to disable midi entirely (since it causes error messages)?
You can pass MIDI_NONE id. However as I found out, with Allegro it is not always obvious what's causing trouble exactly. For instance, I did not find way to get a separate error message for MIDI, because the only audio initialization function initialzes both MIDI and digitial sound at once. So only way to know which works is to call it several times with different combinations of "on/off" (which may be noticed in logs).

If you are on Windows, set "midiwinindx = 1" for no midi driver.
On all other platforms (Linux etc) set "midiid = 0".

Radiant

Thanks for the info!

Quote from: Crimson Wizard on Fri 07/10/2016 21:30:28
digiwinindx and midiwinindx are used only on Windows. They define internal index of audio in AGS.
I suppose that corresponds to the pulldown in the winsetup menu. I've never seen reason to change these from their defaults.

Quotedigiid and midiid are used on all other platforms. They contain packed ID of the Allegro's audio driver
So how does a player know what the valid values are? Or should I just leave them at -1 which appears to be the default?

QuoteYou can pass MIDI_NONE id.
Thanks, I'll have to check that. The cause is that most Linux distros don't include MIDI libraries available in their default installation, although I suppose you could apt-get them.

Crimson Wizard

Quote from: Radiant on Sat 08/10/2016 20:58:23
Quotedigiid and midiid are used on all other platforms. They contain packed ID of the Allegro's audio driver
So how does a player know what the valid values are? Or should I just leave them at -1 which appears to be the default?
No way except for looking into which ids allegro supports. These IDs are 32-bit integers, each byte equals to the code of the letter. 4-letters form a meaningful id. Having these options as integers instead of strings is absolutely not the best way, but this is how they remain since earlier versions of ags.

0 = none
-1 = auto-detect.

Radiant

Turns out gfxfilter=StdScale2 also no longer works in newer AGS versions (meaning they'll ignore it if it was in an earlier config file, and pick the default instead).

Crimson Wizard

Quote from: Radiant on Wed 12/10/2016 23:15:04
Turns out gfxfilter=StdScale2 also no longer works in newer AGS versions (meaning they'll ignore it if it was in an earlier config file, and pick the default instead).
Of course not, as I mentioned above, all the old graphics options were replaced.
I am working on reading old options now.

Danvzare

Quote from: Crimson Wizard on Thu 13/10/2016 00:16:08
I am working on reading old options now.
I thought you weren't going to work on the AGS engine anymore? ???
Not that I'm complaining of course. :-D

Crimson Wizard

I will have to stick around for some time fixing problems in the latest version.

Radiant

Much as I appreciate your work, please don't feel obliged to do so, especially if it stresses you out. The new version is perfectly usable, so you really don't have to stick around to fix every detail. Go make a cool game already :)

Radiant

Playtesting reveals that under Linux, Steam achievements don't work. It may be the case that I'm using the wrong (or outdated) version of libagsteam.so and libsteam_api.so; can someone tell me where to find the correct ones please?

Crimson Wizard

Quote from: Radiant on Tue 22/11/2016 21:22:13
Playtesting reveals that under Linux, Steam achievements don't work. It may be the case that I'm using the wrong (or outdated) version of libagsteam.so and libsteam_api.so; can someone tell me where to find the correct ones please?
AFAIK in previous times monkey0506 could only provide plugin stub for Linux, which essentially does nothing (only preventing AGS from bailing out with "plugin function not found" error).
I heard that later he was able to make a working one for Linux, when Valve updated steam API, or license, or something along those lines.
I think it it better to ask in the steam plugin thread for details: http://www.adventuregamestudio.co.uk/forums/index.php?topic=44712.0
There was also a unified client project, that supposedly should work for Steam, GOG etc, all in one, and date of release in newer: http://www.adventuregamestudio.co.uk/forums/index.php?topic=52432.0


Radiant


Radiant

Players point out that under Linux in Steam (with the AGSteam library), the Steam overlay doesn't actually show. Does anyone have experience with this?

SMF spam blocked by CleanTalk