Player icon indicating copy to clipboard operation
Player copied to clipboard

Support standalone game mode

Open fdelapena opened this issue 8 years ago • 5 comments

This is a well known feature nice to have: several users ask to support an "easy" way to provide their game with bundled interpreter in their own .apk but the current port implementation does not seem to support launching games directly without displaying a game list, yet allowing to set up basic game specific configuration.

  • [ ] Boot from APK
  • [ ] Boot from OBB

fdelapena avatar Aug 14 '16 19:08 fdelapena

I coded standalone game mode one year ago, you just have to drag and drop your project in asset folder. The Player directly start with the game. But you don't have access to configuration.

BlisterB avatar Aug 16 '16 08:08 BlisterB

The current standalone mode is stupid because the game is extracted. For real standalone we must change the native code to support direct access to data in zip/apk without extract.

Ghabry avatar Aug 16 '16 11:08 Ghabry

Thanks to #1085 support for this went to the nearer future.

A problem we have here is that the Android gamebrowser does not use the easyrpg "library". This one is only used by the PlayerActivity that is invoked after a game was selected. What we could do is to load the Player library already in the GameBrowser and then directly work with "FileFinder" from JNI for all file operations. That should be safe because FileFinder doesn't depend on anything initialized by the Player.

But we use one trick in the GameBrowser which is probably a problem for zip archives ( @ChristianBreitwieser ): Many games have the gamedata as [GameName]/start.exe and [GameName]/data/RPG_RT.ldb. To work around this very common user error (RPG_RT.ldb & co. are one level too deep) we do a recursive scan (up to 2 levels deep). This reduced frustration of users alot 👍 .

For ZIP archives we would need a similiar functionality because games are distributed in the way described above. Do you have an idea how to solve this for zip archives? I mean when the game "game.zip" contains the gamedata in "/data/" then there must be a way to pass a project_path of e.g. "/mnt/sdcard/rpg/game.zip/data" 💃 . Could be even more "fun" by putting more than one game in a zip ;).

Ghabry avatar Feb 03 '17 00:02 Ghabry

assigned this to myself (wow, already 5 years since this issue). I consider this fixed when standalone mode support "boot from APK" (game inside the APK, 100 MB size limit) and "boot from OBB" (Game inside additional OBB asset file, 2 GB size limit)

Ghabry avatar Feb 12 '21 12:02 Ghabry

More API fun: The Asset manager is designed in a way that you must know beforehand what kind of file you expect.

It supports reading directories but according to the sourcecode getNextFilename skips directories.

Also there is no way to determine whether a passed path is a directory, you always get a valid handle back.

So the only way to reliable do this is using a single ZIP file m(.

Ghabry avatar Jun 11 '21 15:06 Ghabry

Fixed by #2560

Ghabry avatar Oct 09 '22 21:10 Ghabry