For some reason, after clicking "Run Game", the canvas goes full-screen but nothing else happens, just a grey screen. This is on Chrome browser on Mac with an M1 chip (other itch.io web games seem okay)
I see -- I gave it a minute or two to load and it didn't seem to help. After popping open the developer console I see that it does load some assets over the first few seconds but then it spits out the following error:
```
VM8:1 Uncaught SyntaxError: Unexpected non-whitespace character after JSON at position 1 (line 1 column 2
at JSON.parse (<anonymous>)
at TN (index.js:3400:3313966)
at index.js:3400:3313984
```
When I click on the link to the source code causing the errors, it is minified but appears to have something to do with saving or loading the game state:
```
const _N = ()=>({
heros: [],
effectsVolume: .1,
musicVolume: .1,
zoom: 430,
progress: null
})
, uc = localStorage.getItem("save")
, TN = ()=>uc ? JSON.parse(uc) : _N() // this is the line with the problem
, E0 = TN()
, Nt = ()=>{
localStorage.setItem("save", JSON.stringify(E0))
```
Not sure why this would happen - looks like TN is called and is trying to parse the save state from localStorage, or else it calls _N. My localStorage has no "save" property (I checked and it is null).
I'm not sure if this is game code or engine code and of course there's no obligation on you to fix this, I just thought I'd do some further testing and let you know what I found -- I discovered this game via one of the asset packs you used, which was cool to see btw.
Okay, sorry to spam further, but I am in an investigating mood and did find that the error seems to come from the "save" value being set after the game starts to something like
```
"1{@24}962{@24}55{@24}2{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}0{@24}…" (this repeats indefinitely for several kilobites of data)
and then it tries to load and parse this
My guess is that, if you're using a web-based game engine, this might be a weird bug that only occurs on Mac for some reason.
Wow this is incredible, thanks a lot for helping me debugging this! I tried a fix, tell me if it works :) It might be a security issue with mac not allowing access to localstorage inside an iframe, you can try it there otherwise if you want: https://dungeon-survivors.netlify.app/.
There is actually no game engine, just a few libraries tied together with a scuffed handmade framework ;) the link is in the description if you're curious about it.
Thanks again for your help, this is seriously awesome of you.