Browser game doesn't update

Bugs will be moved here once resolved.

Post » Sun Jan 01, 2012 4:33 am

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?dcrew2012-01-01 04:33:50
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Sun Jan 01, 2012 5:16 am

I have found an alternate way. but I still don't get why that should happen.
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Sun Jan 01, 2012 5:20 am

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.
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Sun Jan 01, 2012 5:31 am

Nevermind, found the problem.
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Sun Jan 01, 2012 1:00 pm

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
Scirra Founder
B
359
S
214
G
72
Posts: 22,948
Reputation: 178,532

Post » Sun Jan 01, 2012 5:49 pm

[QUOTE=Ashley] 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[/QUOTE]

(Trying my best to be formal )

You see Ashley...

this..

[quote]If 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.[/quote]

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!
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Sun Jan 01, 2012 6:00 pm

[quote]Updating 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.[/quote]

This I didn't read, might check it out.dcrew2012-01-01 18:00:36
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Sun Jan 01, 2012 7:01 pm

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:

[quote]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]
Scirra Founder
B
359
S
214
G
72
Posts: 22,948
Reputation: 178,532

Post » Sun Jan 01, 2012 7:26 pm

[QUOTE=Ashley] 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:

[quote]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][/QUOTE]

Lol I thought that file was for debugging I didn't even upload it, stupid me!
B
17
S
4
G
5
Posts: 226
Reputation: 4,042


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests