'release folder' is too huge for webgl to work

I’ve been trying to get webgl’s compressed folder to work but failed.

To enable fast testing, I created a simple project with just some primitives in it.

The webgl exports produces an index.html, a .htcaccess, and three folders: Compressed, Release and TemplateData.

I moved every thing except the huge Release folder to Dropbox’s Public folder to run the game remotely - it didn’t work.

If I moved the Release folder over too, it work. The issue is that the release folder is HUGE.

What did I do wrong? How can I get a webgl package that’s almost the same size as the webplayer export?

I don’t think you can run it on Dropbox and use the compressed folder, as u would need a web server for that.

What we did was run a local NGINX server (http://nginx.org/) and used it to “locally host” our game. This cuts on the time needed to upload the game to Dropbox/Amazon S3/any other hosting service.

Note that we do not use .htaccess and so we need to manually copy around some stuff (that is what the .htaccess does automatically by itself).

If that is something you think would be of use and interesting to you, I may put up a blog post on this on my site (how to configure a local web server for testing WebGL builds).

1 Like

hi liortal, thank you for your reply.

I’ve set up a wamp server to test locally. Without the Release folder, my game works correctly. I think wamp is similar to your NGINX server, correct?

Based on what u said, I wonder whether sites like kongregate and newgrounds are able to recognize .htaccess or not.

If they don’t recognize, what can I do in terms of ‘manually copy some stuff’?

Thank you for your advice.

I just confirmed that kongregate and newgrounds are UNABLE to recognize .htaccess. bummer.

It’s not if they recognize .htaccess, maybe they have their own way to gzip the folder

haiz … Unity’s webgl export is just a huge headache. I need a step-by-step guide on how to convert Unity’s webgl export to something acceptable to Kongregate, indieDB and Newgrounds …

I dont have any experience with IndieDB or Kongregate, sorry :frowning: not sure how that works there.

1 Like

no problem … they are the biggest html5 sites out there … need to pray for miracle lol …

hi, liortal, are you able to share how to ‘manually copy some stuff’ so that I can bypass the .htaccess to use only the Compressed folder? That would be worth a try too, I think.

So, you get 2 folders - Release and Compressed.

They contain the same files (with a slight change in file extensions, e.g: .js turns into .jsgz to mark it as “gzip”).
The .htaccess file contains some rules that some web servers understand. For example, it says - “if the web server supports gzip, then instead of serving the files from Release, which are huge, do some kind of redirection and send out the stuff from Compressed”.

Again, i am not 100% sure if what we did would work for you with Kongregate, but what we did was this:

  • Delete the “Release folder”
  • Rename Compressed → Release
  • Remove gz from file extensions in that folder (e.g: .jsgz turns into .js, .memgz → .mem)

Again, not sure that would work for you as i dont know how you upload the files there, what server they use and whether it supports gzip or not.

Thanks
Lior

2 Likes

We not only renamed the names of those files, we also set their headers to send “content-encoding” as “gzip”

1 Like

thanks for your detailed explanation and instruction, lior. I just confirmed that the method doesnt’ work on wamp and the various html5 portals, so another approach would be necessary.

hi panther, mind elaborating on this? like you say ‘their headers’ - the headers of which files? we can’t simply change a gzip file, can we?