default.pak causing problems

designpeg

  • *
  • Posts: 731
Hi, up until recently I belive when you exproted for HTML stencyl would generate a zip file with an assets folder with all your images etc in it. Now it seems all the assets are compressed into a .pak file. This seems to be causing my client problems, my game runs fine on my server, and on local host, but the clients server gives a "content-deploy/3275//lib/default.pak?851639:1 Failed to load resource: the server responded with a status of 404 ()" response.

Anyone have any advice?

designpeg

  • *
  • Posts: 731
I want to compile for html without embeding my games assets in a pak file, I've got the impression this is possible by using the
embed="false" flag in the openfl setting in game settings/advanced, but I don't know the syntax. Can anyone help?

Justin

  • *
  • Posts: 4645
The .pak file is preferable over individual assets because it results in fewer web requests, allowing the assets to be loaded faster. The savings are especially apparent for people with slower connections. If you can work with the client to figure out what the problem is with loading the .pak file, that would be preferred.

Undoing the .pak output on your side will require a bit more work than putting a line in the openfl settings, and is only something that's possible for subscribers.

Copy the file at [stencyl install]/sw.jar/res/templates/project.xml to [stencyl workspace]/templates/project.xml.
(sw.jar can be opened as a zip file, and the templates folder will need to be created in your workspace.)
Then, in the copied file, near the bottom, find the line <library name="default" type="pak" if="publishing" /> and delete it.

We may offer options for determining how assets are packed (or not packed) in the future, but for now you'll need to make do with this workaround.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

designpeg

  • *
  • Posts: 731
Thanks Justin, I'll try this. My client's server seems to have problems with the pak file, I'm hoping their engineer can sort it out on their side, but in the meantime uploading separate assets will hopefull solve the issue. Thanks!

designpeg

  • *
  • Posts: 731
Hi Justin, I'm still having a problem with the .pak file - when I look at the network requests I can see that an extra slash is added to the request in between the game's folder and the lib folder.

http://clientsserver.com/myGameFolder//lib/default.pak?247716

It doesn't seem to cause any issues on my server,  but on my clients server seem to be stricter and  the double slash causes a 404 error for the pak file

designpeg

  • *
  • Posts: 731
Hi Justin, I'm still having a problem with the .pak file - when I look at the network requests I can see that an extra slash is added to the request in between the game's folder and the lib folder.

http://clientsserver.com/myGameFolder//lib/default.pak?247716

It doesn't seem to cause any issues on my server,  but on my clients server seem to be stricter and  the double slash causes a 404 error for the pak file.

In the instructions above, the line <library name="default" type="pak" if="publishing" /> actually reads <library name="default" type="gzip" if="publishing" /> in my jar. Could that be the cause of the problem?

Justin

  • *
  • Posts: 4645
Oh, sorry, I saw your other thread and I made the fix, but I've been a little busy and forgot to upload it and let you know.

I've pushed it just now. You can try b10450.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

designpeg

  • *
  • Posts: 731
Cool, thanks Justin. I took your earlier advice on how to build without the pak by changing the project.xml and that solved my problems with my client being able to play the game. I'll try b10450.

Thanks again!