Cross-platform support

Started by Radiant, Sun 30/09/2012 10:31:43

Previous topic - Next topic

Radiant

Can someone please enlighten me how the latest AGS build does in cross-platform support? Can the games it makes run on Linux, on a Mac, or on a smartphone platform, without requiring extensive tweaks and complicated setups by the end user?

Crimson Wizard

#1
Do you mean latest official release, or JJS's ports?

I really hoped JJS or BigMC will answer this, but perhaps they did not notice this thread yet (they usually lurk "Engine Development" subforum, I guess).
I think you may get some information on compilation and installation either from corresponding threads (AGS engine Android port, AGS engine Linux port, etc), or from readme in the Git repository:
https://github.com/adventuregamestudio/ags/blob/main/README.md


I think I must provide basic elaboration on the part "Can the games it makes run on...".
When AGS Editor compiles a game, it basically attaches game data at the end of acwin.exe (which lies in editor folder).
The AGS Engine may run ANY game by using the DATA from a file, whether that is a separate data file or an executable with data appended.
This literally means you may take a Windows executable of AGS game, put it on Linux, put an AGS engine built for Linux there and tell engine read the data from the windows executable and run game. This is done via command line in a form of:
Code: batch

acwin FILENAME

(where acwin is AGS engine)
for example:
Code: batch

acwin Resonance.exe

This will run ACWIN executable (which may be recently built engine version), which will read all data from Resonance.exe and run it on its own.

Radiant

Quote from: Crimson Wizard on Mon 01/10/2012 13:06:28
Do you mean latest official release, or JJS's ports?
Either would be fine. I simply want to distribute my games so that they run on a multitude of systems (preferably from the same ZIP archive). I've stuck with v2.7 for a long time because the v3 branch didn't support Linux properly, but what I'm seeing in the linked thread is that it does now (or at least, an executable exists that runs AGS3.x games on Linux), am I correct?

And what about Apple computers?

BigMc

#3
It works on all platforms that are listed in the README.md Crimson Wizard linked to.

Please create a new thread "AGS engine Mac OS X port" in the engine forum if you want to ask how to compile it.

JJS

#4
We could probably do with an OSX thread, but let me say this here: OSX is only supported up to Snow Leopard (10.6). Lion and Mountain Lion are missing frameworks necessary for Allegro 4.

I will also add libraries for Intel and PPC OSX to the respository so that building AGS is easier. Right now it is kind of a pain because you have to get the library dependencies from fink/macports and I think you have to compile Allegro yourself.

E: If you want to develop a game for cross-platform use you don't have to do anything special. As Crimson Wizard said, the ports just run with the Windows data files. For mobile platforms you might want to avoid high resolutions and dependency on a keyboard. Also only use plugins that are open source and available on all platforms (flashlight, snowrain, AGSBlend and Lua are fine).
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Crimson Wizard

I actually wonder will that work if you substitute the acwin.exe in AGS editor's folder with e.g. linux executable. Will the editor succeed in attaching data to it? And will the resulting executable run?
I guess it is easy to try out. If that may work, we may actually add extended compilation options to editor, like "compile for linux" etc, which make it select different executable corresponding to target platform.
You won't be able to debug that from editor, ofcourse. You will have to run Windows version for debugging anyway.

JJS

#6
Just tried that with the Linux build. It kinda works in the way that you can let the editor attach the game files (by replacing acwin.exe) but the game cannot find the data automatically. You still have to give the attached file as parameter but then it works. This could easily be changed in the engine though.

The attaching works because the data file has a file header at the end of it that indicates its length. So it can always find the real header regardless of where it is attached (IIRC).

E: Not sure how useful this is though. Especially Linux is tricky because of the different flavours that all have different library versions. So it could only be done by statically linking everything. The better idea is building packages for major distributions if you want to release (commercial) Linux games.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Crimson Wizard

#7
Quote from: JJS on Mon 01/10/2012 18:56:21
The attaching works because the data file has a file header at the end of it that indicates its length. So it can always find the real header regardless of where it is attached (IIRC).
Small correction: engine first checks the data signature at the beginning of the file. If there's none, it checks the end, assuming it might be executable with data attached.

Quote from: JJS on Mon 01/10/2012 18:56:21
E: Not sure how useful this is though. Especially Linux is tricky because of the different flavours that all have different library versions.
Yes, right. I keep forgetting about that.

Perhaps there's a sense in just building game data separately without windows exe?

Radiant

I'm okay with distributing a windows exe to Linux people and just include a shellscript that runs it, or something like that. The important part is that it works.

JJS

Quote from: Crimson Wizard on Mon 01/10/2012 19:00:52Perhaps there's a sense in just building game data separately without windows exe?
Yes please! Also compiling to a single file: http://www.adventuregamestudio.co.uk/forums/index.php?issue=319.0
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Vince Twelve

Is one of the goals for future engine development to support targeted builds for the different platforms?  Building a native OSX and Linux application from within the editor would be ideal, especially for commercial titles.  As cool as the current solutions are, 90% of players won't jump through those hoops.  Hell, the current winsetup.exe is even too hard for significant amount of Windows players.   :P

BigMc

With the current solutions the players don't need to jump through any hoops - if the game developers do it for them and bundle their games with the different engine ports.

Radiant

Quote from: BigMc on Wed 03/10/2012 17:10:32
With the current solutions the players don't need to jump through any hoops - if the game developers do it for them and bundle their games with the different engine ports.

That sounds good. Is there a built-and-ready AGS runtime engine for Linux available, or do I have to install Linux and build my own? I'm not very knowledgeable about distros; would e.g. a Debian engine still run under e.g. Red Hat?

SMF spam blocked by CleanTalk