Important note about uploading HTML5 games

13 posts

Flag Post

We have heard from a few developers about issues with updating HMTL5 games; specifically, developers not seeing the new versions of files after the normal amount of time (about 15 minutes) it takes for the server cache to clear.

Here is a tip to help prevent this problem:

When uploading a zip archive of additional files for your HTML5 game, make sure you are compressing sets of loose files rather than a folder or directory.

When a zipped folder of files is uploaded to our server and unzipped, a subdirectory is created for the folder’s contents, changing the relative paths of those files. For instance, instead of seeing a file at

kongregate.com/gamez/1234/5678/live/example.txt

uploading a new version in a zipped folder named New_Game_File_Folder0001 would give it the filepath

kongregate.com/gamez/1234/5678/live/New_Game_File_Folder0001/example.txt

This can result in game files not appearing to be updated unless the filepaths in the game itself were changed. To avoid having to do this every time a game is updated, and to avoid versioning problems in general, zip archives of loose files so that new versions will replace older ones in the proper locations in your game directory.

 
Flag Post

This solved my problem. Thank you.

I don’t know what they are doing but if I’m testing something on their upload system and then make it live…

it should use the files from the test system.

Wasted a lot of time trying to figure out what is going on.

 
Flag Post

Hello,

is here someone who could explain me this article in german?

And another question: Could it be possible to delete old additional files in future? That would be great.

Greetz from Germany

 
Flag Post

I am having trouble even getting preview to update. I take all my files except the index.html and zip them together. They are scattered on desktop when i select them to be zipped( it wasn’t clear on what “When uploading a zip archive of additional files for your HTML5 game, make sure you are compressing sets of loose files rather than a folder or directory.” meant to me). I then just follow along like i did when uploading the game the first time. Preview game shows the old version and has for days now even after multiple new version attempts. I’ve cleared cache over and over and i’m about to go crazy trying to get this to work. Using Construct 2 and Game name is Wealthy. New version I am trying to get loaded is V1.0.1

 
Flag Post

That’s the same problem I have.

I tried a lot of ways: just saving als zip without compression, with folders, without folders, with same zip-archiv-name, with different names … nothing worked.
The preview has allways the same old additional files I uploaded at the first time.

I would really could update games and build my old ones in HTML5, but that way it does not make me feel happy. :(

 
Flag Post

i really don’t get it… I tried a lot of things and now it seems that the files can’t reach the images. People are complaining but i can’t fix it.

http://www.kongregate.com/games/MuffinMiceStudio/idle-computer

even tried what MePlayItOnline said, without succes

 
Flag Post

I had trouble uploading new versions as well.. fixed it by rearranging my entire additional game files into a map with a structure like this:

-game.html
-src/game.js
-src/audio/audiofile.wav
-src/audio/audiofile.mp3
-src/images/image1.bmp
-src/images/image2.png

now when prompted to supply the files for a new version upload:
-supply the html as main file
-supply a zipped file with the CONTENTS of map src and name it src.zip

 
Flag Post
Originally posted by jclor:

We have heard from a few developers about issues with updating HMTL5 games; specifically, developers not seeing the new versions of files after the normal amount of time (about 15 minutes) it takes for the server cache to clear.

Here is a tip to help prevent this problem:

When uploading a zip archive of additional files for your HTML5 game, make sure you are compressing sets of loose files rather than a folder or directory.

When a zipped folder of files is uploaded to our server and unzipped, a subdirectory is created for the folder’s contents, changing the relative paths of those files. For instance, instead of seeing a file at

kongregate.com/gamez/1234/5678/live/example.txt

uploading a new version in a zipped folder named New_Game_File_Folder0001 would give it the filepath

kongregate.com/gamez/1234/5678/live/New_Game_File_Folder0001/example.txt

This can result in game files not appearing to be updated unless the filepaths in the game itself were changed. To avoid having to do this every time a game is updated, and to avoid versioning problems in general, zip archives of loose files so that new versions will replace older ones in the proper locations in your game directory.

This does not seem to work. My zip file was called content.zip. I originally had my javascript files in a “script” folder and they were not updating. Then I moved the script files to be directly in the content.zip and they are still not updating.

 
Flag Post

ceptri: Subdirectories are okay, as long as those folders are loose within your game files. Your game files seem to be in the right place. When did you last try uploading?

 
Flag Post

I’ve got the same problem.
So if I understand, I’ve got 2 ways to update my HTML5 games :
- change the path for each version
- keep the same path (with loose files, or with zyplogames folder organisation) and wait 15mn to test the new version.

In both case, it’s not easy to figure it out by ourself…
Will this be improved?

 
Flag Post

This is what I’m doing.
I have the main project folder where the html file is, all files are loaded relative to this location.
I ctrl+a and select everything, I deselect the html and add to a zip archive.

After uploading I try to play, no update (which is odd seeing that I set my game engine to specifically deny caching of files for the development run, perhaps kongregate overrides this or chrome ignores it (works fine on my test server though so I find it unlikely chrome ignores it), after 30 minutes there’s still no update. 2 hrs, still no update, 12 hours no update, 24 no update, 48 hours later and the files are finally being used.
Quite annoying as by then I will have made new iterations that I can’t upload because I need to make sure my changes work on kong and not only my local test server.

 
Flag Post

Agree – this is pretty rough. Even a simple ftp interface would be a massive improvement here.

 
Flag Post

I had the same problem with my new game Plexr ( http://www.kongregate.com/games/kitoba/plexr-2-0 ) —I imagine it’s probably caused by some server setting that is doing some additional caching of “static” assets, i.e. js and css.

Here’s what worked for me: The index.html page seems to update immediately. The only files I was changing were my main js and css files, so I renamed those with timestamps, and edited the index file to point to the current versions.

After that, I started seeing my changes immediately.