Author Topic: AGS engine Linux port  (Read 29548 times)  Share 

AGS engine Linux port
« on: 03 Jun 2012, 19:04 »
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. :)
« Last Edit: 22 Jan 2013, 23:47 by BigMc »

JJS

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine (JJS) Linux port
« Reply #1 on: 04 Jun 2012, 21:40 »
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

Re: AGS engine (JJS) Linux port
« Reply #2 on: 04 Jun 2012, 21:57 »
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.
« Last Edit: 04 Jun 2012, 23:28 by BigMc »

JJS

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine (JJS) Linux port
« Reply #3 on: 05 Jun 2012, 19:14 »
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.
These two things are now implemented.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Re: AGS engine (JJS) Linux port
« Reply #4 on: 05 Jun 2012, 23:28 »
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.

Re: AGS engine (JJS) Linux port
« Reply #5 on: 07 Jun 2012, 09:25 »
i followed all the instructions but it crashes trying to load audio:

Quote
ags 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...
« Last Edit: 07 Jun 2012, 09:39 by kati »

JJS

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine (JJS) Linux port
« Reply #6 on: 07 Jun 2012, 10:28 »
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

Re: AGS engine (JJS) Linux port
« Reply #7 on: 07 Jun 2012, 10:58 »
Was trying to run the windows version of Pledge Quest since it seems like a simple game to test with...
« Last Edit: 07 Jun 2012, 11:00 by kati »

Re: AGS engine (JJS) Linux port
« Reply #8 on: 07 Jun 2012, 11:06 »
That crashes here too, but the Linux version works. (With the installed engine of course.)
« Last Edit: 07 Jun 2012, 11:08 by BigMc »

JJS

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine (JJS) Linux port
« Reply #9 on: 07 Jun 2012, 11:28 »
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

Re: AGS engine (JJS) Linux port
« Reply #10 on: 07 Jun 2012, 11:36 »
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.

Re: AGS engine (JJS) Linux port
« Reply #11 on: 07 Jun 2012, 12:24 »
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
« Last Edit: 07 Jun 2012, 14:40 by BigMc »

Re: AGS engine (JJS) Linux port
« Reply #12 on: 12 Jun 2012, 02:50 »
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.

Re: AGS engine (JJS) Linux port
« Reply #13 on: 12 Jun 2012, 08:38 »
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!

Re: AGS engine (JJS) Linux port
« Reply #14 on: 19 Jun 2012, 07:22 »
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)
« Last Edit: 19 Jun 2012, 07:25 by kati »

Re: AGS engine (JJS) Linux port
« Reply #15 on: 19 Jun 2012, 09:08 »
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.

Re: AGS engine (JJS) Linux port
« Reply #16 on: 21 Jun 2012, 05:48 »

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
Re: AGS engine (JJS) Linux port
« Reply #17 on: 21 Jun 2012, 06:53 »
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

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine (JJS) Linux port
« Reply #18 on: 21 Jun 2012, 07:01 »
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

Re: AGS engine (JJS) Linux port
« Reply #19 on: 21 Jun 2012, 08:47 »
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.