Thursday, March 1, 2018

resolution - Android: Angry Birds Scaling


Anyone have any idea how the scaling is accomplished in angry birds? I want to make sure my images/background always scale to match the screensize and this game seems to have a similar effect. I have been playing with the manifest settings lot on setting preferred screen sizes but I have yet to duplicate exactly what I want.


Are there any effective ways to make sure your game will always display X Y space, scaling down as needed depending on the pixel size?


I want to make sure everything is always displayed on the screen for all devices and not cut things off on small devices or add black space on large devices.


I am calculating my drawing space by getting the size of the view and using this as bounds for my sprites but it doesn't seem to be working too well.



Answer



To answer the original question, Angry birds uses regular raster graphics (not vectors). Just unpack the .apk (it's a zip file) and have a look at the textures yourself.


Angry Birds only happens to prevent you from setting a zoom factor over 1.x, thus avoiding upscaling(magnification) of the textures. It probably also uses OpenGL mip-mapping to avoid downscaling(minification) artifacts.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...