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.

Joseph DiPerla

I cant. But thanks for all the hard work. Please keep it up.
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

I'm getting a little frustrated with gstreamer & allegro.
In windows, there's  a nice get_window() function, but they didn't bother to make one for unix. Hence, I still can't play any video INSIDE the game window.

However, I noticed the following libraries which might resolve our problems:

Apeg library

APEG is an audio/video add-on for the Allegro game programming library. It provides functions for playing MPEG-1 and Ogg streams identically to the way it handles FLIC files.

AllegAvi library

Avi library player for allegro users. This library is capable of rendering avi movies to an allegro BITMAP. It can also play the audio stream using allegro audio stream functions.

----

The latter one seems to be a little out of date, though. (the 1.2 version isn't available on the website)

Electroshokker

Update:

After a brief moment investigating Apeg & AllegAvi, I decided to continue with the GStreamer approach. (there were some licensing issues with apeg, and allegavi's only for windows.)

The good news: I figured out how to get the window XID I need.

It will still take me a while before I get it working, though. With luck, I'll get a break-through.

Electroshokker

Update: I figured out a *really* easy way to get AGS working on 64-bit Ubuntu. (without recompiling everything as 64-bit, which would take me much longer)

In Ubuntu, you've got the 'getlibs' script. Basically, it grabs the 32-bit packages and installs them in your '/usr/lib32' folder. After that, you can simply double-click your executable and presto! The game comes to life!

I'll create a new package which will have an updated *generic* installer script which *should* theoretically allow you to run AGS on ANY linux distribution. (By including the libraries rather then grabbing them with apt-get or other nonsense) I'll need some testers for the other distros...

For those of you who can't wait to try it on 64-bit Ubuntu, grab getlibs here and have a look:

(Note that you'll still have to replace the liballeg-4.2.2.so in the /usr/lib32 folder to get ALSA support.)




Electroshokker

A new version of the linux runtime is up. I'm upping the status of this one to 'Release Candidate' since it's basically stable. The only problem with the video playback that could occur is your missing the right codec, but that'll be nicely shown in the command prompt when that occurs (and AGS has quit).

Remember, always open your game via the command prompt for easy error reporting (as the error description will remain on screen).

Oh, and I've dubbed this one "The undead Pinguin rises" edition, which is fitting, I think.

Enjoy!

strazer

Video playback works fine here! Great job!

Btw, is it normal that it can't be skipped? Even Alt+X doesn't seem to work.

Electroshokker

#26
Quote from: strazer on Mon 22/06/2009 17:21:00
Video playback works fine here! Great job!

Btw, is it normal that it can't be skipped? Even Alt+X doesn't seem to work.

Yes, for the moment. I haven't digged into the skipping/screen ratio stuff yet; (as stated in the first post of the thread)

I will get that done by RC2. Right now I just want to make sure no one is experiencing problems with the game build.

(I'm currently unable to test it properly in-depth myself (like what if multiple videos are played sequentially, ...), as my virtual 32-bit Ubuntu got corrupted. No worries though, as I'm compiling the engine on my non-virtual 64-bit Ubuntu, and I'll set up a new 32-bit test environment soon.)

Electroshokker

I've just build a fully 64-bit version of the AGS engine for linux, but discovered that there's no way I can run it, since:

Quote'Main game file not found. This may be from a different AGS version, or the file may have got corrupted.'

The 32-bit ac2game.dat is the culprit, I think. This is not so much an issue as there is a workaround for the 64-bit platform (by getting all required 32-bit libraries), but for other platforms this might spell doom. I'll look into it more.

strazer

Quote from: Electroshokker on Mon 22/06/2009 17:29:40(as stated in the first post of the thread)

Hehe, thanks, I'll read more carefully next time. :)

I really appreciate you keeping us up to date on your progress, it's really exciting to see this port back in active development!

Electroshokker

Quote from: strazer on Tue 23/06/2009 11:02:59
Quote from: Electroshokker on Mon 22/06/2009 17:29:40(as stated in the first post of the thread)

Hehe, thanks, I'll read more carefully next time. :)

I really appreciate you keeping us up to date on your progress, it's really exciting to see this port back in active development!

Sure no prob. I like to keep things verbose, so I can backtrack what I've done.

As for the 'Main game file not found. This may be from a different AGS version, or the file may have got corrupted.' error in 64-bit AGS, it actually can't find the file. (the rest of the message can be ignored).

I debugged it down to the file reading routine, where the problem lies. Guess I'll have to agree with Chris on how to fix this for the 64-bit version.

bearseatbeats

A flute with no holes is not a flute. A doughnut with no holes is a Danish.

Electroshokker

#31
Ok, just finished creating a brand new ags-setup utility, based on Shawn's old work, with a couple of twists of my own  ;)

You'll find the link in the first post of this thread.

screenshot: (no, that's not windows. That's Ubuntu. That's right.)




Note! This is build using Glade3, and all functions are dynamically mapped. This means, that ANYone can take the ags-setup.glade file, change it to look the way they want it (adding a big banner of their game, whatever) and redistribute it. (As long as you don't remove any of the existing controls, you can resize, move around, ... do whatever you want with the setup utility)

The ags-setup executable itself, however, is closed-source under the old license. (naturally)

khnum

I found a problem in the RC1 release:

./AGS272: symbol lookup error: /usr/lib/liballeg.so.4.2: undefined symbol: _blender_trans24

The game worked perfectly using the beta 1 release.

By the way, I recently completely switched to Ubuntu, so if you need help with this project I'd be glad to help :D

Electroshokker

Quote from: khnum on Sun 28/06/2009 11:27:02
I found a problem in the RC1 release:

./AGS272: symbol lookup error: /usr/lib/liballeg.so.4.2: undefined symbol: _blender_trans24

The game worked perfectly using the beta 1 release.

By the way, I recently completely switched to Ubuntu, so if you need help with this project I'd be glad to help :D

Seems to be a possible compiler problem. (http://www.allegro.cc/forums/thread/595777)

I'll set up a triple boot system then (ubuntu 64-bit, ubuntu 32-bit, win xp), since I'm having too many problems with VirtualBox, and I need to be able to test properly.

Thanks for offering your help, I mostly need testers. I'll be fixing the last of the video issues (skipping etc.) and repackage everything cleanly.

For the next release candidate coming up, please test the installer script.

salty-horse

Thanks for reviving the port!
I tested various games that worked with the old interpreter and it seems to work fine.

Tried running The Farm which uses mp3's. It gets stuck on a black screen after these messages:

Code: ags

$ ./ags
Adventure Creator v2.72 Interpreter
Copyright (c) 1999-2001 Chris Jones
ACI version 2.72.920
CD-ROM Audio support enabled.
Pentium Pro CPU detected.
Speech sample file found and initialized.
Checking sound inits.

(<unknown>:17345): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(<unknown>:17345): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(<unknown>:17345): GStreamer-CRITICAL **: gst_element_get_bus: assertion `GST_IS_ELEMENT (element)' failed

(<unknown>:17345): GStreamer-CRITICAL **: gst_bus_add_watch_full: assertion `GST_IS_BUS (bus)' failed

(<unknown>:17345): GStreamer-CRITICAL **: gst_object_unref: assertion `object != NULL' failed

** (<unknown>:17345): CRITICAL **: gst_x_overlay_set_xwindow_id: assertion `overlay != NULL' failed

(<unknown>:17345): GStreamer-CRITICAL **: gst_element_set_state: assertion `GST_IS_ELEMENT (element)' failed


I'm on a 64-bit system and have all of the required 32-bit libraries installed.

BTW, I have a script I use to "install" ags. You might find it useful:
Code: ags

#!/bin/sh

ln -s ~/games/ags/AGS 2.72 RC1/runtime/AGS272 ags
ln -s ~/games/ags/AGS 2.72 RC1/runtime/patches.dat .
ln -s "$1" ac2game.dat
cp ~/games/ags/acsetup.cfg .


In a game dir, I just run make_ags.sh game.exe and then run ags

Electroshokker

Quote from: salty-horse on Fri 03/07/2009 17:25:08
Thanks for reviving the port!
I tested various games that worked with the old interpreter and it seems to work fine.

Tried running The Farm which uses mp3's. It gets stuck on a black screen after these messages:

Code: ags

$ ./ags
Adventure Creator v2.72 Interpreter
Copyright (c) 1999-2001 Chris Jones
ACI version 2.72.920
CD-ROM Audio support enabled.
Pentium Pro CPU detected.
Speech sample file found and initialized.
Checking sound inits.

(<unknown>:17345): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(<unknown>:17345): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(<unknown>:17345): GStreamer-CRITICAL **: gst_element_get_bus: assertion `GST_IS_ELEMENT (element)' failed

(<unknown>:17345): GStreamer-CRITICAL **: gst_bus_add_watch_full: assertion `GST_IS_BUS (bus)' failed

(<unknown>:17345): GStreamer-CRITICAL **: gst_object_unref: assertion `object != NULL' failed

** (<unknown>:17345): CRITICAL **: gst_x_overlay_set_xwindow_id: assertion `overlay != NULL' failed

(<unknown>:17345): GStreamer-CRITICAL **: gst_element_set_state: assertion `GST_IS_ELEMENT (element)' failed


I'm on a 64-bit system and have all of the required 32-bit libraries installed.

Yes, but you don't have the right 32-bit gstreamer libraries installed (and the 32-bit gstreamer plugin(s) to play the video).

I had the same problem on my 64-bit ubuntu. After copying all gstreamer libraries from a 32-bit ubuntu the problem was resolved. This is exactly the reason I'm trying to create a 64-native AGS build (since the gstreamer libraries are installed by default on Ubuntu)

Quote from: salty-horse on Fri 03/07/2009 17:25:08
BTW, I have a script I use to "install" ags. You might find it useful:
Code: ags

#!/bin/sh

ln -s ~/games/ags/AGS 2.72 RC1/runtime/AGS272 ags
ln -s ~/games/ags/AGS 2.72 RC1/runtime/patches.dat .
ln -s "$1" ac2game.dat
cp ~/games/ags/acsetup.cfg .


In a game dir, I just run make_ags.sh game.exe and then run ags

Thanks for the info. For RC2, I'll be working on packaging the engine better so anyone can install/use the ags engine with just a double-click on an installer file.

Electroshokker

New release candidate is up. (took me the whole day to set up my triple boot system, figure out the missing dependency problem, debug, repackage, update the installer script so it's waaaaay easier to set up, ...)

Ehum, anyways, give it a shot, guys. Don't forget to take a look at the readme.txt!

install.sh is also updated, give it a go!

Oh, and the installer script should set up your runtime in no-time on both 32-bit & 64-bit versions of ubuntu.  :=

And now it's time for bed (finally!)  8)

Electroshokker

Ok, some further testing on my Ubuntu 64-bit reveals that there might be some open issues for video playback.

On ubuntu 64-bit, try the following command (after running the install.sh):

Code: ags
sudo getlibs -p gvfs libfaac0 libfaad0 libmp3lame0 libx264-65 libxvidcore4 
libcdparanoia0 libdv4 libavutil-unstripped-49 libavcodec-unstripped-52 libavformat52 
libgsm1 libschroedinger-1.0-0 libspeex1 libtheora0 libvorbisenc2 libshout3 libaa1 
libavc1394-0 libslang2 libiec61883-0 libvisual-0.4-0 libcaca0 libgpm2 libraw1394-8
 libncursesw5 libgnomevfs2-0 libsoup2.4-1 libavahi-glib1 libswscale0 libtag1c2a 
libwavpack1 libv4l-0 libpostproc51 libgnomevfs2-extra


This should get you the bulk of required 32-bit playback libraries.

khnum

Just tested the RC2: everything works fine :D
The new installer works fine (on 32-bit ubuntu), but i found really difficult to enter the path to the game folder (the folder name has spaces in it)

Electroshokker

Quote from: khnum on Mon 06/07/2009 10:26:37
Just tested the RC2: everything works fine :D
The new installer works fine (on 32-bit ubuntu), but i found really difficult to enter the path to the game folder (the folder name has spaces in it)

So we just need someone to test it on 64-bit Ubuntu (where I'm expecting some potential problems with the video playback libraries)

----------

Yeah, for spaces you have to enter the \ character.

So '/home/yourname/my game folder' would become: '/home/yourname/my\ game\ folder'

----------

I'm actually planning on replacing the install script with a neat graphical installer, but first I need to get the basics right.

keisari

Hiya! Nice to see the linux port alive again.

I'm trying out the video test game on Ubuntu 64-bit. I ran install.sh but still get loads of warnings about missing plugins. I also tried running getlibs manually, with no luck. The video starts playing, but VERY slow without any sound, and then hangs after a while. I actually had to change the video file for another to find this out since the default one would just give a black screen.

The engine itself seems to work fine. Nice work!

EDIT: Well I don't know what happened, but now the video works just fine. I still get the warnings, but i guess they're not really relevant. Some weird problem with the codecs i guess... Thanks anyway!

EDIT: It seems my problem is sound related. The video won't play for me with certain MIDI settings in ags_setup. OSS seems to be the most reliable: other settings, even "No music" will hang the video. Sound and music for other AGS games work well. Pretty odd I think...

Also, the sound settings seem to have no effect on the audio playback of the video, the audio is always heard.

Electroshokker

Quote from: dbringer on Sun 12/07/2009 13:17:31
Hiya! Nice to see the linux port alive again.

I'm trying out the video test game on Ubuntu 64-bit. I ran install.sh but still get loads of warnings about missing plugins. I also tried running getlibs manually, with no luck. The video starts playing, but VERY slow without any sound, and then hangs after a while. I actually had to change the video file for another to find this out since the default one would just give a black screen.

The engine itself seems to work fine. Nice work!

EDIT: Well I don't know what happened, but now the video works just fine. I still get the warnings, but i guess they're not really relevant. Some weird problem with the codecs i guess... Thanks anyway!

Yes, I also get weird problems on my 64-bit Ubuntu. Did you have a look at this post where I describe a way to sort out some of these problems?
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=37968.msg501855#msg501855

Note: Depending on the codec used to encode the video file, you might get different results. (If the codec is in the default gstreamer "good" or "ugly" plugins, it should play just fine. Codecs which exist in the "bad" or other plugins might not be properly supported and have playback issues. (which is the case with the example video file, I guess, since it uses an older version of DivX, though I'm not sure. It was made a few years ago.)

Quote from: dbringer on Sun 12/07/2009 13:17:31
EDIT: It seems my problem is sound related. The video won't play for me with certain MIDI settings in ags_setup. OSS seems to be the most reliable: other settings, even "No music" will hang the video. Sound and music for other AGS games work well. Pretty odd I think...

Also, the sound settings seem to have no effect on the audio playback of the video, the audio is always heard.

The ags_setup setting do not affect the video playback whatsoever. I basically tell the gstreamer backend to play the video file, without bothering about setting audio playback volume or other stuff.

News update:

- I'm currently shifting my focus to AGS 3.1.2 SP1. Video playback for Linux will work identical, so any fixes (audio level, ...) I'll make later on to the new version I'll backwards install in the AGS 2.72 build.

- I'm leaving on holiday for a few weeks. In the meanwhile, please keep testing the current build and reporting any issues you come across. You can also post suggestions on what you want in the Linux video playback. (audio volume control with '+' & '-' keys, pause on pressing spacebar, ...)

Once I'm back I'll take a look at all bug reports & suggestions.

EvilTypeGuy

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

You shouldn't need to (and really shouldn't) use a static library.  Remember that the patches.dat has to be in the same directory as the runtime executable for ags for sound to work right.  However, if you can't get it working without using a static library, then I suppose that's the only option.

EvilTypeGuy

Quote from: Electroshokker on Sun 21/06/2009 10:09:12
Update:

After a brief moment investigating Apeg & AllegAvi, I decided to continue with the GStreamer approach. (there were some licensing issues with apeg, and allegavi's only for windows.)

The good news: I figured out how to get the window XID I need.

It will still take me a while before I get it working, though. With luck, I'll get a break-through.

Gstreamer is your best bet.  I had the same problem you did with Video which is why I never added support for it.  Video playback under X11 was incredibly convoluted and difficult and the licensing issues surrounding most video playback libraries were more than annoying.

roystonlodge

Understanding that the Linux port is designed for Ubuntu, has anybody had any experience getting it to run on Damn Small Linux?

I'm using DSL to create a live Linux CD for my nieces and nephews, with lots of small games and educational software.

AGS would be a great way to create "getting started" tutorials for this little project of mine, reminiscent of the old "Macintosh Basics" and/or "Mouse Basics" tutorials that used to come with new Macs WAY back in the days of the Mac Plus/Mac Classic/Mac SE.

Thanks in advance!

HeirOfNorton

 ;D

Appears to work fine in Arch Linux (64 bit). Nearly all of the libraries are available in lib32 versions, through AUR if nothing else. The only ones not available are libdumb and libaldmb. The Arch repos have static libraries for DUMB by default instead of shared libraries like Ubuntu. However, I was able to simply copy the relevant SOs out of the Ubuntu repos and put them in Arch's equivalent of lib32. It works fine, and the sound seems to work right even without patching Allegro.

Presumably it would be a bit simpler to get it working in 32-bit Arch, without needing to futz around with the AUR.

Great work, ES.

Edit: AGS 3.1.2 still isn't working, with the same errors as other folks have gotten.  :-\

Electroshokker

If you can get it to run with the original libraries, stick with them. If you can't, there's some notes in the package (either of this one or the 3.1.2 package) which will help you fix the sound bug in the allegro library. Not all distros suffer from this bug, but if yours does, read the readme.txt I included!

kylebrandt

With the install script, be sure to double quote the $LOC variable in the cp and mv commands, lines 52-57.  When setting up a game that is in a dir with spaces, those commands won't work correctly otherwise.


deadsuperhero

Bit of a hypothetical question here, I'd love to see some clarification.

I'm looking at packaging my game with this runtime for Ubuntu in a .deb file. In theory, this process is relatively simple (I'd imagine the binary would be moved into a folder with the games file, so something like /usr/share/games/GAMENAME strikes me as fitting)

However, a problem arises. For most native linux games, savegames don't actually go in the directory of the binary. Since AGS does this, and since this binary would be installed into a place that doesn't have root write access for good reason, this means that there is no logical way to save a game. Likewise, putting saved games in this directory would require quite a bit of know-how. As Ubuntu is a distribution dedicated to making things easier for the end user, this isn't the best way to deal with the issue.

Would it be logical sometime in the future to implement a save directory tantamount with other native linux games in which it saves into a hidden directory in the home folder? For example, King's Quest could theoretically write into the directory /home/user/.kingsquest/ rather than /usr/share/games/kingsquest/

Also, what about re-naming the game binary and setup utility to be more aligned with that of the game's name? ags-setup works great, but what if a user installs several ags linux games under /usr/share/games, and a link is put under /usr/bin/? This would cause confusion in the system, and running a setup utility from the command line would end up requiring the user to navigate to different folders just to set up their game of choice.

Here's what I propose: allow an updated version of the linux runtime to put game saves in a .GAMENAME file under the /home/username/ directory, and rename the binary executable and the setup tools to be named "GAMENAME" and "GAMENAME-Setup", respectively?

How trivial would it be to implement something like this?
The fediverse needs great indie game developers! Find me there!

Electroshokker

Quote from: kylebrandt on Wed 14/10/2009 17:34:26
With the install script, be sure to double quote the $LOC variable in the cp and mv commands, lines 52-57.  When setting up a game that is in a dir with spaces, those commands won't work correctly otherwise.

Thanks for the tip!

Quote from: Alliance on Thu 11/02/2010 20:03:03
For most native linux games, savegames don't actually go in the directory of the binary. Since AGS does this, and since this binary would be installed into a place that doesn't have root write access for good reason, this means that there is no logical way to save a game.

Yes. I suppose it would be ideal to put the savegame location into the configuration file so the end user can choose where save games should go.

Say, Chris, I believe not only Linux would benefit from such a change. Right now the windows versions also put the savegames in a fixed location which can be a little obscur to the player.

This needs some more thought to make it more uniform on all platforms.

Quote from: AllianceAlso, what about re-naming the game binary and setup utility to be more aligned with that of the game's name? ags-setup works great, but what if a user installs several ags linux games under /usr/share/games, and a link is put under /usr/bin/? This would cause confusion in the system, and running a setup utility from the command line would end up requiring the user to navigate to different folders just to set up their game of choice.

I've got a different solution for that problem, but haven't had the time to work on it yet. For the moment, games can't be in the same location.

deadsuperhero

Good to hear that you might be updating the runtime soon!  :D I'd really love to see a fix for the save issue, especially since the game seems to generate an agssave.999 every time the game is run. (As far as I can remember, anyways.)

QuoteI've got a different solution for that problem, but haven't had the time to work on it yet. For the moment, games can't be in the same location.

I, too, realized a workaround for this one. This would be more of a packaging issue than anything else.

Games reside in their own personal folders under...let say, /usr/share/games/$GAMENAME/

A packager could just make a link to the binary and the setup by having it work like so:

$GAMENAME would be a link to /usr/share/games/$GAMENAME/ags272
$GAMENAME-Setup would be a link to /usr/share/games/$GAMENAME/ags-setup

Of course, this would have to be done every time for the sake of packaging, but the end user wouldn't really have to do anything. Especially if these said games were just in some convenient PPA on Launchpad.

Another thing of note: audio. Technically speaking, it's possible to get sound effects, music, and voice files to work, though this requires your patched liballegro-4.2 library. Is it more beneficial to rely on liballegro-4.3, since that's what you're patching from anyways? If so, are there any plans to do so? This would probably save a lot of Ubuntu users the hassle of having to have the correct library to run the game. (Not PATCH the game, of course, but to just use the runtime itself)

Keep up the good work!  ;D
The fediverse needs great indie game developers! Find me there!

Pumaman

Quote from: Electroshokker on Sat 06/03/2010 22:43:41
save games should go.

Say, Chris, I believe not only Linux would benefit from such a change. Right now the windows versions also put the savegames in a fixed location which can be a little obscur to the player.

This needs some more thought to make it more uniform on all platforms.

Well, although a properly customizable location might be a good for a future version, for now AGS already handles this issue on Windows by saving games to the My Documents/My Saved Games folder.

For the Linux port, the Linux platform driver could override the virtual method AGSLinux::ReplaceSpecialPaths and replace the $MYDOCS$ tag with a standard writable location that it would be safe to save games to.

deadsuperhero

Quote from: Pumaman on Sun 07/03/2010 19:02:35
For the Linux port, the Linux platform driver could override the virtual method AGSLinux::ReplaceSpecialPaths and replace the $MYDOCS$ tag with a standard writable location that it would be safe to save games to.

A standard way for doing this would be under the home folder, in /home/$USERNAME/ and then a hidden directory .GAMENAME. Most Linux games and applications save user-specific settings and save files in this manner. (Actually, now that I think of it further, something like /home/$USERNAME/ .ags/ $GAMENAME might actually work better.)

Anyways, the benefit of doing so would allow for me to generate .deb Ubuntu packages and put it in a PPA. Currently the archive is empty, but I plan on going to development teams of the most popular AGS games in the future and using the runtime to generate the Linux binary. Then I can package it up, and Ubuntu users will finally have a simple enough way to play AGS games natively, without fiddling with configurations and packages too much.

The PPA is available here, although it is currently empty.
https://launchpad.net/~iliketowritestuff/+archive/agslinuxgames
The fediverse needs great indie game developers! Find me there!

deadsuperhero

Hate to bump this up, but is there any word on that save fix for the runtime?
The fediverse needs great indie game developers! Find me there!

eriktorbjorn

Quote from: Electroshokker on Sun 07/06/2009 14:56:40
If you encounter any problems running AGS 2.72 games, let me know. Your feedback is appreciated!

I'm not sure if Trilby's Notes is AGS 2.72 or not, but the graphics look pretty strange in it for me. It's a 256-colour game and apparently the Red and Blue colour components have been swapped. This problem has been mentioned once or twice before, so maybe it's old news. Do you know if it's a problem with AGS, or if it's a problem with the Allegro library under Linux?

I eventually worked around the problem by compiling my own version of Allegro (4.2.3.1, to be exact) where I changed src/x/xwin.c so that the _xwin_private_hack_shifts() function doesn't ever set the use_bgr_palette_hack variable. That made the colours look like they should so that could indicate an Allegro bug, I guess. On the other hand, I wrote a trivial Allegro test program that ran in 8-bit mode and printed the words "Red", "Green" and "Blue" in their respective colours. That one worked fine with the unmodified Allegro library.

(I also noticed two rather minor glitches in 5 Days a Stranger and 7 Days a Sceptic, but they're too old to have been written for AGS 2.72 so maybe that's to be expected.)

eriktorbjorn

Another game I tried briefly was Adventures in the Galaxy of Fantabulous Wonderment. There's a graphics effect on the title screen that, when I run it under Windows, happens almost in the blink of an eye. When I run it under Linux it takes 40 seconds or so when I run the game at 640x400 pixels. Even at 320x200 it takes somewhere between 5 and 10 seconds. I guess this is an AGS 2.62 game, not 2.72, but both were equally slow when I tried them. The rest of the game (at least what little I looked at) seemed to run well, except for Red and Blue being swapped.

Just for fun I tried the 3.12 release candidate on it, and it was almost the exact opposite: The graphics effect on the title screen worked fine, but the rest of the game was unplayably slow.

Electroshokker

Quote from: DeadSuperHero on Wed 05/05/2010 04:46:28
Hate to bump this up, but is there any word on that save fix for the runtime?

It's been a loooong time and I'm sad to say I couldn't get around to it 'till today. Anyways, you'll find the link in the first post.

Games will get saved to /home/$username$/.ags/$gamename$ with this build.

Electroshokker

Quote from: eriktorbjorn on Sat 21/08/2010 17:42:35
I'm not sure if Trilby's Notes is AGS 2.72 or not, but the graphics look pretty strange in it for me. It's a 256-colour game and apparently the Red and Blue colour components have been swapped.

Looks like an old problem. I'll look into it, though. Having to re-compile Allegro is something I'd prefer avoiding wherever possible (though it can't be helped for those who have the no sound problem.)

Quote from: eriktorbjorn on Sun 29/08/2010 19:43:11
Another game I tried briefly was Adventures in the Galaxy of Fantabulous Wonderment. There's a graphics effect on the title screen that, when I run it under Windows, happens almost in the blink of an eye. When I run it under Linux it takes 40 seconds or so when I run the game at 640x400 pixels.

Looking into it.

Quote from: eriktorbjorn
Just for fun I tried the 3.12 release candidate on it, and it was almost the exact opposite: The graphics effect on the title screen worked fine, but the rest of the game was unplayably slow.

Yes, the 3.12 candidate is really slow. Haven't gotten around to it. Will do so right after fixing the 2.72 build;

deadsuperhero

Tried getting a game to work with the new runtime patch for savepaths, unfortunately I get this error whenever I try and launch the game (For sake of reference, the latest version of Space Quest 4.5: Roger Wilco and the Voyage Home)

Quote./AGS272: symbol lookup error: /usr/lib/liballeg.so.4.2: undefined symbol: _blender_trans24

A quick Google search shows that this has something to do with allegro libraries. If we could smooth this one out, that'd be dandy.
The fediverse needs great indie game developers! Find me there!

Electroshokker

Quote from: DeadSuperHero on Tue 07/09/2010 02:24:33
Tried getting a game to work with the new runtime patch for savepaths, unfortunately I get this error whenever I try and launch the game (For sake of reference, the latest version of Space Quest 4.5: Roger Wilco and the Voyage Home)

Quote./AGS272: symbol lookup error: /usr/lib/liballeg.so.4.2: undefined symbol: _blender_trans24

A quick Google search shows that this has something to do with allegro libraries. If we could smooth this one out, that'd be dandy.

This error means the wrong Allegro library is used. Are you using the one I recompiled or the standard one?

deadsuperhero

I'm assuming the one you provided, as it automatically patches that through the installer via getlibs, right?
The fediverse needs great indie game developers! Find me there!

deadsuperhero

Still getting the same error. Interestingly enough, it works just fine without the savepath fix, but it messes up whenever I try and convert a compatible game over and run it, with the same error as before.

Any thoughts?
The fediverse needs great indie game developers! Find me there!

Electroshokker

Just noticed the following: http://stanford.edu/~pgbovine/cde.html

This tool packs up the necessary environment and dependencies and runs a linux program in a sandbox.

I'm gonna give it a test this weekend and see if this helps resolving possible AGS dependency and library problems.

deadsuperhero

I don't mean to nag, but have you made any progress with the _blender_trans24 error? I kind of wanted to package up a small sampler of AGS game projects I'm working on for Ubuntu users around April or May.
The fediverse needs great indie game developers! Find me there!

Electroshokker

Quote from: DeadSuperHero on Wed 09/02/2011 15:31:01
I don't mean to nag, but have you made any progress with the _blender_trans24 error? I kind of wanted to package up a small sampler of AGS game projects I'm working on for Ubuntu users around April or May.

Working on it. Just dug up my old project files from my HD. (New pc and all, temporary forgot where I put them, haven't had time to look into it yet.)

deadsuperhero

Quote from: Electroshokker on Tue 29/03/2011 13:30:17
Quote from: DeadSuperHero on Wed 09/02/2011 15:31:01
I don't mean to nag, but have you made any progress with the _blender_trans24 error? I kind of wanted to package up a small sampler of AGS game projects I'm working on for Ubuntu users around April or May.

Working on it. Just dug up my old project files from my HD. (New pc and all, temporary forgot where I put them, haven't had time to look into it yet.)

Well, let me know! AGS is one of the few engines I'm actually half decent at working with, and I'd hate to go back and have to teach myself everything from scratch on one of the many half-finished Linux adventure game engines out there.
The fediverse needs great indie game developers! Find me there!

Electroshokker

Quote from: DeadSuperHero on Tue 29/03/2011 23:31:12
Well, let me know! AGS is one of the few engines I'm actually half decent at working with, and I'd hate to go back and have to teach myself everything from scratch on one of the many half-finished Linux adventure game engines out there.

Try this one:

Freshly build RC3, Allegro & Dumb no longer need to be installed separately with this one. They're included in the executable.

Things I've noticed:

- sound no longer works in Ubuntu 10.10 (*sigh*)
- gstreamer libraries act funny in 64-bit Ubuntu

Please test this build on different systems and tell me where it works and where it doesn't. (With/without audio/video)
Note you need the gstreamer packages for video.

Sslaxx

Quote from: Electroshokker on Wed 30/03/2011 11:55:30
Quote from: DeadSuperHero on Tue 29/03/2011 23:31:12
Well, let me know! AGS is one of the few engines I'm actually half decent at working with, and I'd hate to go back and have to teach myself everything from scratch on one of the many half-finished Linux adventure game engines out there.

Try this one:

Freshly build RC3, Allegro & Dumb no longer need to be installed separately with this one. They're included in the executable.

Things I've noticed:

- sound no longer works in Ubuntu 10.10 (*sigh*)
- gstreamer libraries act funny in 64-bit Ubuntu

Please test this build on different systems and tell me where it works and where it doesn't. (With/without audio/video)
Note you need the gstreamer packages for video.
The sound issue appears to be something to do with Allegro, if http://opensnc.sourceforge.net/wiki/index.php/FAQ#The_game_has_no_sound.21_.28Linux.29 is anything to go by. Seems static compiling doesn't get around that issue then, disappointing.
Stuart "Sslaxx" Moore.

Electroshokker

#68
Quote from: Sslaxx on Wed 30/03/2011 12:18:43
The sound issue appears to be something to do with Allegro, if http://opensnc.sourceforge.net/wiki/index.php/FAQ#The_game_has_no_sound.21_.28Linux.29 is anything to go by. Seems static compiling doesn't get around that issue then, disappointing.

Hey, thanks for that link. I've been digging into the sound issue for a while now, but no luck so far. Forcing ags to run under aoss would be nice (heck, ANY sound would be nice), but my 64-bit pc doesn't allow it (RL_PRELOAD bug), and my 32-bit image is pretty much screwed up again. (after multiple experiments)

I'll try the approach described on a fresh virtualbox soon. For those who want to know if this works quicker:

Code: ags

sudo apt-get install alsa-oss


Create a file named AGS272_with_sound in the game folder. Using a simple text editor (like nano, gedit, kate, etc.), write the following contents to it:

Code: ags

#!/bin/bash
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
aoss ./AGS272 $@


Make the file executable:

Code: ags
chmod +x opensurge_with_sound


Then try starting ags using ./AGS272_with_sound


EDIT: seems this simple approach doesn't work. drat.

Sslaxx

Quote from: Electroshokker on Wed 30/03/2011 13:21:19
Quote from: Sslaxx on Wed 30/03/2011 12:18:43
The sound issue appears to be something to do with Allegro, if http://opensnc.sourceforge.net/wiki/index.php/FAQ#The_game_has_no_sound.21_.28Linux.29 is anything to go by. Seems static compiling doesn't get around that issue then, disappointing.

Hey, thanks for that link. I've been digging into the sound issue for a while now, but no luck so far. Forcing ags to run under aoss would be nice (heck, ANY sound would be nice), but my 64-bit pc doesn't allow it (RL_PRELOAD bug), and my 32-bit image is pretty much screwed up again. (after multiple experiments)

I'll try the approach described on a fresh virtualbox soon. For those who want to know if this works quicker:

Code: ags

sudo apt-get install alsa-oss


Create a file named AGS272_with_sound in the game folder. Using a simple text editor (like nano, gedit, kate, etc.), write the following contents to it:

Code: ags

#!/bin/bash
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
aoss ./AGS272 $@


Make the file executable:

Code: ags
chmod +x opensurge_with_sound


Then try starting ags using ./AGS272_with_sound

EDIT: seems this simple approach doesn't work. drat.
Yeah, tried that just now and it didn't work. 10.10, yes? Wondering if it's distro version specific.
Stuart "Sslaxx" Moore.

deadsuperhero

Just saw this in the release notes.

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

Does this work now? I tried saving my game, and although it did save, it did it in the directory of the executable itself. Does it need to just be shoved into a non-user directory in order to use the special savepath fix?

I'll give it a shot and see if that's the case.

Edit: Nope.  :(
The fediverse needs great indie game developers! Find me there!

Electroshokker

Quote from: DeadSuperHero on Wed 30/03/2011 14:26:33
Just saw this in the release notes.

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

Does this work now? I tried saving my game, and although it did save, it did it in the directory of the executable itself. Does it need to just be shoved into a non-user directory in order to use the special savepath fix?

I'll give it a shot and see if that's the case.

Make sure the .ags folder exists in you userhome.

Put the game in your userhome under, let's say the "AGS Games" folder. When saving the game you'll see a new folder being created in the hidden .ags folder.

deadsuperhero

Okay, the savepath is definitely working now. That's pretty exciting.

Unfortunately, it does not currently work for running an executable outside of the /home/$username/ directory, so packaging is still out of the question for the time being, sadly. However, this is a step in the right direction, I feel.

Thank you so much for all your hard work!
The fediverse needs great indie game developers! Find me there!

strazer

Glad to see this is still being worked on! I just checked the latest build of my old test game with the RC3 runtime. Runs great, but no sound unfortunately (Ubuntu 10.10):

Unable to initialize your audio hardware.
[Problem: Insufficient digital voices available]

Then again, using the older engine now also gives me no sound with no error messages...strange.

Electroshokker

Quote from: strazer on Thu 31/03/2011 12:22:45
Glad to see this is still being worked on!
I just checked the latest build of my old test game with the RC3 runtime. Runs great, but no sound unfortunately (Ubuntu 10.10):

Unable to initialize your audio hardware.
[Problem: Insufficient digital voices available]

Then again, using the older engine now also gives me no sound with no error messages...strange.


Yeah, first priority is to figure out how to get sound again. I've been looking at it from multiple angles but the only solution I can come up with is replace the default allegro audio system with a different one. (Like gstreamer audio. Hey, I'm already using that for the video, might as well extend it.)

The cause is PulseAudio, which takes over default ALSA, but doesn't do so properly, breaking a lot of stuff in the progress. And even if they get it right, pulseaudio delays the sound due to the way it works. Not a great choice there for the distros to having rushed in using it. Does anyone with a different OS get sound working?

I've also upped the allegro library version to 4.4, which seems to work just fine (it's fully backwards compatible with 4.2). Why? Since it's got OpenGL extensions, and I hope to use them for the linux build, allowing for a new option there and quicker rendering.

Of course, if Chris were to switch over to 4.4 with the windows version he could add OpenGL too... Though he probably has as little time to work on this as me.

BigMc

Hi,

are there plans to get the changes that were made for the Linux port into the SVN? That would be great! Also are the Linux sources available?

Best regards,
BigMc

Electroshokker

Quote from: BigMc on Thu 25/08/2011 23:20:12
Hi,

are there plans to get the changes that were made for the Linux port into the SVN? That would be great! Also are the Linux sources available?

Best regards,
BigMc

I handed over all the sources of the pre- opensource AGS linux versions to Chris. I haven't been involved with the code anymore since AGS went opensource.

timofonic

Are there any news?

I see there's the official SVN, the JJS Git repo in Gitorious.

Any plans of a new Linux port? I heard Bero is doing one. Maybe a proper central site for all AGS runtime ports would be nice.

Electroshokker

I'm changing hosting solution.

Anyone needing one of the old linux port builds, feel free to contact me.

Total down time might be a couple of days.

timofonic

Would you be allowed to open the source code of them?

And what about new ports? :)

BigMc

I opened a new thread for discussion about using JJSs engine on Linux.

SMF spam blocked by CleanTalk