Target resolution for a game (Android) - android

So, we're developing a game and the artist asked in what resolution is he supposed to prepare the graphics.
I've done some research
http://developer.android.com/guide/practices/screens_support.html
developer.android.com/about/dashboards/index.html
and from what I gather I should ask him for 1920x1200 resolution graphics, and then
from these I can prepare graphics for lower resolution devices.
That would be a major screw-up if I asked him for wrong resolution art so I want to make sure.
Is that the case ? When he does these 1920x1200 graphics, am I going to be able to produce all the other popular sizes/resolutions with no problem ? My biggest fear are ratio differences.
Thanks.

If clipping isn't a concern, you can use 1920x1200. However, you'll have to do some editing for different aspect ratios, like you guessed.
I would create a large one for each target aspect ratio, if that is your concern. The most common ones are probably 16:9, 15:9, 4:3, but you might want to do some research on what your focus devices are.
If you have one in each aspect ratio, it makes scaling easier. However, the artists I've worked with generally provide me more than that, since a general scale doesn't always look good in a l/mdpi setting. They normally work with vector graphics for the base images, and then can scale to whatever resolution and put it in a raster format. You might want to ask your artist about that, though, since I'm not much of an expert on it. All I know is he sends me pretty pictures in many different resolutions.
All in all, though, aspect ratio isn't very important for most graphics. A fullscreen background, maybe, but all your UI components should be fine with just an mdpi/hdpi/xhdpi version.

Please use larger graphics. The accepted answer is alright for year 2013 when it was posted, but there are devices with 2560x1600 now and graphics don't look sharp and crisp on them.
If you want to support everything properly and make your life easy, ask the artists to supply everything in at least 2733x2134 pixels (for fullscreen images like backgrounds, etc.) You can use smaller sizes for sprites (just calculate which percentage of the screen it would occupy).
BTW, that 2733x2134 might look odd, but it was carefully calculated. See the details here:
http://bigosaur.com/blog/31-android-resolutions-definite-answer

Related

LibGDX Texture quality for different devices

A lot of different questions were asked around the question "How to deal with Textures for different devices in Libgdx". I would like to summarize information here and ask what is not clear for me still.
Tips for the good quality of Textures:
Forget about the approach to build huge Textures with transparency. RAM will be destroyed on low devices. explanation
Use Viewport. Aspect Ratio for Textures will look the same for each device. explanation
Avoid raw textures. Apply the TextureFilter. explanation
Use AssetManager. It allows you to load, dispose, make screen loading progress in the easiest way. example
Use different resolutions for different devices. Use ResolutionFileResolver. It allows Libgdx automatically to choose the most appropriate Texture for each device. example
Note: feel free to add ideas to this list
The question is about the last point. Android platform has a huge amount of different phones and tablets. I understand that it doesn't make sense to create each Texture for each Resolution.
How many resolutions to cover separately? I suppose to take 3 categories: for lower, middle and high devices.
If so - how to choose the most appropriate one for each category?
Are there any cases to use the same Texture somewhere? (small icons, HUD, etc)

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?
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
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.

Is it worth my time producing ldpi assets for Android applications these days?

I'm currently building an application for Android (a game). So far, I've created assets for all devices, from ldpi all the way up to xhdpi. I'm building the application for Android 2.2 and above.
Should I stop producing ldpi images?
It would cut down the time it takes to produce the graphics fairly significantly. On top of this, I don't think that very many devices (commonly used) these days actually fall into the ldpi category.
Thoughts?
There are only 3.1% of phones with ldpi screens (as of 1st Jan 2016). Here is the statistics about devices and their screens. You can decide whether to support them or not.
True, but to build your brand image, you have to do the job perfectly, for everyone. Even if there are a few tens of users who use low dpi, it's totally worth it. :-)
You could if you like. you could set a in code aspect ratio resizer, and size all the images accordingly when loading them. So no matter what screen you play on, they take up the same percentage of it. This significantly cut down graphic time, and looks great.
another way you could do it, is get Paint.net and simply build the largest graphics first. Then go into Image and Resize, and set the resize to by the ratio difference, say 75%. save this and you are done. Should cut the entire time down significantly as well, and also looks great.
I have done it both ways, and you cant tell the difference.
I have always built my code so that it fits the game to the screen.
for example in a sidescrolling fighter if a character is 5/8 the screens height, and 3/12 the screen width on my testing device, and it looks great>>> you can do a little math, figure out the h/w ratio of the screen any user is playing on, and adjust the image at load time so that no matter the device your image will take up the percentage of the screen you intended it to.
It is suitable to use all image packs, because if most devices support MDPI, but you would be losing market devices with low resolution. Use LDPI.

android developers - what do you need from the designer?

