At 1/1/19 03:57 PM, GeoKureli wrote:
I've uploaded the exact same html project .zip to both Newgrounds and Itch.io. On Itch, changes to the level are saved when you refresh the page, however this doesn't work on Newgrounds. Have you guys noticed any issues with this on html projects? have you noticed games not saving when they say they do.
//www.newgrounds.com/portal/view/723552
Edit: above portal link says ~4 stars, when it's only 3 stars
@tom can you see any reason that the issue would be on NG's end?
One thing we do a little different than sites like itch.io is that we host games in a sandboxed iframe. The iframe itself bocks access to the container page, and all games are hosted on a separate domain to ensure people can't scrape private information like user cookies or anything like that.
This security seems to be the root of the issue with your game. If you load it directly at http://uploads.ungrounded.net/alternate/1288000/1288914_alternate_70507_r4.zip/ the levels save just fine.
I took a look at your source files to see where you may be having problems and noticed whatever haxe framework you are using isn't using the html5 localStorage API at all. There's a FileSaver.js class that's trying to autodetect the "_global" scope, and I think that is where things are failing.
Unfortunately, there's nothing we can do on our end to just make your game work. You might get better support contacting whoever manages the framework you are using. They simply may have never tested exporting on a setup like ours (lots of devs test on a server they control, and if it works they they just assume it works everywhere).
If you can figure out how to replace their save method with the localStorage API, that should work better for you. I've used that myself in Pixel Day Dash and it works great.