I need advices: is AGS suitable for a cross-platform game?

Started by fratello Manu, Sat 31/10/2020 13:36:00

Previous topic - Next topic

fratello Manu

Hello everyone! glad to see that AGS is alive and its community too. I tried AGS for the first time back in 2005, when I started coding a game, but I never finished it... (wrong)

Now I have a nice idea for a game, which would be an Adventure (once again...) with some RPG elements.
I was about to start coding it in Godot engine, but obviously AGS would be the best choice.
I'm just wondering if it is possible to run AGS games all along the several platforms, so Linux and even Android, in addition to Windows.
I'm a Linux Ubuntu user and before writing this post I looked for answers in forums, etc, but I didn't understand if it is possible to run the Editor and then the games on other systems than Windows.
I remember that years ago I read about an AGS Linux port which still had some problems, then I read about having AGS Editor working with WINE... Could someone please help me?

I was thinking about an interface working both with keyboard or mouse: on PC it will be possible to choose between the two, while on touch screens (e.g. Android) just the "mouse": I'd like to use a touch to simulate the click (e.g. pointing on the background to Move To, and choosing actions from interface).

Thank you in advance and have a good day!

Manu, from Italy

Jack

The engine works great on linux, and the editor can now compile a linux version for you by just enabling a setting, though on some distros like arch I've had reports of the audio not working. The editor doesn't have support for linux, though, only windows.

I've not personally released an AGS game on android, but it is an option. eri0o has released some android games, to my knowledge the android support is solid.

Cassiebsg

I guess it depends of exactly which "several platforms" you mean.

Like Jack said, Android is almost a "out of the box" solution. And I mean almost cause you have to setup some stuff (that I don't know), before you can compile it properly. I do have one game with android version, but it was morganw that compiled it for me. But since you're a Linux user, you might be able to set up those things easily your self.

If you mean IOS or MAC... then it's possible, but will require a lot of effort from your part to set it up. There's a thread on the forum on how to do it. Not out of the box solution.

Consoles, like Xbox, PS or Nintendo... again no out of the box solution. CW made a "port" for PSP, and some have had luck porting to Switch (though this require you to pay for the dev kit to Nintendo, so really worth it if you intend to sell the game).

eri0o had recently made a port to publish AGS games to browser (HTML5). It's not perfect yet, but works and he's still working on it, so good chance it'll end up working good. :)
There are those who believe that life here began out there...

Crimson Wizard

#3
Quote from: Cassiebsg on Sat 31/10/2020 14:04:47CW made a "port" for PSP

I did not, it was Jochen Schleu (JJS on this forum), and it was long abandoned, mostly because PSP was too slow to run all the CPU-based work for this engine, and used outdated system libraries, could be not easy to maintain.

Mac port should be fairly simple afaik, also we've got a nightly builds on a server which make Mac engine that may run any game (not directly attached to particular one).
iOS is currently most manual work, as iirc you must bundle your game with xcode project and configure everything there (and you must do that on Mac).

Regarding Android, there are plans to integrate making your game APK in the Editor to make things simplier. Right now you have to manually create an APK containing game data and AGS binaries for Android (but we provide latter for download).

May also mention that we are currently in process to change background library from old Allegro 4 to contemporary SDL2, which supposedly work (or work better) on modern platforms.

Cassiebsg

There are those who believe that life here began out there...

Crimson Wizard

If you need a proof, here was posted on AGS Discord just now, an AGS game released for iOS, iPad :)
https://apps.apple.com/us/app/lamplight-city-mobile/id1533426901

eri0o

There's also already a SDL2 port in the works on Android, so there's the previous Android port but there's a future unrealeased one.  :-D for now any port will require Android Studio and possibly understanding what an obb file is.

Google Play APKs are limited in size and once they are bigger than this limit it downloads your app in two parts which in this case will be an apk of the Engine runtime and your game as an asset in obb format. On Google Play Console (the place to publish the Android app) you will upload the apk and once it gets an OK it opens up a place for you to upload your obb file. It's sort of a manual patch system but it's really simple to use.

About the AGS Editor on Wine, there's not much to it. I use it with Play On Linux on Ubuntu 20.04 and what I have is a x86 wine prefix with dotnet4 package installed on it. You can install it through the Play on Linux visual interface. You may want to also install dotnet35 package if you plan to use Speech Center plugin.

Ah, for MacOS there is a beautiful guide here on Signing and Notarization (needed for release on MacOS, even if not Apple Store) http://www.edenwaith.com/blog/index.php?p=112

fratello Manu

Hi everyone and thanks for your answers!

I started coding my game, but just to give Linux game version a try, I made just a couple of rooms and compiled the game. And I can't really run it on Linux!
While the Windows version is working properly (I installed windows and then AGS via VirtualBox).

Trying to start the Linux compiled version, I get this error:

Quote$ nux/data/ags64: Permission denied

Does anyone know why? Obviously I checked for the permissions on the folder.

I also tried to install the AGS engine from the Snaps and then run the Windows game version, but I get this message:

QuoteInitializing allegro
Initializing game data
Game data file could not be found. Search path used: '/snap/ags/136/bin'
ERROR: Unable to find game data files. The necessary files are either missing or are of unsupported format.Usage: ags [OPTIONS] [GAMEFILE or DIRECTORY]

Could anyone help me?

Thanks!

Have a nice day everyone
Manu

CrashPL

You need to set proper access permissions to the data folders. AGS doesn't do that by default:

Code: ags
chmod u+x yourMainGameScriptNameHere
chmod u+x "$SCRIPTPATH/ags64" "$SCRIPTPATH/ags32"







eri0o

About the snap, the AGS version of the snap is bit old now (I don't remember which is but I probably wrote there in the store page edit: checked it's on 3.4.3.1), but I will update eventually - snaps changed the way they build along the way and for now I have the changes I need in the development branch but not in the previous releases. When there's a new version of AGS released from the source on the development branch I will update the snap.

I primarily built the snap for myself but I thought adding there would be helpful to other ags devs or maybe someone who wants to release an ags game as snap - the snap code should be reasonably easy to modify for that




Other note for the change in permissions is that the game has to be shipped from the environment that keeps the permission or alternatively it can be compressed in some format that preserves the execution permission. There are threads about this in the forums so I hope someone will link about it.

fratello Manu

Quote from: CrashPL on Sun 15/11/2020 21:02:05
You need to set proper access permissions to the data folders. AGS doesn't do that by default:

Code: ags
chmod u+x yourMainGameScriptNameHere
chmod u+x "$SCRIPTPATH/ags64" "$SCRIPTPATH/ags32"


Hey, thank you!  It really worked!
I already did the "chmod u+x yourMainGameScriptNameHere" command but I was missing the second one! Thanks!

SMF spam blocked by CleanTalk