Author Topic: AGS engine Linux port  (Read 143905 times)

Re: AGS engine (JJS) Linux port
« Reply #60 on: 21 Sep 2012, 12:14 »
That was a bug in the saving code that I fixed now in the main branch (commit 205c56d693d903516b7b21beb454251e9489aab f). I don't know why it never caused problems on 32 bit.

Re: AGS engine (JJS) Linux port
« Reply #61 on: 21 Sep 2012, 12:52 »
That was a bug in the saving code that I fixed now in the main branch (commit 205c56d693d903516b7b21beb454251e9489aab f). I don't know why it never caused problems on 32 bit.
I've already fixed that in refactory branch some time ago. I wanted to ask JJS about this (since it was in his new code), but forgot :/.

Re: AGS engine (JJS) Linux port
« Reply #62 on: 21 Sep 2012, 13:29 »
When do you think is a good time to recommend people to use refactory? If there are no known bugs, why not now?

Re: AGS engine (JJS) Linux port
« Reply #63 on: 21 Sep 2012, 13:34 »
When do you think is a good time to recommend people to use refactory? If there are no known bugs, why not now?
I know only one bug related to freeing managed script objects that takes place when application window is closed by OS means (e.g. alt+f4 in windows), but it happens only when game is closing so maybe it isn't that critical.
Don't know if there are any platform-specific bugs. JJS said there were some problems on 64-bit and bigend OSes, but he made a commit with fixes recently, so maybe they are solved?
Personally I am totally supporting change to refactored, 'cause it is becoming more tedious to copy changes from main. Plus it will be tested more :)

Re: AGS engine Linux port
« Reply #64 on: 22 Sep 2012, 05:49 »
Just rebuilt and played through 75% of the Kings Quest I remake and everything worked flawlessly. Good work!

Re: AGS engine Linux port
« Reply #65 on: 22 Sep 2012, 07:28 »
You can start using the refactory branch. But savegames on 64 bit are not compatible between main and refactory. Bigendian code is still broken in the script interpreter.

Still the whole savegame issue is a bit of a mess. What I mean is that savegames have a different size on all platforms, which is something that I do not at all understand.

E: What I am saying is that savegame related stuff is hard to debug because even if the game loads what guarantee do I have that the WHOLE game state was restored? Everything might blow up in specific situations where a value matters that usually doesn't :/
« Last Edit: 22 Sep 2012, 07:32 by JJS »
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Re: AGS engine Linux port
« Reply #66 on: 22 Sep 2012, 10:30 »
You can start using the refactory branch. But savegames on 64 bit are not compatible between main and refactory. Bigendian code is still broken in the script interpreter.

Would you make refactory the default branch that is active after git clone?

Quote
Still the whole savegame issue is a bit of a mess. What I mean is that savegames have a different size on all platforms, which is something that I do not at all understand.

I know at least one reason why it's different between 32 and 64 bit. Look at save_game_data in the main branch and search for sizeof. There are structs stored that contain pointers:
RoomStatus, GameState, GameSetupStructBase, maybe more

Re: AGS engine Linux port
« Reply #67 on: 22 Sep 2012, 16:58 »
I know at least one reason why it's different between 32 and 64 bit. Look at save_game_data in the main branch and search for sizeof. There are structs stored that contain pointers:
RoomStatus, GameState, GameSetupStructBase, maybe more
Was he speaking of main or refactory branch?
I will recheck save/restore functions just in case. Who knows, I could miss some of "sizeof" instances there, or maybe added more mistakes...
Also I think we may finally remove alignment padding from there, since new engine is not supposed to be compatible with older version savegames.
« Last Edit: 22 Sep 2012, 17:01 by Crimson Wizard »

Re: AGS engine Linux port
« Reply #68 on: 22 Sep 2012, 18:24 »
Anyway, I think you meant they have a different size on all platforms, not only 32 bit vs 64 bit right JJS? Are C++ objects stored in the savegames in refactory? I would not be surprized if their size depends on the implementation.

Re: AGS engine Linux port
« Reply #69 on: 22 Sep 2012, 19:56 »
They are vastly different (several kilo byte) on all platforms, yes. You would assume that all 32 bit platforms at least Windows have the same size but they don't. For all I can tell saving/loading does work on all platforms and also cross-platform regardless of that. It is a mystery to me.

e: I am speaking of the refactory branch.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Re: AGS engine Linux port
« Reply #70 on: 22 Sep 2012, 20:17 »
Spots where differences occur should be easy to find by stepping through the saving code while keeping an eye on the file pointer.

