[OLD-1] AGS engine Linux port

Started by BigMc, Sun 03/06/2012 19:04:20

Previous topic - Next topic

BigMc

That was a bug in the saving code that I fixed now in the main branch (commit 205c56d693d903516b7b21beb454251e9489aabf). I don't know why it never caused problems on 32 bit.

Crimson Wizard

Quote from: BigMc on Fri 21/09/2012 12:14:13
That was a bug in the saving code that I fixed now in the main branch (commit 205c56d693d903516b7b21beb454251e9489aabf). 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 :/.

BigMc

When do you think is a good time to recommend people to use refactory? If there are no known bugs, why not now?

Crimson Wizard

Quote from: BigMc on Fri 21/09/2012 13:29:01
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 :)

scottchiefbaker

Just rebuilt and played through 75% of the Kings Quest I remake and everything worked flawlessly. Good work!

JJS

#65
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 :/
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

BigMc

Quote from: JJS on Sat 22/09/2012 07:28:31
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

Crimson Wizard

#67
Quote from: BigMc on Sat 22/09/2012 10:30:51
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.

BigMc

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.

JJS

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

BigMc

Spots where differences occur should be easy to find by stepping through the saving code while keeping an eye on the file pointer.

Crimson Wizard

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

kati

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.

BigMc

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

kati

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 :)

Tartalo

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 :)

BigMc

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

Tartalo

Quote from: BigMc on Thu 27/12/2012 15:15:16Allegro 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
Quote from: BigMc on Thu 27/12/2012 15:15:16That'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!

BigMc

Quote from: Tartalo on Fri 28/12/2012 22:10:28
Quote from: BigMc on Thu 27/12/2012 15:15:16Allegro 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
Quote from: BigMc on Thu 27/12/2012 15:15:16That'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.

Milanium

#79
I am trying to create an RPM for openSUSE. It fails to build

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

SMF spam blocked by CleanTalk