简体   繁体   中英

Content Scaling with a non-dynamic world size in Corona SDK

I am using the Corona SDK to create a game in which I want a non-dynamic world size across all of the devices (ie 1440 x 960). However, the auto-scaling in Corona is not allowing me to do this consistently. For example, on the iPhone the screen moves two screens (480 * 2) pixels to the right (landscape mode), which is effectively 1440 px. However when switching to the iPad the scrolling is still moving two screen sizes to the right because it's viewing the iPad as 480 and not 1024 (the config file is set to 480 height and 320 width). Is there anyway to do this without turning off the content scaling? If I have to turn off content scaling, does that negate the advantages of the Corona SDK and the ability to code without thinking about the device?

thanks,

The point of Corona content scaling is exactly to not code multiple values on the logic...

So you have to either ignore the device size (if your world is "2 screen wide" it will be "2 screen wide" in ANY device) or turn off the scaling and handle the screen size manually...

I would not use the second option unless you want to torture users of smaller phones, that will see only a very small area of your playfield.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM