- Forum posts: 1
Nov 13, 2017, 9:55:20 PM via Website
Nov 13, 2017 9:55:20 PM via Website
in my game i use surfaceview And Canvas to draw sprites on screen for achiving this in all screen size: i test two way:
first: when canvase want to draw Framebuffer(final bitmap) on screen, scale this framebuffer by using
canvas.drawBitmap(framebuffer, null, dstRect, paint);
but frame per second(fps) reduce And game dont run smooth( smaller screen = smoother game runing)
two: if i load And scale all photo in start of game accordindg to screen size --> Grow heap increase use this in this way:
canvas.drawBitmap(framebuffer, 0, 0, paint);
All of images are Maximum 480*800 pixel
(**an image without scale, allocate 1.5 mb And with scale for a 1080*1920 device allocate about 10mb *)