elm-flatris icon indicating copy to clipboard operation
elm-flatris copied to clipboard

Bug when play with Safari on Mac OS X

Open phlo46 opened this issue 8 years ago • 6 comments

After I close the Macbook's lid and reopen it, the game is frozen.

Refresh the browser doesn't work. The only thing I can do is click the button "Pause" and "Resume" again and again.

You should add a "New Game" button or something like that. Right now, I can't play with Safari !!

phlo46 avatar Jan 05 '17 08:01 phlo46

@lnguyen46 could be related to the time between animation frames. I guess if something like this happened, you have to erase local storage in order to continue the game.

Can you also copy the broken state from local storage and paste it here?

w0rm avatar Jan 05 '17 08:01 w0rm

active: [{pos: [2, 0], val: [237, 101, 47]},
{pos: [0, 1], val: [237, 101, 47]},
{pos: [1, 1], val: [237, 101, 47]},
{pos: [2, 1], val: [237, 101, 47]}] (4)

grid: [{pos: [1, 19], val: [237, 101, 47]},
{pos: [1, 18], val: [237, 101, 47]},
{pos: [6, 19], val: [232, 65, 56]},
{pos: [5, 19], val: [232, 65, 56]},
{pos: [5, 18], val: [232, 65, 56]},
{pos: [4, 18], val: [232, 65, 56]},
{pos: [0, 19], val: [60, 199, 214]},
{pos: [0, 18], val: [60, 199, 214]},
{pos: [3, 19], val: [57, 147, 208]},
{pos: [4, 19], val: [57, 147, 208]}] (10)

lines: 151

next: [{pos: [0, 0], val: [251, 180, 20]},
{pos: [1, 0], val: [251, 180, 20]},
{pos: [0, 1], val: [251, 180, 20]},
{pos: [1, 1], val: [251, 180, 20]}] (4)

positionX: 0

positionY: -6859.722189797607

score: 147644

state: "playing"

phlo46 avatar Jan 05 '17 14:01 phlo46

@lnguyen46 so it fell below the screen bounds positionY: -6859.722189797607 and kept falling down

w0rm avatar Jan 05 '17 14:01 w0rm

Following @w0rm advice, I have to clear localStorage to play again.

phlo46 avatar Jan 06 '17 04:01 phlo46

It would be nice if you can fix this bug though. I don't want to clear localStorage everytime I reopen my laptop's lid.

phlo46 avatar Jan 06 '17 05:01 phlo46

@lnguyen46 sure, this must be fixed.

w0rm avatar Jan 06 '17 08:01 w0rm