Android game location on screen size -
right game using direct x , y values. realized s3 scaling images double size along other size inconsistencies between devices. read around , learned bit android dpi , scaling , stuff. i'm wondering whats correct way locations , stuff takes account different screen sizes.
i'm thinking can done setting target dimension , scaling positional values according ratio of target dimension actual screen size.
i read somewhere can draw onto buffer , display buffer stretched screensize, method android's auto resizing affect drawn bitmaps?
thanks
the idea use aspect ratio, android auto resizing benefit. every android screen has own aspect ratio, game should use aspect ratio , fill blackborder ever there need fill space on screen. use appropriate root layout fitting attributes.
android resizes drawables automatically dont fit. if keep 1 set of drawables, resizing work android increases , uses bitmap's internally resize. more bitmaps more memory utilization, more cleanup, more gc , slower game. best practice here create different dpi different image sets use.
to start suggest purchase 3 phones, samsung y (small screen), samsung s2 (good screen) , tab 7 or 10 inch. copy original drawables folders, feel of game , eliminate memory issues. once game works nicely, smoothly without memory issues on phone sizes, walk graphic designers office , show him how bad game looks on phones. create graphics work dpi.
its game of intelligent drawable resolution, sizing , whole load of testing :).
hope has helped.
edit : read answer in memory issues
Comments
Post a Comment