Gio,
When running my corners game on an iphone, it sometimes refuses to take touch input (hangs).
I assume this has to do with the amount of memory being taken up by the various layers in the game. Anyway, my attempt at solving this is to change the layer resolution based on if it is a mobile browser.
In your Match3 example code, there is this following section:
if (wade.getContainerHeight() <= 768) { self.isMobile = true; wade.setLayerResolutionFactor(this.layers.background, 0.75); wade.setLayerResolutionFactor(this.layers.boardBack, 0.75); wade.setLayerResolutionFactor(this.layers.board, 0.75); wade.setLayerResolutionFactor(this.layers.boardFront, 0.75); wade.setLayerResolutionFactor(this.layers.front, 0.75); }
So I went ahead and duplicated this bit in my code.
My quesiton is, is checking the container height still a good way to do it, or is there a newer better method you would suggest ?
Also, is setting the resolution to 0.75 based on some test, or is it just something you have tried that works ?
Also, there is a set of lines in the code:
wade.setLayerRenderMode(self.layers.background, "webgl");
To set the render mode of the various layers to webgl.
Is that also something I should be doing in my code, or is that done automatically with wade 2.1 ?
Lastly, you set a variable isMobile to either true or false, but I can't see it being used anywhere ?
As usual, any help is appreciated.
cheers,
Shri