Re: AGS engine Linux port
« Reply #71 on: 22 Sep 2012, 20:40 »
Another way to debug this would be to write signature strings after every save routine step and then compare two savegames from different OSes in the hex editor.

E: You know what.... I just found a bug in refactory branch... the global vars are READ during save routine :D. That's probably not related to the discussed problem though, but i's nice I made that recheck.
« Last Edit: 22 Sep 2012, 20:53 by Crimson Wizard »

Re: AGS engine Linux port
« Reply #72 on: 22 Oct 2012, 17:37 »
i'm upgrading to Xubuntu 12.10 x64 today so i'm hoping that ags will now run on it, i'm going to test it out once the install is finished.

Re: AGS engine Linux port
« Reply #73 on: 22 Oct 2012, 18:07 »
It should now also work on Ubuntu 12.04 amd64, because it works natively on 64bit know. The multiarch way is now only required for systems where the native 64bit build crashes all the time (seen on Debian).

Re: AGS engine Linux port
« Reply #74 on: 22 Oct 2012, 20:24 »
The amd64 version seemed to compile and install just fine, i haven't noticed any crashing issues.  Thanks BigMc for all your hard work, it is much appreciated! 

i'm not sure why i can't restore games saved under windows, although making new saves under Linux seems to work fine.  Also would be nice to have a Linux equivalent of winsetup.exe to easily spit out acsetup.cfg files.

Anyway i just discovered Adventure - All In The Game and it looks intriguing so i'm off to play that on Linux :)

Re: AGS engine Linux port
« Reply #75 on: 27 Dec 2012, 14:43 »
I Just compiled and tried AGS engine Linux port in Ubuntu 12.10 amd64.

First it didn't compile, but it was because the g++ package was missing in my system (Perhaps it should be added to the list of packages to install?), once g++ was installed the deb package was created flawlessly.

I tried it with a couple of games and there was no sound, probably because I had removed Pulseaudio. I remembered having read somewhere that AGS used Allegro so I installed liballegro4.4-plugin-alsa and voilá! The games had sound.

So I downloaded a couple of games more, new and old, and everything seems to work fine.

Thank you very much :)

Re: AGS engine Linux port
« Reply #76 on: 27 Dec 2012, 15:15 »
It is recommended to install the meta-package build-essential (depends on compilers etc) to compile things on Ubuntu. Allegro should use OSS if liballegro4.4-plugin-alsa is not installed. Maybe your soundcard was blocked by another ALSA application. That's what you get for removing Pulseaudio. ;)

Re: AGS engine Linux port
« Reply #77 on: 28 Dec 2012, 22:10 »
Allegro should use OSS if liballegro4.4-plugin-alsa is not installed.
Apparently OSS support was removed from Ubuntu's Kernel: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/579300
That's what you get for removing Pulseaudio.
A friend of mine removed the brakes from his bike as a kid to make it lighter. That's the spirit!

Re: AGS engine Linux port
« Reply #78 on: 29 Dec 2012, 01:20 »
Allegro should use OSS if liballegro4.4-plugin-alsa is not installed.
Apparently OSS support was removed from Ubuntu's Kernel: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/579300

Ok, that means that PulseAudio is now required for OSS support.

Quote
That's what you get for removing Pulseaudio.
A friend of mine removed the brakes from his bike as a kid to make it lighter. That's the spirit!

Yeah, that's quite to the point.

Re: AGS engine Linux port
« Reply #79 on: 12 Jan 2013, 14:10 »
I am trying to create an RPM for openSUSE. It fails to build

Quote
gcc -I../Engine -I../Common -I../Common/libinclude -O2 -g -fsigned-char -Wfatal-errors -DALLEGRO_STATICLINK -DTHIS_IS_THE_ENGINE -DLINUX_VERSION -DDISABLE_MPEG_AUDIO -DBUILTIN_PLUGINS -DRTLD_NEXT -I/usr/include/freetype2     -c -o libsrc/libcda-0.5/linux.o libsrc/libcda-0.5/linux.c

libsrc/libcda-0.5/linux.c:11:25: fatal error: linux/cdrom.h: No such file or directory

compilation terminated.

I checked out the main branch from git and used "make --directory=Engine --file=Makefile.linux". Defined the following packages as dependencies:
  • pkgconfig(allegro) = 4.4.2
  • libaldmb-devel
  • libdumb-devel
  • pkgconfig(freetype2)
  • libdumb-devel
  • pkgconfig(ogg)
  • pkgconfig(theora)
  • pkgconfig(vorbis)
  • pkg-config
  • gcc-c++

Guess there is still something missing or wrong with the libraries you bundled.
« Last Edit: 12 Jan 2013, 15:15 by Milanium »