GNU/Linux Ports

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

Previous topic - Next topic

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.

SMF spam blocked by CleanTalk