Browser game doesn't update

0 favourites
  • 9 posts
From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • I've tried Ctrl+F5 (which is supposed to clear all cookies/cache of that page)

    I've tried closing the browser and re-opening it.

    One time I literally had to go-to chrome options and delete the week's browsing cookies and cache just for the game to update.

    And yes I have the latest chrome.

    Any suggestions?

  • I have found an alternate way. but I still don't get why that should happen.

  • Actually, the problem still remains! As I have changed existing sprites in the game but they haven't updated on the browser upload. it's as-if it's loading previous caches.... which is extremely annoying, and makes it hard for me to update my game.

  • Nevermind, found the problem.

  • What was the problem? It's good to write it down so anyone searching for a similar problem and finding this thread can find the solution as well.

    FYI I think how the updating works is described in Offline games in Construct 2

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What was the problem? It's good to write it down so anyone searching for a similar problem and finding this thread can find the solution as well.

    FYI I think how the updating works is described in Offline games in Construct 2

    (Trying my best to be formal <img src="smileys/smiley4.gif" border="0" align="middle">)

    You see Ashley...

    this..

    f everything is set up right, the browser will save your entire game to disk after loading it for the first time. After that, if you load the game again, it loads from disk. Nothing is downloaded at all! Usually that means the game loads instantly as well. This means even if you're offline, you can still load the game and play.

    Is a big problem, Because now when I update my game I can't just replace the c2runtime.js I have to name the other new one to c2runtime-0.1.75.js or whatever the version is, and then update my play.php page, Now even though that's no problem.. storing the c2runtime.js to load every time can be a really bad thing.

    1) It will waste server bandwidth

    2) It makes it annoying to update a game

    3) Some people may have trouble like I did, And for people who don't know the answer, well... Goodluck!

    This is fine, but the cache should delete itself if the browser get's closed and re-opened, or if you press Ctrl+F5 too!

  • pdating your game

    You might wonder: if the game is always loaded from disk, how do you update your game?

    If you're online and you load the game, the browser loads from disk instantly as before. However, as the game is running, it checks for an update in the background. If you've uploaded a new version, the browser downloads it and saves it to disk. Then, next time you load the game (this includes refreshing the page), the browser loads the new version. Until then, the user keeps playing the old version.

    The Browser object has two conditions to detect this happening: Is downloading update and On update ready. Is downloading update is true if the browser is downloading a new version in the background. On update ready triggers when the download has finished, and the new version is ready to be loaded. If this triggers on the game's title screen, you might want to prompt the user to reload the page (using the Browser's 'reload' action) so they're playing the latest and greatest version. However, you probably don't want to interrupt them mid-game!

    This allows you to easily make a simple auto-updater for your game. You could show a text object saying "Downloading an update..." to notify the user an update is being downloaded. When On update ready triggers, you might want to show a message saying an update is ready, and display button which reloads the page when clicked.

    This I didn't read, might check it out.

  • Oh, I think you must have been caught out by this point: unless the offline.appcache changes, the browser won't check for an update. So you have to re-upload offline.appcache every time you update your game. To clarify this I edited the offline article with this section towards the end:

    b]Remember to re-upload the offline.appcache file

    If you're updating even just one file of your game, you must also re-upload the exported offline.appcache file - every time! Otherwise the browser will assume nothing has changed and won't bother downloading the update. (The offline.appcache file must have changed for the browser to check for an update, and Construct 2 adds a timestamp to the top of the offline.appcache file to ensure it always changes.)

  • Oh, I think you must have been caught out by this point: unless the offline.appcache changes, the browser won't check for an update. So you have to re-upload offline.appcache every time you update your game. To clarify this I edited the offline article with this section towards the end:

    b]Remember to re-upload the offline.appcache file

    > If you're updating even just one file of your game, you must also re-upload the exported offline.appcache file - every time! Otherwise the browser will assume nothing has changed and won't bother downloading the update. (The offline.appcache file must have changed for the browser to check for an update, and Construct 2 adds a timestamp to the top of the offline.appcache file to ensure it always changes.)/QUOTE]

    Lol I thought that file was for debugging <img src="smileys/smiley17.gif" border="0" align="middle" /> I didn't even upload it, stupid me! <img src="smileys/smiley9.gif" border="0" align="middle" /> <img src="smileys/smiley32.gif" border="0" align="middle" />

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