I'm started developing games for android devices, but I have an problem. I want to move my sprite around the screen, but without leaving the screen. There are many devices with various resolution, so how can I get the size of any screen? I can't work with only one fixed resolution.
(Sorry for my bad English, I just learning it
)
Comments
Here you have 2 options:
1. Gideros have the concept of "automatic screen scaling" to solve this problem. When you right click the project name and select "Properties..." you see options "Scale Mode" and "Logical Dimensions". For example if you determine your logical resolution as "320x480", develop all your code according to this resolution and let Gideros scale your scene according to different hardware resolutions. http://www.giderosmobile.com/documentation/automatic_screen_scaling.html
Also you can learn your logical and real device resolutions by using these functions:
Also, if you use scaling, preferably create your Textures and Fonts with filtering to improve rendering quality:
atilim
automatic screen scaling is a great future for muti-resolution screens.
It would be much better if Scale mode can be selected for specific resolution.
for example, I would like to add more items on the pad than on the phone, without scaling , but perform a scaling between phones
https://sites.google.com/site/xraystudiogame
Likes: Yan
https://sites.google.com/site/xraystudiogame
how to autoresize ??
I've configured the logical dimensions in 800x480 (GalaxyS in landspace), and triying the different scale modes the program makes some changes in images.....
If i "don't touch" nothing ( No scale-Top Left mode ), and i try to get the hardware size.....the game will be run without scaling problems on any device???
Regards.
***Go Gideros!!! Best open source SDK+IDE for mobile devices.
**my physics based game base code in three days!
*without LUA knowledges
Likes: gorkem, atilim
Sorry for my English level.
wasn't it
application:getDeviceWidth() ?
Just checking
You can choose No scale-Top Left mode and scale your scene according to getDeviceWidth() and getDeviceHeight(). But it won't be so easy. So I recommend to use one of the predefined scaling modes.
And...if i get the device width/height and set the no scale mode.....the app can be outside the screen in small screens??
And...if i set the scale mode to other predefinied scale mode (Like letterbox) the game will be show correctly?? (I must to develop with bigger images??for example the current background res is 480x800, but in some scale mode shows the image smaller than the "real size")
Sorry for my English level.