Page 1 of 1

PO2 Canvas Background?

Posted: Wed May 20, 2015 5:14 pm
by JKGiih
I'm making a game with a static background that is somewhat randomly generated from 1x1 rectangles on a 64x48 canvas and scaled up to fill the window. I was going to test it on an old laptop to get an idea of the performance so far, but it crashed because the canvas wasn't PO2. Padding to 64x64 is obviously not an option, because the padding would go outside the screen.

The only solution I can think of would be to make two 32x32 canvases on the top and four 16x16 canvases to fill the rest of the screen. I haven't tried this yet because there are certain elements that have to be at certain places and rewriting the code would hurt my brain a bit. So I'm asking, is there a better way to get around this? Also, if I did it the way I described would the borders of the canvases be visible when drawing them to the screen or would performance otherwise suffer on older computers?