AGS Ubuntu Linux 2.72 Binaries Released!

Started by EvilTypeGuy, Wed 24/01/2007 05:06:03

Previous topic - Next topic

Kweepa

Quote from: Pumaman on Fri 08/06/2007 21:20:14
I have investigated SDL recently, and in comparison to Allegro it doesn't really seem to have any benefits. They both run off DirectDraw behind the scenes, and SDL doesn't seem to have any advantages that would make porting the code worthwhile.
The advantages I can think of are mostly to do with portability to platforms that Allegro doesn't touchlike consoles PDAs etc
Still waiting for Purity of the Surf II

EvilTypeGuy

#61
Quote from: strazer on Fri 08/06/2007 22:34:53
Quote from: EvilTypeGuy on Fri 08/06/2007 20:46:08
No, since the engine can't really run "generically." Meaning, you pretty much have to have it run from the same directory as the game data at this point. Which in turn means that there isn't much point in packaging it.

Quote from: EvilTypeGuy on Fri 08/06/2007 20:46:08You cannot tell ags which file to use as the game file. It looks for ac2game.dat in the current directory.

Are you sure? I put the AGS files into /usr/local/bin and usually run games like this:
  $ cd /usr/local/games/ags/6das
  $ ags 6das.exe
Works like a charm.
A problem is savegame compatibility, so you have to remember to always play the game with the same AGS version. That's why I have several AGS versions in /usr/local/bin, named ags262, ags271 and so on.

That's basically why I said same directory. That and I haven't always had it work when it wasn't in the same directory, it seems to vary based on which Linux distro/Allegro build I'm using.

Quote from: Pumaman on Fri 08/06/2007 21:20:14
I have investigated SDL recently, and in comparison to Allegro it doesn't really seem to have any benefits. They both run off DirectDraw behind the scenes, and SDL doesn't seem to have any advantages that would make porting the code worthwhile.


SDL would probably be better in some aspects. However, it doesn't provide the software wavetable sound system that Allegro does and its more of a generic platform library for graphics and audio. Allegro, on the other hand as you well know, is a *game* library as well.

Suffice to say that for now, Allegro remains a good choice for AGS best I can tell.

Baffo32

#62
AGS 2.72 is segfaulting for me :(

I am running Gentoo Linux, with allegro 0.4.2.1 and aldmb 0.9.3 .  AGS 2.71 worked fine.  I had to make my own libaldmb.so.1 and libdumb.so.1 symlinks to *.so, so maybe I have the wrong libdumb -- but the crash looks like it is in graphics code rather than sound code.

Code: ags
$ gdb ags
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /mnt/hda1/ags/ags 
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1213122896 (LWP 25334)]
Adventure Creator v2.72 Interpreter
Copyright (c) 1999-2001 Chris Jones
ACI version 2.72.920
[New Thread -1213949040 (LWP 25337)]
Unknown CPU detected.
Speech sample file found and initialized.
Music file found and initialized.
Checking sound inits.
[New Thread -1230132336 (LWP 25338)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213122896 (LWP 25334)]
0x08102750 in stretch_masked_line16 ()
(gdb) bt
#0  0x08102750 in stretch_masked_line16 ()
#1  0x08103157 in _al_stretch_blit ()
#2  0x0810346e in Cstretch_sprite ()
#3  0x0808cb52 in initialize_sprite ()
#4  0x080504c0 in SpriteCache::loadSprite ()
#5  0x0805096c in SpriteCache::precache ()
#6  0x0809d7ce in init_game_settings ()
#7  0x080bd06c in main ()
(gdb) 


EDIT:
maybe this problem was due to gentoo allegro patches or wrong allegro version... using marceledward's debian allegro shared library, ags runs fine =D

Radiant

If one of the resident Linux gurus has the time to check this, I would like to know whether the instructions and package included in the zipfile for ATOTK are clear enough and sufficient. I don't have the Ubuntu to test it on myself.

http://crystalshard.net/atotk.php?page=down (the zip, not the windows .exe :) )

deadsuperhero

#64
Quote from: Radiant on Mon 16/07/2007 11:46:45
If one of the resident Linux gurus has the time to check this, I would like to know whether the instructions and package included in the zipfile for ATOTK are clear enough and sufficient. I don't have the Ubuntu to test it on myself.

http://crystalshard.net/atotk.php?page=down (the zip, not the windows .exe :) )

I'll test it out, I've  got everything dualbooted.
Everything but midi works, but that could just be me not installing something.

