GNU/Linux Ports

Started by Electroshokker, Sun 07/06/2009 14:56:40

Previous topic - Next topic

Electroshokker

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: PumamanMono 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.

Joseph DiPerla

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
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

Pumaman

Thanks for taking this on, Electroshokker! It's good to have the Linux port back in development :)

strazer

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

Truely great news! Thank you so much for doing this  :=

Electroshokker

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

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?

Electroshokker

Quote from: Pumaman on Wed 10/06/2009 19:15:53
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

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.

Electroshokker

#9
Quote from: Pumaman on Wed 10/06/2009 19:15:53
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.

Electroshokker

#10
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!

Electroshokker

#11
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!


strazer

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?

Electroshokker

Quote from: strazer on Thu 11/06/2009 06:43:36
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

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
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

Pumaman

Quote from: Electroshokker on Wed 10/06/2009 21:21:38
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

So this works with Ubuntu only? Not Knoppix or Suse?
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

Electroshokker

#17
Quote from: Joseph DiPerla on Thu 11/06/2009 20:08:40
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)

Electroshokker

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...

Electroshokker

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.

SMF spam blocked by CleanTalk