How to handle resolutions properly? And a question about tests demo...

How to handle resolutions properly? And a question about tests demo...
0.0 0


Even with the sample “test” project included, when i run i on android the resolution is not handled property, using the default device with high resolution (800px) the menu button is out of screen and some tests just freeze.
I know the tests works fine with iphone and xcode, Isn’t it supposed to run 100% fine with android too?
Is there a good tutorial or can someone explain shortly the correct way to handle all the resolutions properly? (android/iphone,320,640,800px+)
Should i create different assets for all kind of resolutions? (Wow that would be a lot, like 5-6 assets :S) Or is it better to just scale the assets?

Thanks :smiley:


everything looks fine on android galaxy tab 10.1, the positions of sprites are done mostly through winsize in the tests so resolution shouldn’t be a problem, you might need to change screen orientation in the xlm file or your code.


Well my question is mainly to ask about how to handle resolutions in my project,

but well about the “test demo”… i tried to make it landscape too and there are a lot of tests that just freeze (android 4.0.3 emulator). Also with 2.1 is not working (black screen) im going to try with 2.2 now to see the results.


You should put all resources for different resolution in assets, and use corresponding resources at runtime by the resolution got from java codes.
Or you can use

CCEGLView::create(480, 320);

Please refer HelloWorld/android/jni/helloworld/main.cpp.

The second approach scales width and height by the same rate.