Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Supporting Different Screen Resolutions - Gideros Forum

Supporting Different Screen Resolutions

talistalis Guru
edited July 2012 in Game & application design
Hi everyone,

I have some issue in supporting multiple screens in my tests with Gideros. Just to test it i want to support 320x480 and 480x800 resololutions.
I am using Page Curl Efect (FlipPageView.lua). My problem:

1-My logical program size defined as 320x480
2-My page images are also like image1.png,image2.png,..... and goes on and defined with 480x800 resolution.
3-In my program properties i chosed "Letterbox" as scaling.
4-In my scaling properties i have @1.5x- 1.5 .
5-I also supplied assets for this scaling multipliers.(image1@1.5x.png,image2@1.5x.png,....)
6-Unfortunately when i run the program in 480x800 device(Real device htc desire hd) my program directly runs out of screen with some weird scaling.

What i tried:
-I tried Stretch from properties.
-I changed from project properties my logical width and height as 480x800 and deleted the 320x400 images, and my program fits perfectly on the screen. So from here i understand nothing wrong with my images an coding:)
-I canceled scaling totaly and handled dynamically in the program my resolution and scaling properties. It started to work.
But still i can not figure out why Gideros is not automatically scaling my program. Any solutions or advice?

My manual solution
Main.lua
if application:getDeviceWidth()>320 and application:getDeviceWidth()<481 then
application:setLogicalDimensions(480,800)
 
elseif application:getDeviceWidth()<=320 then
application:setLogicalDimensions(320,480)
end
Scene2.lua
if application:getDeviceWidth()>320 and application:getDeviceWidth()<481 then
flipview:addPages{
"gfx/1@1_5.png",
"gfx/1@1_5.png",
}
elseif application:getDeviceWidth()<=320 then
flipview:addPages{
"gfx/1.png",
"gfx/1.png",
}
end
Thanks in advance guys.

Comments

  • This post is in wrong place i think i should have opened in issues and bugs section. I can not move it though can some admin move it for me.
    Thanks
Sign In or Register to comment.