Author Topic: GNU/Linux Ports  (Read 18355 times)  Share 

GNU/Linux Ports
« on: 07 Jun 2009, 14:56 »
With the last linux port being in 2007, and the linux port being officially discontinued in december 2008, you probably thought it dead. Well, it ain't, since I took it over a little while ago.

The new website

I took off where Shawn stopped: AGS 2.72 - and took it a little further...

AGS Linux Engine 2.72 - "The undead Pinguin rises" edition

Just when you thought the damned pinguin was finally dead, he's back for more. Brains!

AGS 2.72 Release Candidate 2
AGS 2.72 Release Candidate 3, with static Allegro & Dumb libraries. (so you no longer need to install them separately)


All special paths point to /home/$username$/.ags/$gamename$ so your save games will end up there instead of where the executable is.

AGS Linux Engine 3.1.2 SP1 - "The undead Pinguin eats your brain" edition

AGS 3.1.2 beta 3

NOTE!

* The engine should work for both the 32-bit version of Ubuntu as well as the 64-bit version
* Always start the game from a terminal! (Otherwise you won't see an error log if it crashes)

KNOWN ISSUES

* No sound in Ubuntu 10.10 (both 32 & 64 bit)
* Video crashes in 64-bit Ubuntu due to GStreamer library issues
* Plugins are not supported
* Fading doesn't work in 3.1.2 SP1

Grab the 2.72 video test game to see it working yourself. (You might need to install the gstreamer0.10-ffmpeg package. Or another plugin which allows you to see xvid/divx movies.)

-------------------------------------------------------------------

Running AGS games with WINE

Install WINE. Put the ags game somewhere on the fake C: drive (preferably, not necessary). Run the exe's with WineLoader. (Double-clicking them should also work)

KNOWN ISSUES:

* Ubuntu 9.10: MIDI does not work. Workaround (unconfirmed): install an application called Timidity and load a soundfont.

Running the AGS windows editor with WINE

See this thread if you want to give this a try. I cannot guarantee a fully stable editor.

Porting the AGS Editor to Mono so it will run natively

Quote from: Pumaman
Mono is now able to run all the C# parts of the editor, but unfortunately because the editor also relies on a Windows C++ DLL (AGS.Native.DLL), it cannot run in Mono at the moment.

At some point in the future I might port all that code over to C#, but it's really not high on the priority list right now.

I'll add that I would love to help Chris in this endeavor, but I'm struggling to find time as it is. If this changes in the future, it's next on my TODO list after maintaining the Linux builds.

-------------------------------------------------------------------

Future plans and dreams (don't get your hopes up too much, as some of these might not be realized in a looooooong time if at all)

In order of (probable) occurrence (or not):

- Fixing sound (by replacing the sound system)
- Adding OpenGL support
- AGS linux game editor
- Porting AGS to other architectures (like ARM for handhelds and what not)

-------------------------------------------------------------------

If you encounter any problems running AGS 2.72 or 3.1.2 games, let me know. Your feedback is appreciated!

Always mention your OS, the AGS version and the version of the linux port you're using, and of course the complete error stack.

Segmentation Faults

Example: Shutting down Allegro due to signal #11

These faults point to different errors. Please provide further information (what were you doing, when/how did this occur)

-------------------------------------------------------------------

NOTICE:

I'm changing hosting solution. As soon as it's completed, I'll bring the old linux builds back up for download. In the meanwhile, feel free to contact me if you need them urgently.
« Last Edit: 04 Feb 2012, 10:45 by Electroshokker »

Joseph DiPerla

  • Joseph DiPerla, Adventure Game Creator Wannabe!
    • I can help with AGS tutoring
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: GNU/Linux Port continued!
« Reply #1 on: 07 Jun 2009, 15:57 »
OOOOOOHHHHH. Awesome. Will try it out on my linux box. Any knowledge in porting to Mac and Pocket PC?????
Joseph DiPerla--- http://www.adventurestockpile.com
Member in this community since before 1999.
-The oldest member without ever making a full game...

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens TRAITOR
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: GNU/Linux Port continued!
« Reply #2 on: 07 Jun 2009, 17:47 »
Thanks for taking this on, Electroshokker! It's good to have the Linux port back in development :)

Re: GNU/Linux Port continued!
« Reply #3 on: 10 Jun 2009, 18:05 »
I'm so excited! Great news, thanks for doing this Electroshokker! :)

I checked out the beta engine, seems to work fine apart from the sound of course. Can't wait for ALSA support!

abstauber

  • Order of the Maggot
  • Mittens Vassal
  • quite remarkable
  • abstauber worked on a game that was nominated for an AGS Award!abstauber worked on a game that won an AGS Award!
Re: GNU/Linux Port continued!
« Reply #4 on: 10 Jun 2009, 18:28 »
Truely great news! Thank you so much for doing this  :=

Re: GNU/Linux Port continued!
« Reply #5 on: 10 Jun 2009, 18:55 »
Looking further into this, I discovered:

ALSA's SND_PCM_FORMAT_U16_BE (and LE) not supported, so Allegro fails to initialize sound.

link with more info

The solution seems to be to move to a newer version of allegro, as they fixed it since 4.3.10

Dunno if this is a valid option. (Maybe I should statically link allegro again, making a build for 4.2.2 which includes the fix)

Anyways, I'll look into it more.  ;)

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens TRAITOR
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: GNU/Linux Port continued!
« Reply #6 on: 10 Jun 2009, 19:15 »
Moving to a newer version of Allegro probably isn't an option, as I understand it they're changing the API in the new versions which would probably break it.

Can you explain why this problem didn't affect the Linux engine builds that Shawn did?

Re: GNU/Linux Port continued!
« Reply #7 on: 10 Jun 2009, 19:24 »
Moving to a newer version of Allegro probably isn't an option, as I understand it they're changing the API in the new versions which would probably break it.

Can you explain why this problem didn't affect the Linux engine builds that Shawn did?

I suspect that it's because pulse-audio moved from 0.9.10 in intrepid (8.10) to 0.9.14 in jaunty (9.04)
I'll try reverting to the older package and see what that gives.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens TRAITOR
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: GNU/Linux Port continued!
« Reply #8 on: 10 Jun 2009, 19:30 »
Good luck! Alternatively as you suggest you could try to find the Allegro fix that they did in 4.3.10 and port it into 4.2.2 to get it working.

Re: GNU/Linux Port continued!
« Reply #9 on: 10 Jun 2009, 20:26 »
Moving to a newer version of Allegro probably isn't an option, as I understand it they're changing the API in the new versions which would probably break it.

Allegro 4.3.10 still uses the same api. (as far as I know) Allegro 4.9.x uses a different api.

I did a statically linked build and ran the game 'Apprentice'. To my joy, I got sound!!!  ;D

NOTE: Guys, I need a good example game which includes all types of sound/music AND video, for testing purposes. If you are able to provide one, or point me towards one in the database, I'd much appreciate it.
« Last Edit: 10 Jun 2009, 21:48 by Electroshokker »

Re: GNU/Linux Port continued! - AGS 2.72 Beta 1 (with sound!)
« Reply #10 on: 10 Jun 2009, 21:21 »
Allright!!!  ;D ;D ;D

The patched static library is working like a charm!  := All music and sounds now ok!

Packaging, adding instructions and uploading the new beta. Guys, give this one a try. You'll love it!
« Last Edit: 10 Jun 2009, 21:48 by Electroshokker »

Re: GNU/Linux Port continued! - AGS 2.72 Beta 1 (with sound!)
« Reply #11 on: 11 Jun 2009, 05:59 »
Ok, to make it easier on you guys, I created an installer script.

It checks you're not in 64-bit mode, then does the apt-get stuff and copies the *patched* allegro library, so everything should work fine.

The rest remains the same: copy all runtime files to your game directory and enjoy!

« Last Edit: 11 Jun 2009, 06:05 by Electroshokker »

Re: GNU/Linux Port continued! - AGS 2.72 Beta 1 (with sound!)
« Reply #12 on: 11 Jun 2009, 06:43 »
Didn't use the installer and copied the files myself, but it works like a charm, including sound & music!
Do I understand correctly that Allegro is now dynamically linked? What happens when Ubuntu issues an Allegro update?

Re: GNU/Linux Port continued! - AGS 2.72 Beta 1 (with sound!)
« Reply #13 on: 11 Jun 2009, 12:58 »
Didn't use the installer and copied the files myself, but it works like a charm, including sound & music!
Do I understand correctly that Allegro is now dynamically linked? What happens when Ubuntu issues an Allegro update?

Yes, it's still dynamically linked.

If Ubuntu issues an Allegro update (which will likely happen after it hits stable with allegro 5.0), the package will be called liballegro-5.0 or similar, and you can still get the older allegro-4.2.2 package. (maybe they'll phase it out after a few releases, so I'll put all the current .deb packages on my website so it's always available)

Also, did you know you can  LOCK a package, so it will never update, in the synaptic package manager?

Joseph DiPerla

  • Joseph DiPerla, Adventure Game Creator Wannabe!
    • I can help with AGS tutoring
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: GNU/Linux Port continued! - AGS 2.72 Beta 1 (with sound!)
« Reply #14 on: 11 Jun 2009, 17:35 »
This is awesome. My linux box is not up yet. Only using ubuntu live cd. Its a hassle to install external stuff. Once its up I will try it.

ES: The source cant be ported to MAC? I thought that most of the code for Linux would be pretty accessible and compiled in MAC. I could be wrong though.
Joseph DiPerla--- http://www.adventurestockpile.com
Member in this community since before 1999.
-The oldest member without ever making a full game...

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens TRAITOR
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: GNU/Linux Port continued! - AGS 2.72 Beta 1 (with sound!)
« Reply #15 on: 11 Jun 2009, 18:48 »
The patched static library is working like a charm!  := All music and sounds now ok!

Packaging, adding instructions and uploading the new beta. Guys, give this one a try. You'll love it!

Excellent, good work :D

Joseph DiPerla

  • Joseph DiPerla, Adventure Game Creator Wannabe!
    • I can help with AGS tutoring
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: GNU/Linux Port continued! - AGS 2.72 Beta 1 (with sound!)
« Reply #16 on: 11 Jun 2009, 20:08 »
So this works with Ubuntu only? Not Knoppix or Suse?
Joseph DiPerla--- http://www.adventurestockpile.com
Member in this community since before 1999.
-The oldest member without ever making a full game...

Re: GNU/Linux Port continued! - AGS 2.72 Beta 1 (with sound!)
« Reply #17 on: 11 Jun 2009, 21:16 »
So this works with Ubuntu only? Not Knoppix or Suse?

Actually, it should work on other distributions if you can get the correct library versions.

In Ubuntu (and other debian-based distros) you can run the installer script and see if you can get all libraries.

For other distributions, check if the libraries are available in the package repositories.
I will not support other distributions, BUT if you want to set up the dependencies manually (compiling & installing the libraries), I could probably write a guide on how to do so.

Dependencies AGS Linux Runtime 2.72

To run the engine, you need:

* libaldmb1 (DUMB - Dynamic Universal Music Bibliotheque)
* liballegro4.2 (ALLEGRO 4.2.2, *patched*)

To use the ags-setup utility, you need:

* libgtk1.2 (GIMP Toolkit set of widgets for X)
* libxml1 (GNOME XML library)
« Last Edit: 11 Jun 2009, 21:23 by Electroshokker »

Re: GNU/Linux Port continued! - AGS 2.72 Beta 1 (with sound!)
« Reply #18 on: 13 Jun 2009, 08:36 »
I'm thinking of using gstreamer for video playback in linux.

Any thoughts? (gstreamer is the default back-end for Totem in Ubuntu 9.04)

I'll see if I can get video working...

Re: GNU/Linux Port continued! - AGS 2.72 Beta 1 (with sound!)
« Reply #19 on: 14 Jun 2009, 17:07 »
Status update on the video issue:

Managed to figure out how to use gstreamer, only 1~2 major issues remain:

1) I haven't got any AGS 2.72 games which play video, can someone point me to one? I need one once I'm done compiling for testing purposes. (Any simple video being played in AGS will do)

2) Integrating with the ags engine: Currently the video player will open up inside a new window, rather then playing the video in the existing window.
 
Tested this with a simple GTK+ program. I know how to integrate it in the current window, but for that I need to somehow get the currently active AGS window ID in code.

-------------------------------------------------------------------------
...Not quite there yet, but just thought I'd give you guys an update.