StageXL icon indicating copy to clipboard operation
StageXL copied to clipboard

Android - freezing game.

Open avstudios opened this issue 10 years ago • 4 comments

Hi Bernhard,

I've done 2 new games. They similar to another four that I created few mouths ago. The main difference is I'm not using "Toolkit for Dart" lib any more. The old games still work fine on all devices. I have a problem with the new games on Android devices. Currently testing them on Samsung Galaxy 2 tablet and Galaxy Nexus phone (Chrome or Firefox). I'm able to start and play the games. But if I refresh them few times some graphic elements are not showing up and after next refresh I can see white page and the browser freezes. Same issue if I go only to welcome screen.

I've spent quite a lot of time to sort it out but I feel I'm not even closer to find where is the problem.
Maybe you had similar issue. I would be grateful for any suggestion or help.

Marcin

avstudios avatar Jul 16 '14 14:07 avstudios

Hi Marcin,

Sorry to hear about your problem. Unfortunately i havn't heard of a similar problem before, so i don't have a good answer for you. It's very difficult to guess what the problem is. It's very strange that the same problems happens with Firefox and Chrome! Do you see anything on the console window? Maybe you can add some loggings to get more insight.

Let me know if i can do anything to make the problem go away.

Bernhard

bp74 avatar Jul 16 '14 14:07 bp74

Hi Bernhard,

Thanks for the quick answer. I wanted to try a few more things before I get to you back. I used webp images so 1M in total (previously 2M). I reduced sprite sheet size so they are no larger then 1024x2048. Unfortunately it also didn't help. I checked the console and it looks like the game run fine. If I refresh the browser few times first I can't see some graphics (event they are loaded) and next refresh freezes the browser. The odd thing is the game works very well if I play it first time. I can't notice any problem with the performance.

I know it's very hard say anything without seeing the code. I keep the repos on bitbacket.com. I need keep them private but I can share them for you. Would you have some time this week to have a look on it?

Marcin

avstudios avatar Jul 21 '14 16:07 avstudios

I'm not sure if i can find the problem if i would see the source code. You know the source code much better and can't find it too. It's interesting that the games runs fine if you play it the first time. If you refresh the browser it should be a fresh start after each refresh ... very strange. Maybe the browser does not free the texture memory on the GPU. Maybe WebGL runs out of memory after the first game and maybe even a refresh does not immediately releases this memory (a lots of maybe).

Do you use WebGL? If you do, you could try to run the game with the canvas renderer to see if something changes.

bp74 avatar Jul 21 '14 18:07 bp74

That's fine. I think I will leave it for day or two and then try again. According to WebGL I've tired both options and don't see the difference. Will let you know if I find the problem.

avstudios avatar Jul 21 '14 20:07 avstudios