Jump to content

WebGL on iOS8


Recommended Posts

I'm getting started with Phaser 2.1.2. I just upgraded my iPad to iOS 8.0.2 to try out WebGL.


Pixi's bunnymark runs blazingly fast.


But, my game runs very slow - like 5 times slower than canvas. Also it appears that the entire webgl window is screened over the default gray Phaser background. If I change the background color to, say red, I can see it through the canvas. It's as though there's a transparency on the window or its being applied with blendmode screen.


In fact, if I look at the phaser examples on phaser.github.io, I can see the planet background through the examples, and the examples are all screened.. for instance the breakout example looks like all white pellets. This is the case on dev all the way back to 2.0.0.


I'm not sure what the difference is between the bunnymark and phaser examples in the way that the WebGl view is created. I have a feeling there's a simple configuration difference that is causing the slowdown.

Link to comment
Share on other sites

This thread discusses this towards the bottom of the first page. http://www.html5gamedevs.com/topic/9327-phaser-not-working-in-ios-8/?hl=spencertl#entry55427

In short, for webGL to run smoothly on low end ios8 devices you have to be mighty efficient with the way you use textures. Atlases, POT textures and so on. It was a big job for me to change everything to using atlases, as the optimisation had never been necessary before iOS8 , but it made a big difference.

As I think you've seen in another thread, set canvas background to black to solve the faded problem.

Link to comment
Share on other sites

The dev branch of Phaser contains Pixi v2 which has a number of fixes in it for iOS8 specifically and more efficient batching / shaders as well. I'm finding perfectly good results, even in shader heavy demos, on iOS8 as a result of it. But yes, it's still very easy to overload the GPU, so you have to be much more careful than with plain canvas.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...