Game checks for updates? (version detection)

Get help using Construct 2

Post » Sun Apr 13, 2014 7:06 am

Is there any way to notify the play in-game if there is an updated version of the game? It should be hidden if they already have the latest version.
B
60
S
19
G
3
Posts: 451
Reputation: 6,364

Post » Sun Apr 13, 2014 7:23 am

Or is there a way to just do auto-update so that the user always has the latest version?
B
60
S
19
G
3
Posts: 451
Reputation: 6,364

Post » Sun Apr 13, 2014 9:23 am

Did you tried the Browser object?
B
23
S
9
G
3
Posts: 114
Reputation: 3,794

Post » Sun Apr 13, 2014 9:43 am

@Herks
Nope, I haven't. Using offline cache or something?
B
60
S
19
G
3
Posts: 451
Reputation: 6,364

Post » Sun Apr 13, 2014 9:52 am

You talking for desktop game? Because html5 will auto update to what ever is on server.

Desktop you will need to retrieve latest version on startup from external source using ajax. (e.g database)
Compare fetched data with current version and pop up message saying update with link or something like that.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Sun Apr 13, 2014 9:53 am

Yeah, the browser will download the whole list of files automatically when its offline cache is different with the latest one. Here's an example that shows its usage.
You do not have the required permissions to view the files attached to this post.
B
23
S
9
G
3
Posts: 114
Reputation: 3,794

Post » Sun Apr 13, 2014 9:59 am

Nice tut on offline cache and updates etc
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Sun Apr 13, 2014 10:01 am

@herks But no "update found"? My worry is that some users on android dont have auto-update enabled. How will they know there is an update?
B
60
S
19
G
3
Posts: 451
Reputation: 6,364

Post » Sun Apr 13, 2014 10:06 am

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.)
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Sun Apr 13, 2014 3:53 pm

Thanks dutoit!
B
60
S
19
G
3
Posts: 451
Reputation: 6,364


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests