[OLD-1] AGS engine Linux port

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

Previous topic - Next topic

BigMc

AGS works nicely on Linux (32 and 64 bit) now. It supports games created with AGS 2.50 and higher.

There are instructions how to build AGS at

https://github.com/adventuregamestudio/ags/blob/master/debian/README.md

Please report bugs in the AGS issue tracker.

EDIT: Removed most of the old text about multiarch etc., because AGS got native 64 bit support. :)

JJS

Thanks!

I will make it so that you can just give the game exe as parameter instead of renaming it to ac2game.dat. Also I thought about incorporating the PE reading code from the PSP launcher so that the game data is automatically found if you pass the game directory as parameter to the engine.

Furthermore plugin support for all platforms and also builtin plugins for all should be just around the corner.

Then the next thing is making the OpenGL driver more general (at the moment it is tuned to the needs of the mobile platforms) so that it works on Linux/Mac too.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

BigMc

#2
Nice. I will see if I can make the midi playback of allegro work out of the box by using some patches that are already in Debian.

EDIT: I just realized that the 64 bit stuff doesn't work like this on Debian unstable until libaldmb was rebuilt against liballegro4.4. That will take another couple of days I think.

JJS

Quote from: JJS on Mon 04/06/2012 21:40:27I will make it so that you can just give the game exe as parameter instead of renaming it to ac2game.dat. Also I thought about incorporating the PE reading code from the PSP launcher so that the game data is automatically found if you pass the game directory as parameter to the engine.

Furthermore plugin support for all platforms and also builtin plugins for all should be just around the corner.
These two things are now implemented.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

BigMc

Splendid! I updated the Wiki. I gave up on the midi patches front for now. The only patchset in Debian that has similar quality to the one you're suggesting is in the wrong format and converting it results in brokenness. And outputting raw ALSA midi and using that with Timidity doesn't seem to work. Maybe that's broken in Allegro. At least I found out that the patches.dat is found by Allegro when residing in the home folder and doesn't need to be in /usr/bin.

kati

#5
i followed all the instructions but it crashes trying to load audio:

Quoteags game.exe
Adventure Creator v3.21 Interpreter
Copyright (c) 1999-2001 Chris Jones
ACI version 3.21.1115
ci_find_file: cannot change to directory: Compiled
Audio vox found and initialized.
Checking sound inits.
jack_client_new: deprecated
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
Aborted (core dumped)

i'm guessing it has something to do with the GUS patch not working?  i did download and copy it to ~/patches.dat

i'm running ubuntu 12.04 (32-bit)

FWIW SQ VSB linux port works great on here...it would be nice to be able to play other AGS titles without running XP on VirtualBox...

JJS

It's not certain that the crash is audio related because the engine doesn't print to console after initializing audio.

What game are you trying to run?
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

kati

#7
Was trying to run the windows version of Pledge Quest since it seems like a simple game to test with...

BigMc

#8
That crashes here too, but the Linux version works. (With the installed engine of course.)

JJS

I guess it is because the Windows version includes a configuration file that selects the D3D graphic driver. If you delete it or change it to use the non-accelerated Direct Draw driver it works.

Stuff like that is the reason why I don't evaluate the standard config file on the mobile platform ports and instead rolled platform specific configurations. In the long run it would of course be better to unify it again.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

kati

i'm not too worried about the pledgequest given that they took the initiative to release a Linux version, but i'd like to be able to play AGDI's KQI and the Space Quest Incinerations on Linux ... will see if i can get either of them working tomorrow :)

it seems fairly trival to port AGS games to Linux ... i really wish more people were releasing Linux versions of their games.

BigMc

#11
It would be good if on Linux also only a file in ~/.config/ags would be evaluated. And maybe allow overwriting of some of the options by the config files that come with the games at some point? Alternativly introduce a new config file for game directories with a different name to allow for game specific settings.

EDIT: Or even better, first evaluate a file in /etc and then the one in ~/.config/ags

scottchiefbaker

This is awesome... I'm super stoked about a Linux version. Is there anyway to build a version for Fedora? I'm totally willing to help build it and get it packaged for Fedora.

BigMc

It can be built on any 32 bit Linux by just installing the dependencies and running make. See the same instructions that describe the Debian package building.

It should also be possible to install 32 bit libraries and the program on a 64 bit Fedora, but googling for Fedora multilib I don't find much. If you figure it out, let us know!

kati

#14
i was able to get the libdumb package on x64, when i got to this step then it errored out:

$ sudo dpkg --add-architecture i386

saying --add-architecture isn't an option

i'm curious to try this out on x64 (running xubuntu precise 12.04)

BigMc

It doesn't even work on Ubuntu 12.10 yet. It will work on Ubuntu 12.10 when it ships, but never on Ubuntu 12.04. That error message means your dpkg version is too old for that.

scottchiefbaker

I got through a good chunk of the compile and hit a snag:

THIS_IS_THE_ENGINE -DLINUX_VERSION -DDISABLE_MPEG_AUDIO -DBUILTIN_PLUGINS -DRTLD_NEXT -I/usr/include/freetype2   -fno-rtti -Wno-write-strings   -c -o acchars.o acchars.cpp
acchars.cpp: In function ‘void Character_Animate(CharacterInfo*, int, int, int, int, int)’:
acchars.cpp:565:33: error: cast from ‘short int*’ to ‘int’ loses precision [-fpermissive]
compilation terminated due to -Wfatal-errors.
make: *** [acchars.o] Error 1
make: Leaving directory `/home/bakers/ags/Engine'

Any ideas?

Crimson Wizard

I don't have much experience with linux, but it looks like "treat warnings as errors" compilation option is on ("-Wfatal-errors" flag)?
Unfortunately AGS engine produces some type conversion warnings during compilation.

JJS

No, that option just causes the compilation to abort on the first error. You are confusing it with "-Werror" which causes all warnings to be treated as errors.

To me the error looks like you are trying to compile the engine for 64 bit (because only there an int is smaller than a pointer). You absolutely have to compile the engine into a 32 bit executable, it will not work otherwise.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

BigMc

The -m32 flag in the makefile was at the wrong position. I moved it and now it builds on 64 bit for me, but of course it blows up when linking if you don't have the 32 bit versions of the required libraries available.

SMF spam blocked by CleanTalk