HTML5 save/load does not work on some websites

FMStudioGameDev

  • *
  • Posts: 209
Hi there,
I found out that the regular saving/loading do not work on some websites, for example Kongregate and Newgrounds.
This is a weird issue that seems to involve any HTML5 Stencyl game on those sites.
Example: A game uploaded on my website saves and loads without any issue but the same exported game uploaded to Kongregate/Newgrounds (or even iframed from my site) do not save/load.
Don't know if is loading or saving what fails (or both) because I couldn't debug since print to console doesn't work either in HTML5.
I guess it must be something related to some security settings but other games made with other tools work correctly on those sites.
Anybody has any idea how to fix this?

Justin

  • *
  • Posts: 4312
Not sure about the saving issue, but to view your debug output in HTML5, you need to either use the game controller's log pane (with Run > View logs through game controller checked) or you need to open your web browsers development console to view log output when you play the game.

For Live Support: Join our discord server and ping me @justin.
I'm most often available between 8am and midnight Japan time. (GMT+9)

FMStudioGameDev

  • *
  • Posts: 209
Not sure about the saving issue, but to view your debug output in HTML5, you need to either use the game controller's log pane (with Run > View logs through game controller checked) or you need to open your web browsers development console to view log output when you play the game.
Well I used Chrome developer console but nothing is printed, neither once the game has been exported and uploaded nor when testing from Stencyl

colburt187

  • *
  • Posts: 2391
Ive also noticed this, the save often lasts for a day or so but when i return after a week the save is gone.

Justin

  • *
  • Posts: 4312
You shouldn't see anything in the developer console when the game is exported, but you should when testing from Stencyl, unless "view logs in game controller" is selected, in which case you'd find them within the Game Controller's log pane.

For Live Support: Join our discord server and ping me @justin.
I'm most often available between 8am and midnight Japan time. (GMT+9)

FMStudioGameDev

  • *
  • Posts: 209
You shouldn't see anything in the developer console when the game is exported, but you should when testing from Stencyl, unless "view logs in game controller" is selected, in which case you'd find them within the Game Controller's log pane.
So it's impossible to debug this save/load issue because it only occurs when the game is uploaded on some websites.

Justin

  • *
  • Posts: 4312
Export is intended for publishing a final build, including disabling logging, disabling the runtime connection with the toolset, minimizing the code, and getting rid of the source map that allows you to view Haxe code in the developer tools. You could just do a normal test of the game and then copy the game as-is from [stencylworks]/games-generated/[gamename]/Export/html5/bin to the website, but be aware that all of the debug stuff will remain included. If there's a way to upload it where only you have access to it, that would be better than letting everybody play the "debug" version of the game.

For Live Support: Join our discord server and ping me @justin.
I'm most often available between 8am and midnight Japan time. (GMT+9)