Jump to content

pixi.js isometric optimizations (iOS use)


thibou
 Share

Recommended Posts

Hi all!

 

I'm experimenting with pixi.js to draw an isometric scene based on tiles in Ejecta/iOS.

 

I'm using a DisplayObjectContainer to store a grid (say, 50*50) of isometric tiles.

 

I use another DisplayObjectContainer to contain a RenderTexture sprites (say, 2*2) grid. I render those original tiles to the rendertextures. This enables super fast scrolling and zooming etc. when just 4 sprites are displayed.

 

However, there are cases when I need to display and modify a part of the original 50*50 tile grid. A subset of it is displayed at once, say 20*20. 

 

I manage to get 60FPS also with that, but when adding a lot of extra sprites on top of that, especially MovieClip objects, the FPS starts to drop below 60 with an iPad 2.

 

XCode Instruments opengl profiler gives the following info:

Batches 14

Triangles rendered 2000

GL & Platform calls 159

 

Instruments recommends the following optimizations (in pixi):

 

-Use Vertex Array Objects (lot of them)

-Reduce Small batch draw calls

-Reduce redundant state calls (e.g. glBindTexture, glBlendFunc, glBindFrameBuffer)

-Inefficient state updates (glEnableVertexAttribArray(0u))

 

Any tips on how to optimize pixi in this case? I'm posting this because it might help optimizing pixi in general. I'm happy to provide more details if needed.

 

Any further culling/flagging invisible the sprites is not possible (to my understanding).

 

Cheers

 

 

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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