Malik Saad Bin Tariq
Malik Saad Bin Tariq

Reputation: 237

Better way for Andengine screen size?

I understand that Andengine gives us option to scale our scene to any size screen that the user may have.

My question is if it would be better to develop for a larger resolution, say 1280/800 and scale it down for smaller screens OR to go for smaller resolution, say 800/480 and scale it up on bigger screens?

I did try to test this in a sample game by developing it for 1280/800 and scaling down (by ratioResolutionPolicy) to 800/480, and the results weren't satisfactory, there was stutter every here and there the framerate on the debugger though showed 60+. Is it bad programming on my part or does it have to do with the scaling down of the pixels, should I develop for smaller screen and scale it up?

Upvotes: 0

Views: 1478

Answers (2)

Siddharth
Siddharth

Reputation: 4312

To achieve good result on all type of android device you have two ways to follow from my perspective.

First, you have to develop and use two graphics to handle all the type of devices. For example one with resolution 1024x600 and other with 480x320. Based on device current resolution you have to load specific one type of graphics.

Second, you choose any single resolution that best suits to you and have great share in the market. Develop and use graphics only for that resolution. For other resolution scale that graphics based on aspect ratio. For this you have to create super class of sprite and change value of x,y,height and with based on aspect ratio calculate.

This was my experience that I share with you. If you have any doubt then feel free to ask it.

Upvotes: 1

GameDroids
GameDroids

Reputation: 5662

I guess it depends on what kind of graphics you are using.

Say, for example, you want to create something in a retro-gameboy-pixel style, then it makes more sense to use small images and develop for a small resolution (like 480x320). Pixel graphics can be scaled up without loosing quality, but not down (then the pixels loose form).

But if you want high resolution graphics you are most likely better of developing the whole thing for a big resolution and let the AndEngine scale it down.

In both cases the quality of the pictures also depends on the TextureOption of your TextureAtlases as well.

Anyway, I can imagine that neither scaling down, nor scaling up is more efficient. Scaling is done by openGL and should go quite quickly. The downside of using big resolutions though, is that the device has to hold huge images in it's memory and the of course processing big images always takes more time than processing small images. So maybe the best way is to develop for middle-size devices (e.g. 960x640) ?

I know this isn't much help, unfortunately it is a lot of try and error to get the best results for your specific requirements.

  • christoph

Upvotes: 2

Related Questions