Updating Project - doesn't work...? -FIXED-

Discussion and feedback on Construct 2

Post » Mon May 25, 2015 10:33 pm

Hello, based on what I read here, I've created a layout with the following events and set it as the first layout:

1) Browser | Is downloading update ----> Set text to "Please wait, updating... " & loadingprogress * 100

2) Browser | On update ready -----> Set text to "Please, reload the page..."

3) Browser | Is NOT downloading update -----> System | Go to Layout 2

I am constantly changing and uploading the project to my ftp (this is part of the creation progress / getting feedback from my clients), but the whole update system doesn't work. After a change has been made and I upload the project to the ftp, the same version as before is running after I hit reload. If I wait a bit and hit reload again, the new version runs but none of the previous events is shown, the second layout runs instantly without displaying any loadingprogress messages....

Am I doing something wrong here...?

Thanks in advance for any help!

-Fixed- Ashley's explanation:

Ashley wrote: ...this event:
eli0s wrote:3) Browser | Is NOT downloading update -----> System | Go to Layout 2

...likely switches layout before the browser has found out there's an update, and then the "is downloading update" condition becomes true while on Layout 2, which I'm guessing you're ignoring.


And here is a crude demo I made (right click and choose Save Link As) that updates correctly... ;)
Last edited by eli0s on Wed May 27, 2015 7:06 pm, edited 2 times in total.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Tue May 26, 2015 6:56 am

have you tried clearing the cache of the browser?
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Tue May 26, 2015 9:11 am

Hi @TheDom , thanks for answering. What I am trying to achieve is a way to inform the user: when a newer version is uploaded, how much it has being updated and when to reload the page in order to see the changes.

I thought that the whole purpose of the tutorial on the link above is to build an update system that takes away the hustle of clearing the cache from the user.

In fact, I absolutely can't have the users digging into browser settings and searching for cache every time I make a change, this is a nightmare to give instructions on how to do in all browsers and I want the procedure to be as automated and streamlined as it can be...

My question is why the system that I am showing on my post above doesn't work, what I am doing wrong...?
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Tue May 26, 2015 5:01 pm

I know it's not a solution to your problem, but Ctrl-F5 is a quick way to clear your cache upon refresh until you get the updating working.
As a web developer, I feel your pain with things not updating for users after a change. :P
Be sure to check out my Metroidvania game, A Hole in the Earth
B
59
S
24
G
3
Posts: 359
Reputation: 5,683

Post » Tue May 26, 2015 8:19 pm

@ryanrybot , I didn't knew that, thanks for the tip! Is this a standard function in all browsers?

Up until know I didn't mind about this, because every project I did was for personal reasons and I was sending the published links only when it was 100% finished.
But now, this is happening in a very iterative manner, I make some things, I upload, I get the feedback and so on... It's a nightmare not knowing if the version you are seeing is the one you are suppose to!

Have you made an auto update system of some sort? How do you handle updates with your users..?

Thanks again for the tips! ;)
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Tue May 26, 2015 9:42 pm

Yep, Ctrl-F5 works on every browser. ...or at least all the ones I've tried. :P
What I do when uploading a new build for testing might not be the most user-friendly way, but it works. I upload my game to a new link, usually by posting the game in a folder with the date as a name.
For example, http://yoururl.com/randomgame/5-26-15/index.html, and then next time I upload I use a different date.
Then I would update the link on the forums, or you could send the new link to the user. The problem is you can't save it as a bookmark, which would be the easiest for a client.
Be sure to check out my Metroidvania game, A Hole in the Earth
B
59
S
24
G
3
Posts: 359
Reputation: 5,683

Post » Tue May 26, 2015 11:20 pm

@ryanrybot , I see. This is surely functional. I might just take this approach for now. It's just weird that the intended (?) update method doesn't work. I wish it did, or even that I am doing something stupidly wrong in my events...

Anyway thanks for helping!
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Wed May 27, 2015 12:56 am

You can go into the index.html file and delete the <html manifest="offline.appcache"> tags.

This will force the browser to re-load the game from scratch every play.

This is only good however if your game isn't image heavy, as it will chew up a lot of bandwidth as the images are re-downloaded.

Cheers,
Tom
B
10
S
2
G
1
Posts: 92
Reputation: 926

Post » Wed May 27, 2015 3:54 am

@eli0s, I'm going to take a crack at it myself later this week. I'll let you know how I make out.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Wed May 27, 2015 6:29 am

ive had this too, and did a quickfix by deleting link to appcache, i wonder now if changing the version in projectsetting may trigger a fresh download , but is actually pretty important @ashley too know best way
ImageImage
B
71
S
22
G
7
Posts: 827
Reputation: 10,177

Next

Return to Construct 2 General

Who is online

Users browsing this forum: illugion, vino7733 and 10 guests