On the other hand, I have a VERY helpful tip for anyone wanting to run an AGS game in Linux, without using the terminal much(with the exception of getting things first set up)
-Go through these simple instructions to install ATOTK
1. Download the .zip file
2. check on the offical AGS Linux page, make sure you have all dependencies.
3. Extract the .zip file to somewhere easy to remember, such as /home/yourusername/Games/AGS/ATOTK
4. Download the latest ags engine, and the midi patch
5. Type cd /home/yourusername/Games/AGS/ATOTK
6. Type tar -xjf /home/yourusername/whereyoudownloaded/ags-v2_72_920.tar.bz2 , then hit enter
7. tar -xjf /home/yourusername/whereyoudownloaded/midiptch.tar.bz2 , then hit enter again.
8. Type ./ags-setup, hit enter, then select "force Alternate letterbox resolution", then 640 x 480, then hit Save.
9. Type ./ags to play

However, after you do this once, you're not going to want to use this process a whole lot. Fear not!

Go to /home/yourusername/Games/AGS/ATOTK in whatever file browser you use
Right click on ags, choose "use custom command"

For the custom command type "gnome-terminal" if you use regular Ubuntu with the GNOME desktop
Do the same for ags-setup.
You'll be able to run them by clicking them now, and you may even be able to run it through launchers if you want.
I'm still experimenting, but it seems to work.

EDIT: Fixed, thanks Gilbot!
The fediverse needs great indie game developers! Find me there!

Radiant

The music isn't MIDI, it's MP3.

I fail to see what your instructions do, except for unpacking everything and creating a shortcut??

deadsuperhero

#66
It's essentially the same thing as EvilTypeGuy's instructions for setting up the game.
However, I also set it to work not as a shortcut, but as a working linux executable, seeing as that gnome-terminal (or whatever you use for the terminal) will read it, and run it.
The fediverse needs great indie game developers! Find me there!

strazer

#67
Quote from: Alliance on Wed 18/07/2007 07:18:38
Go to /home/yourusername/Games/AGS/ATOTK in whatever file browser you use
Right click on ags, choose "use custom command"

For the custom command type "gnome-terminal" if you use regular Ubuntu with the GNOME desktop

I also don't understand what this is supposed to do. I don't even have have a "use custom command" option when I right-click either the ags binary or the game exe.

(Edit: Ah, you didn't say to click "Open with Other Application" first.)

I do it this way: I have several ags versions stored in a single location, usr/local/bin, i.e.
/usr/local/bin/ags272
/usr/local/bin/ags272-setup
/usr/local/bin/ags271
/usr/local/bin/ags271-setup
...and so on.
I have ags272 associated with exe files (via "Open with Other Application...") so I can quickly test games by double-clicking, or I can create a launcher (shortcut) that runs
"ags272 /usr/local/games/ags/twokingdoms/ATOTK.exe".

Quote from: Radiant on Wed 18/07/2007 13:42:10
The music isn't MIDI, it's MP3.

Ah, I thought I hadn't set up MIDI correctly when I heard no music.
I had to check "Use digital music pack if available" in ags-setup and now there's music.

--

Hm, strange. Recently, every game I play, either with the 2.71 or 2.72 engine (btw: no matter if run from /usr/local/bin or copied to the gamedir), crashes with this error message when I exit (via a Quit function or Alt+X):

Quote
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  134 (XFree86-VidModeExtension)
  Minor opcode of failed request:  10 (XF86VidModeSwitchToMode)
  Value in failed request:  0x2800001
  Serial number of failed request:  4635
  Current serial number in output stream:  4640

Error: the program has exited without requesting it.
Program pointer: +9902  (write this number down), ACI version 2.72.920
If you see a list of numbers above, please write them down and contact
Chris Jones. Otherwise, note down any other information displayed.
Aborted (core dumped)

And it doesn't restore my previous desktop resolution so it's very annoying having to revert it every time.

It only happens when I run games fullscreen, when running in a window they exit without the error message. Looks like I have to run them in a window for now.

deadsuperhero

Erm, really? I get a "Open With Other Application", and at the bottom of the list, there's a text box, saying "use custom command"
The fediverse needs great indie game developers! Find me there!

deadsuperhero

Random thought today. Seeing as the current process to get AGS games to run in Linux, is it possible to package the engine with the game in a .deb package? That might make for an easy install and setup for it...
I also hope to see the ALSA support in the future, as that's the chipset that I unfortunately have. Oh well. All in good time.  :)
The fediverse needs great indie game developers! Find me there!

jkohen

Version 2.72 of the native Linux interpreter uses 100% CPU for most, if not all games. This frequently cause short stuttering and also forces the CPU fan to be on all the time, thus making for a noisy game experience.

Since I have a fairly powerful computer and the same games running in the native Win32 interpreter running thanks to Wine do not exhibit the same behavior (they normally use less than 50% of CPU), I think this is a bug. Actually, the game uses the same amount of user time with both interpreters, but the Linux one maxes out the rest in system time. That means that the time is spent inside the kernel.

Strace on the AGS process tells me that nanosleep(2) is being called non-stop with an argument of (0, 1000), which tells the kernel to stop the process for 1 microsecond. In reality it's sleeping a bit longer here: 25 microsenconds, which means 40,000 wake-ups in a second. That is way too much for a game. I don't know what subsystem of AGS is causing this, since obviously I don't have its source code, but please let it sleep longer and preferrably use some sort of notification mechanism (i.e. poll(2), audio buffer signals, or whatever makes sense for this subsystem) instead of system unfriendly sleeps.

I don't know when this bug started, but it's been around for a while, and it affects at least a few kernels up to the latest: 2.6.22, both pristine and patched with CFS, which helps a bit evening out the bursts.

EvilTypeGuy

Quote from: blashyrkh on Sun 26/08/2007 17:40:44
Version 2.72 of the native Linux interpreter uses 100% CPU for most, if not all games. This frequently cause short stuttering and also forces the CPU fan to be on all the time, thus making for a noisy game experience.

I have not seen this, and suspect it is something local to your system, or to a particular configuration, though I will check into it best I can.

QuoteStrace on the AGS process tells me that nanosleep(2) is being called non-stop with an argument of (0, 1000), which tells the kernel to stop the process for 1 microsecond. In reality it's sleeping a bit longer here: 25 microsenconds, which means 40,000 wake-ups in a second. That is way too much for a game. I don't know what subsystem of AGS is causing this, since obviously I don't have its source code, but please let it sleep longer and preferrably use some sort of notification mechanism (i.e. poll(2), audio buffer signals, or whatever makes sense for this subsystem) instead of system unfriendly sleeps.

I don't know when this bug started, but it's been around for a while, and it affects at least a few kernels up to the latest: 2.6.22, both pristine and patched with CFS, which helps a bit evening out the bursts.
[/quote]

ags relies on many libraries, anyone of them could be calling it. It's important to note that the ags linux port uses the exact same codebase that the Windows port does. Thus, the behaviour you see in one is very likely present in the other. The linux port has very few differences relative to the size of the actual codebase compared to the Windows version.

Nazgul

Hello guys,

I had the same problem with Midi on Ubuntu linux when trying to load AGS. It kept displaying the same error message:

Checking sound inits.
ALSA lib rawmidi_hw.c:233:(snd_rawmidi_hw_open) open /dev/snd/midiC0D0 failed: No such file or directory
ALSA lib rawmidi_hw.c:233:(snd_rawmidi_hw_open) open /dev/snd/midiC0D0 failed: No such file or directory

Unable to initialize your audio hardware.
Problem: No supported synth type found


After checking my /dev/snd directory, I couldn't find any midi files there. The only solution I thought of was to emulate a midi port using a link. So, i opened a terminal and loaded the virmidi module:

$ sudo modprobe snd_virmidi

After that, my /dev/snd/ directory had lots of midiCxDx files. But still, AGS wanted specifically the midiC0D0 file. So i linked it, creating a "fake" midiC0D0:

$ sudo ln -s midiC1D1 midiC0D0

And, voilá, AGS run smoothly and i can finally play A Tale of Two Kingdoms on linux.

Perhaps it's not the "cleanest" solution, but it worked here :-)

I hope it helps you people.


farvardin

with the new Asus EEE Pc, which is running linux, it would be cool to be able to play AGS games on it. But unfortunately they're using a stable, old, version of Xandros / Debian, and there is a problem to run ags because of glibc. Would it be possible to release a version of ags for linux compiled with an older glibc ? (debian etch would be fine)


covox

Quote from: EvilTypeGuy on Tue 12/06/2007 03:46:48
Quote from: Pumaman on Fri 08/06/2007 21:20:14
I have investigated SDL recently, and in comparison to Allegro it doesn't really seem to have any benefits. They both run off DirectDraw behind the scenes, and SDL doesn't seem to have any advantages that would make porting the code worthwhile.

SDL would probably be better in some aspects. However, it doesn't provide the software wavetable sound system that Allegro does and its more of a generic platform library for graphics and audio. Allegro, on the other hand as you well know, is a *game* library as well.

Suffice to say that for now, Allegro remains a good choice for AGS best I can tell.

Normally I'd agree with you about the usefulness of software wavetable support, but won't on the grounds that it is damn-near impossible to get working. Sticking patches.dat in the same folder as AGS and forcing Software Wavetable gives "[Problem: DIGMID patch set not found]". The dodgy ancient wavetable engine bundled with SDL_mixer loads fine.

ALSA's software and hardware MIDI support (timidity and snd-emu10k1) also fail without error on my system, probably something to do with the dodgy OSS layer. By contrast, running AGS under Wine with ALSA produces perfect MIDI.

The main reason why SDL shines over Allegro is its cross-platform robustness. Take, for instance, the Nintendo Wii. A brilliant hypothetical platform for adventure games. Right now it's closed off, but a month ago some bloke figured out how to dump the console's private keys. Yesterday someone figured out how to perform a buffer-overflow attack in Zelda Twilight Princess. Give it another month or three and it'll run Linux, at which point SDL should just compile off the bat without having to change a single line of code. I can't remember what the cross-platform robustness of Allegro is like, however given that sketchy OSX support is relatively new there might be issues building on an undocumented PPC Linux system.

The big question now is, will AGS v3 get ported? I'm on tenterhooks, as I have the script/dialogue for a game prewritten and am tossing up between AGS2 or 3 to develop it in. (The other option is to write an engine from scratch in pygame, but that'd probably look worse and be easier to cheat and have a much smaller target audience)

Quote from: farvardin on Sat 26/01/2008 11:29:59
with the new Asus EEE Pc, which is running linux, it would be cool to be able to play AGS games on it. But unfortunately they're using a stable, old, version of Xandros / Debian, and there is a problem to run ags because of glibc. Would it be possible to release a version of ags for linux compiled with an older glibc ? (debian etch would be fine)

If you're feeling adventurous (see what I did there!), you can always install Ubuntu on the EeePC. It's guaranteed to be more up-to-date than the ASUS-branded copy of Xandros.

deadsuperhero

Well, I don't know about AGS getting ported, it's a huge undertaking, and Chris has been working his butt off just getting v3 to work.
Personally, I'd just run v2 in Wine, seeing as it's not .NET-based, and I kind of like the older interface (as well as old functions) anyway.
The fediverse needs great indie game developers! Find me there!

SSH

The engine for 3.00 is little changed from 2.72, so I'd expect games that didn't use 3.00 features (just the 3.00 editor) to still work, perhaps?
12

yztlyrn

You guys have is all figured out.  However, it's a little technical for some of us.  As Ubuntu is kind of the non-techies Linux, pleas wrap this up into a .deb that will draw it's dependencies automatically.  That would go a long way to getting more people to try your games.

Pumaman

Quote from: SSH on Tue 05/02/2008 16:09:21
The engine for 3.00 is little changed from 2.72, so I'd expect games that didn't use 3.00 features (just the 3.00 editor) to still work, perhaps?

The file formats have changed, so you wouldn't be able to play a 3.0 game with the 2.72 engine.

SuperDre

Quote from: Pumaman on Fri 28/03/2008 18:07:23
The file formats have changed, so you wouldn't be able to play a 3.0 game with the 2.72 engine.

then it would be wise to make sure the Linux engine can run both, so no need for different 'files' for different games, just like ScummVM, one engine to rule them all ;) Hell, it would even be unbelievable cool to have AGS support in ScummVM, so really only one engine to play all your favorite adventure games..

Quote from: EvilTypeGuy on Fri 08/06/2007 20:46:08
As noted in the instructions that come with AGS, you must rename game.exe to ac2game.dat or make a symlink to game.exe as ac2game.dat.

You cannot tell ags which file to use as the game file. It looks for ac2game.dat in the current directory.

Hmm.. why not just look for any .exe (and check some data to see if its an AGS exe (that's just reading a binaryblock and check for some specifics, so real easy)) in the current path and show a little selectionscreen (if there are more than one).. this would be much better/userfriendly than having to rename blahblah.exe to ac2game.dat.. Also config files and savegame files can be named the same as the exe, so everything can go in one folder (or any specific folder).. But then again, linux never has been really userfriendly..

Keep up the good work, and hopefully a new version will be able to run all video's/animations... And for plugins it would be better to get a framework/api (if it isn't already) so it would be possible to port plugins from windows to linux..

SMF spam blocked by CleanTalk