I'm going to be working on an ipad / tablet version of my game this week.
Rather than try to make one project fit both phone and tablet, I think it will be better to create a separate Gideros project and exported files for tablet.
I thought about doing this, but decided against it with my current game. It my opinion it will be a pain to maintain two versions. I tried to think of the best ways to make it fit universally.
It depends tho, on what your needs are. What is the game that you are making two versions for?
I may have to go that route anyway. I'm running my app (Lost Caverns) on the ipad here and the aspect ratio and size of the screen make it look bad.
The buttons are absolutely huge, for example. The other alternative might be to detect if the display is ipad and resize elements on screen accordingly.
You could work out whether its a tablet using a combination of the pixel density and actual screen size measurements and then set your logical dimensions larger above a certain threshold when your app starts. This would in effect zoom out. You'd just have to make sure you anchor your GUI elements (by getting the logical top, bottom, left and right values) and if needed multiply the X and Y positions/movements of certain elements by the amount you zoomed out.
As pie says, it would be a good idea to use auto scaling too (providing @2x graphics etc), for the sake of crispness.
The more downloads you get, the more visible your app becomes, so downloads tend to increase exponentially. Splitting your app would really hurt this.
I may have to go that route anyway. I'm running my app (Lost Caverns) on the ipad here and the aspect ratio and size of the screen make it look bad.
The buttons are absolutely huge, for example. The other alternative might be to detect if the display is ipad and resize elements on screen accordingly.
I need to 'zoom out' about 25% - sounds tricky.
I always use letterbox to keep the aspect ratio and 2x or big images and setScale(0.5) to adapt to different screen sizes.
@Tom2012 - does the deviceid not let you know it's an ipad?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
I recently had to use the device physical size to make things appear bigger, while keeping the benefit of larger screen space. I computed the diagonal size in inches, instead of relying on the deviceid. Rationale is that bigger the screen is, further from the user's eye it will be...
local scrW=application:getDeviceWidth()local scrH=application:getDeviceHeight()local d =math.sqrt(scrW*scrW + scrH*scrH)-- diagonal size in pixelslocal resolution = application:getScreenDensity()or120local diag = d/resolution -- diag is diagonal size in inches
I then assumed that devices <7" where phones, tablets where between 7" and 12" and desktop over 12".
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Comments
I thought about doing this, but decided against it with my current game. It my opinion it will be a pain to maintain two versions. I tried to think of the best ways to make it fit universally.
It depends tho, on what your needs are. What is the game that you are making two versions for?
Wouldn't having two versions also affect your search ranking? I think you'd split all your download stats and rank lower in the app stores.
Likes: SinisterSoft, totebo
I may have to go that route anyway. I'm running my app (Lost Caverns) on the ipad here and the aspect ratio and size of the screen make it look bad.
The buttons are absolutely huge, for example. The other alternative might be to detect if the display is ipad and resize elements on screen accordingly.
I need to 'zoom out' about 25% - sounds tricky.
Likes: Tom2012
You could work out whether its a tablet using a combination of the pixel density and actual screen size measurements and then set your logical dimensions larger above a certain threshold when your app starts. This would in effect zoom out. You'd just have to make sure you anchor your GUI elements (by getting the logical top, bottom, left and right values) and if needed multiply the X and Y positions/movements of certain elements by the amount you zoomed out.
As pie says, it would be a good idea to use auto scaling too (providing @2x graphics etc), for the sake of crispness.
The more downloads you get, the more visible your app becomes, so downloads tend to increase exponentially. Splitting your app would really hurt this.
Likes: Ninjadoodle, Tom2012
Likes: Tom2012
I've been playing with this and using something like:
I had no idea we could set the properties from lua!
Likes: totebo
https://deluxepixel.com
Good one, didn't think of that!
Likes: SinisterSoft
That's also an excellent idea. Taking my own thread off topic here...
Can I ask something about your code?
Cheers @hgy29
Likes: Tom2012
https://deluxepixel.com