i am NOT an android developer and im trying to understand what they need in terms of graphical resources to make an app that functions across many android devices.
i have (tried to) read this page http://developer.android.com/guide/practices/screens_support.html , but find it somewhat bewildering. they talk as if screen density is the important thing "Supply alternative bitmap drawables for different screen densities" but then, if you dont know the size of the screen, you cant really think in terms of layout. is the idea to make buttons and logos that are the same size on all screens with the same density, such that on a large screen there is just a bunch of space, and on the small screen its all packed in tight? i dont understand how just thinking in pixel density gets me any closer to knowing what to provide.
are you supposed to create resources for every screen size AND pixel density? say it aint so.
anyway can somebody tell me... if you were developing an app what do you need for graphics? is it possible to provide graphics that are large and just let them scale down? is it inevitable that the devloper will have to mess with the graphics himself anyway? or can he be provided with sets of png files of certain sizes that will be ready to use?
thanks!
Here's what we do at my work place. Suppose we get a desing for the app. We make our designer create 3 psds versions for the same desing. the 3 psd's are for the 3 ranges of desnity. The size used for the psd are
240*320 (Low Density)
320*480 (Medium Density)
480*800 (High Density)
Most of the time when I write layouts, I use wrap_content which means a view must take the size of the content it wraps. Which works most of the time as I have a density specific version of the design so the image i use as background should be suitable. The thing to note is that, in android you can can put the 3 sizes of the same image in different folders such as drawable/ldpi, drawable/hdpi.
Eg: you have a bg.png and have a version for large phones and a version for small phones. You put the big bg.png into hdpi folder and the small png in the ldpi folder. Android will automatically select the appropriate image based on the phone density. But you need to make sure the file name is the same.
There are cases where you need to resize you background images without makeing the image looking too scaled. For this android uses the draw9patch tool. With this tool you can specify areas which can scale and areas that shouldn't scale.
9 Patch png's are your friend. Read up on them here:
http://developer.android.com/guide/topics/resources/drawable-resource.html#NinePatch
and here:
http://developer.android.com/guide/developing/tools/draw9patch.html
Those are your best bet for any kind of graphic that will stretch nicely (i.e. not gradients, they will come out slightly pixelated on some screens probably) The power of these types of images is that you can tell the system which pixels to repeat if it needs to stretch the graphic. This means that stretching can be done without loss of image quality (again depending on your image and how you choose to make the nine patch. The "show bad patches" button in the draw9patch program will show you potential problems. Hint: keep your repeatable pixels down to 1 on left and 1 on top and you'll have no problems with bad patches) Any graphics that can be made in to 9 patches will only need 1 size since the system can effectively make it whatever size it needs.
are you supposed to create resources for every screen size AND pixel density?
You may if you like. This would ensure that the application will look great across all devices. I understand that this is not feasible for all projects though. In general if you make separate resources for the different densities you'll get something that looks acceptable on most of the devices out there. All of the devices are classified as ldpi, mdpi, or hdpi (there may be an "extra high" level now too, I am not certain off the top of my head) So if you supply graphics for those 3 densities then the system will know where the device falls under and will pull the correct graphics.
is it possible to provide graphics that are large and just let them scale down?
Yes the system will scale down your graphics if needbe. But be aware there are consequences with this approach. First every time the system hast to scale a graphic up or down it is going to taking up CPU and memory to do so. This may not be an issue if you have relatively few things to scale, but if you have many it could cause noticeable lag time during on the lower power phones. Second, To my knowledge all of the graphics in android are raster, which means if you are letting the system scale something up or down image quality is going to decrease some. Again depending on the specific images this may be more or less noticeable on the actually device at runtime.
My best advice is supply them with resources of a few different sizes and run the app on as many different devices as you can. Once you see how your different resources look on the devices of different sizes you'll have a much better feel for which ones you need to supply to get the UI looking as consistent as possible across the largest swath of screen sizes and densities.

From .psd to screen

I have a client that gave me a .psd file that contains the entire screen of an Activity with all the graphics. The resolution is 480x800. The client wants the application to look identical to the one in the .psd file. The problem is that different devices have different resolutions and sizes. I know that the density is what really matters but how can I scale the graphics to look the same on all the devices? For example, I exported all the layers and recreated the screen in Android but, for some reason, the screen looks more crowded on a Nexus One (480x800).
One idea would be to create 9 patch images from the graphics and use for ImageViews android:background instead of android:src right?
Isn't it better to have a 320x480 resolution for the graphics? Or do I need for both resolutions? Also, I have to consider the height of the status bar which I understood it is 25dip but I am not certain about this.
So, to summarize, I am interested to find out what is the best way for a client to give you the mockups and graphics so that it is easy for the developer to implement according to the specifications.
That's something that's not easy to solve. Think of a webdesigner, one can't know all the possible resolutions and settings of every browser so he has to scale things accordingly.
In my opinion there are only three approaches here.
First: Let him state what devices he wants to support and only support those devices. Extract the layers with the size of the device with the highest resolution and scale them down on other devices.
E.g. If you have to support two devices with 480x800(2) and 240x300(1), export all images to be 480x800 and scale them down accordingly. Don't write a single application for every device.
Second: Export the graphics with the highest resolution possible and scale them down on all devices relative to the device being used. Imagine, again, a webdesigner. All he does is define margins, paddings, etc. and it will look nice in almost any browser. You should do the same and resize your elements on demand.
Third: Make the application fixed, e.g. define a size of 200x200 for your whole application and just fill everything larger than the screen with a certain color, e.g. black. This happens a lot with java ME applications, they look great on the hardware they were made for and are still playable on hardware that is beyond their time though they look pretty ugly.
Hope this helps,
Robin.

Categories

Resources