vivek madishetty Posted June 22, 2017 Share Posted June 22, 2017 Hi i am currently working on a game using pixi. I have used too many animations which is effecting the performance. I am using very heavy assets(4k background). i would like to know if i can use multiple canvas one over the other. and render them as per requirement. the renderer redrawing the whole background slowing the speed of the game. and suggestions. some animations require a higher frame rate but the other animation will do well with lower frame rate. i would like to optimize the game as much as possible. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 22, 2017 Share Posted June 22, 2017 Yes, you can. The more canvases you usem, the more memory they eat and the more time browser's compositeLayers will take per frame. In some of my games I used two canvases, one for back one for front. I even made back larger and moved it with css. I don't know why sometimes its faster than one canvas, it depends on browser and device. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.