passenger-inspired Posted August 16, 2017 Share Posted August 16, 2017 I am creating a simple game which consists of me creating a long side scrolling street scene. This scene has around 40 houses on it with each house 700 in width and 2/3 of the viewports height. Each house is a simple rect with a basic fill and the pattern repeats in terms of the fill colours every 6 houses. Initially, I was creating a container with a graphics object as a child for each house and this worked well to a degree but the FPS on lower end devices was awful. So I thought I'd switch to creating a single object and drawing multiple rect's on the single object and whilst it held it's own, FPS wasn't much better. Can anyone provide some direction on how to tackle this as I have to support both WebGL and canvas and I can't seem to find anything on if this is an anti-pattern or another alternative which is potentially more suited. The attached asset shows the initial game launch and that pattern repeats on horizontally for some time. The black rect is just the canvas so ignore, the coloured rect's are what are important. I am currently using v3.0.11 for context ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
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.