Suggestion to Amend Offline Appache Features

0 favourites
  • 9 posts
  • Ashley   

    This is actually the first time I am posting on any issues relating to Construct 2. I apologize if this is not the correct area of the forum for this. First let me say that I think that C2 has been the best thing for me since slice bread. It is an awesome engine!   However, I have a major problem with the offline appcache feature. I am not sure how many people create games that use this feature-Maybe I am ignorant on this topic. But sometimes I waste an entire day trying to clear the history in order to upload an updated version of my game. I have read the many posts about ways to clear the browser to update files etc. I have also noted the suggestions and none of them work 100% of the time. So my question to the developers: Is it really necessary to include this feature in the export? Is it possible to make this an option when exporting?   Otherwise, can you please advise me on the proper way to upload an updated file without having to continuously delete history.

  • It enables offline support for all games by default, which I feel is a useful feature.

    To make sure it updates isn't that complicated. There are two ways:

    Method A:

    1) change the timestamp at the top offline.appcache file. Alternatively just export again, the new offline.appcache file will have a new timestamp. This file needs to change for the browser to notice there's an update.

    2) browse to the game again. Check the browser console (Ctrl+Shift+J in Chrome) and you'll notice it's downloading the update. When it says the update is ready, hit refresh and the update loads.

    Mobile browsers are harder since you can't see when the update is ready. You can use the Browser object to check if an update is downloading or when it's ready and display this in-game.

    Method B:

    Just upload to a different URL or rename the folder it's in. The browser will treat it as entirely new.

  • Thanks for your respond. I have never tried method A 1. So I will do this. Even though, I think the other suggestion is too cumbersome to have to change the name of the folder or url just to upload new files, especially when there is the need to create a permanent link of the game.

  • Ashley

    I have decided to revisit this problem because it is such a big issue for me. While I agree that the offline appache feature is very useful, I find it very difficult and time consuming to have to rename folders or change URLs just to see small changes in frequently updated games that are constantly being uploaded. Isn�t it more convenient to include the offline appache thingy as an option when exporting? I can see me using this feature for my final export when there aren�t any major changes to make. Am I the only person that has this problem? Or maybe it�s because I am working on a multiplayer domino game where I use up to 4 laptops at one time to test 2-4 players. Sometimes I have to erase the history of each of these 4 devices. The problem with the methods you described is that they work some of the times.

  • You shouldn't need to be exporting a lot. Why not just preview from within Construct 2?

  • I have also problems with chrome not updating the game sometimes (even if the offline.appcache has changed), If I really need to, I delete temporarly the offline.appcache, refresh, then add the offline.appcache back.

    I should not do that in order for this to work but I have to, It doesn't happen on other browser for me it seems though.

  • Ashley

    I export my project instead of using the preview via lan because I need to constantly access a database that holds all of the game updates etc. I am also using a login system to authenicate each player. The login is done from a secure page. Once I open the game in CS2 I send an ajax request to check if the user is logged in or not. Not sure if this is the way to go about this. I also do not think that all of this can be done in preview mode right? Can I preview the game over a local network and use Xammp or something? This would definately solve the problem

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Aphrodite

    I also have this issue with mobile devices. But since this work for you, I will try deleting the file temporarily like you do.

  • It should work in preview mode providing you correctly set up CORS.

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