Which is better? Save & Load OR offline cache?

0 favourites
  • 5 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • I just wanted to know which is better way to implement offline games? Use System Save and Load feature OR use Offline cache? Technically I know the difference between them, but to the layman, what is the difference between them and in what case is one or the other is preferred?

    thanks,

    Ravindra

  • Offline Chache is used to store your game assets, logic, files, music and all of that.

    The C2 System Save and Load feature job is to save data state. ie position of objects, variables and such. Save/Load state doesn't deal with assets.

    Since neither overlaps the other domain (ie banana milk shake or steak dinner) neither can really be compared to use one over the other.

    I think maybe you want to consider WebStorage instead of offline cache.

    Now if that's what we are talking about. I'll give you my opinion. WebStorage. Using Load/Save is great for game states similar to Emulator save states. hwoever Savestates use a lot more storage space. WebStorage however requires only a little overhead and is likely only uses 1/100th the storage size.

    I tried using Save/Load once. I cut out most of the level objects and just had a handful to save. Player mostly and the level progress.

    The Load/save stored at about 300kb

    Where as my custom used about 300bytes

    To me. Use Load/Save for mobile devices. When the player leaves the app then Save the State. If the player comes back to the App load the state.... not that I think our Apps can no when they are being shut down

  • Thanks Your response provides good clarity. I have not been able to get around with offline cache issue that I have been facing for quite some time...The issue is something like this -

    There is a Menu page ( lets say menu.html) from which I have links to two of the C2 games ( simple click the URL to open the game).

    Now lets say I come out of the first game back to Menu page and open the second game and play the second game and then go offline. Now in offline mode, if I again click on the first game, it would not open up from the cache...(I have implemented offline cache for both the games individually.)

    Do you have any idea / solution to get around this? I was thinking if I Save and Load the game when clicked or going back to Menu page might help. But given your response, it doesn't store any assets...so probably Save/Load game might not work either...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well even with an offline cache C2 while it has an online connection will attempt to check for updates. Save/Load won't help your problem.

    I wish I could offer more advice. But I'm not entirly sure how it's possible to play the game offline. As I understand due to security reasons the basic index.html file has to served from a webserver.

    The only possible way for offline mode to actually play offline is for Home Apps on mobile devices. These can somehow run while not connected to the internet.

    But for all desktop browsers C2 requires to be served from a webserver. The offline cache only allows for the game to start quicker on consequtive plays because the resources are downloaded.

  • OK. To clarify my understanding, are you saying even when we enable offline cache for a C2 game, the index.html should be loaded from the webserver? I don't think so, because when I load a C2 game directly which is offline cached, then it plays even when the internet connection is off.

    The issue I get is inside an App - when I have a menu page (I have custom built this menu page outside of C2) that has links to two C2 games which are individually appcached...In offline mode, when I exit out of second game to the Menu page and get into the first one that was previously loaded...I am not sure what is it that I need to enable to make this work...

    anyway thanks for your help so far...

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