How can I add offline games to play them bundled in an app?

0 favourites
  • 7 posts
From the Asset Store
A set of board games to make your day joyful. Play, Enjoy, Relax
  • Hello!

    I want to add some minigames into an already created android/ios app, so that they can be accesible from a minigame selection screen and played without any internet connection. My idea was to embed them into the generic browser views in both systems and play them locally and offline.

    Problem is that I don't seem to be able to do so.

    • If I export the game to any of the android or iOS publishing modes, it always ends in a separated apk or ipa file, which is not what I want.
    • If I use html5 web export mode, when running the game from the integrated browser, it tells me "Exported games won't work until you upload them. (When running on the file./// protocol, browsers block many features from working for security reasons.). Happens in Android and iOS.

    Anyone has any idea of how to do this?

    Thanks!

  • I think if you export your game to your website, and go to it's url directly, wait a minute or so, then cut your connection and come back to the exact same url in the exact same browser, it just works

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Oh, thank you, but that NEEDS internet connection even though it might be only once. But in my case that is not an option. There might be no network available in the devices where the app is running.

    What I need is the result of that operation, made locally. There has to be a way!

  • I see, I do not know about a way to do this (browsers are actually preventing local web pages from doing things), maybe combined with somekind of virtual server you could do something about that.

  • I see, I do not know about a way to do this (browsers are actually preventing local web pages from doing things), maybe combined with somekind of virtual server you could do something about that.

    I'll look into the virtual server option, will update if I find something. Surely won't be possible in iOS, but there might be a way. Thanks!

  • I'm not sure what you're looking to achieve is possible at all in the current HTML5/C2 restrictions.

    If you want minigames "embed" inside an app, I'm afraid you'll have to redo/reexport the app so that it does contain the minigames, this way everything is inside a single apk file.

    Accessing "local" games is prevented by browsers (the screenshot you displayed) for security and compatibility reasons.

    Apart from an iFrame and possibly internet connection, I'm really not sure it is at all possible to access/provide those files/games.

  • I see. That's just what a friend programmer says (I'm a designer) but hey, I'm willing to try and think outside the box

    I though that, as the WebView in android has it's own cache and cookies apart from any other app and can be injected with Java objects trough the addJavascriptInterface method, doing this whole thing should be possible. I know there are some security risks, but if the browser gets disconnected I don't see the problem. The thing is that I don't know how to generate this "local runnable content pack" of caché and cookies. And in iOS, well... I suppose the approach has to be a diferent one. I´ll take one thing at a time, if necesary.

    But yeah... after all, might be impossible tough XD

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)