About Online and Offline

0 favourites
  • 4 posts
From the Asset Store
Tic Tac Toe is an online multiplayer game with Easy, Hard, and Local and Online multiplayer game modes
  • Hello,

    I try construct 2 from nearly 2 weeks and i'm asking a question that i haven't find any answer in google and in FAQ.

    I know that we can ask to a remote server via Ajax to get datas (like XML and i think JSON). I know that we can "translate" the game for a lot a platform like html5, ios, android, ...

    I would like to keep in local information about levels to let's players play even if there's offline.

    I found about Webstorage and it's about keeping information in local or in session.

    For volume reasons i think i would like to keep few levels.

    When playing offline on android device (for example), online does not updte until :

    -synchronization of offline device connect to online

    -online computer is used to play online

    Can i use Webstorage for this kind of use? or what should i use?

    If i choose local storage (seems to be better for the behaviour i want) when occurs the cache clearing? can i force the cache clearing?

    I got information in the manual scirra.com/manual/120/webstorage

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Finally i reach this article... I do not try for now but it should help me.

    scirra.com/tutorials/526/how-to-make-savegames

  • I would like to keep in local information about levels to let's players play even if there's offline.

    Can i use Webstorage for this kind of use? or what should i use?

    If i choose local storage (seems to be better for the behaviour i want) when occurs the cache clearing? can i force the cache clearing?

    Yes, you can use Webstorage offline, it does not require an Internet connection.

    I'm not sure about how to force the cache to clear using C2. Though, what is your ultimate goal and reasoning for clearing the cache? Just in case you have newer data online?

    When you create/publish new updates, then you should be incrementing your C2 version number (found in project properties). I believe browsers use this information in the offline.appcache file to determine whether or not it should try to download new assets. It's been awhile since I've last used it, so I forget the exact details.

  • Yes, exactly.

    People could play online and offline. Each x levels it will be mandatory to connect (cause i don t want user's download all levels in one time)

    When they up x levels they will download the x next level. To be able to play offline and update online when they finish thoses levels

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