Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Is Anyone creating separate versions of their app for tablet and phone? — Gideros Forum

Is Anyone creating separate versions of their app for tablet and phone?

Tom2012Tom2012 Guru
edited October 2015 in General questions
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.

Has anyone else tried this?

thanks!

Comments

  • NinjadoodleNinjadoodle Member
    edited October 2015
    Hi @Tom2012

    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?
  • Hi @Tom2012

    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.
    +1 -1 (+2 / -0 )Share on Facebook
  • Tom2012Tom2012 Guru
    edited October 2015
    Thanks for the comments.

    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.
  • piepie Member
    Did you try using gideros autoscaling feature to provide different textures according to the screen resolution?

    Likes: Tom2012

    +1 -1 (+1 / -0 )Share on Facebook
  • NatWobbleNatWobble Member
    edited October 2015
    @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.
    +1 -1 (+2 / -0 )Share on Facebook
  • Thanks for the comments.

    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.

    Likes: Tom2012

    +1 -1 (+1 / -0 )Share on Facebook
  • Thanks for the help guys.

    I've been playing with this and using something like:
    if(application:getDeviceHeight()==1024 and application:getDeviceWidth()==768) then
    	print("ipad")
    	application:setLogicalDimensions(512, 768)
    end
    Uses the correct assets and 'shrinks' everything down on screen. It's throwing a few things out with fonts but nothing that can't be fixed.

    I had no idea we could set the properties from lua!

    Likes: totebo

    +1 -1 (+1 / -0 )Share on Facebook
  • Same here! Gold dust.
    My Gideros games: www.totebo.com
  • @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
  • hgy29hgy29 Maintainer
    edited October 2015
    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 pixels
    local resolution = application:getScreenDensity() or 120
    local 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".
  • Tom2012Tom2012 Guru
    edited October 2015
    @SinisterSoft

    Good one, didn't think of that! :)
    if(string.sub(application:getDeviceInfo(), 1, 4)=="iPad") then
    	application:setLogicalDimensions(512, 768)
    end

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • @hgy29

    That's also an excellent idea. Taking my own thread off topic here... :)

    Can I ask something about your code?
    local resolution = application:getScreenDensity() or 120
    In your example, does this line mean 'if application:getScreenDensity() fails / is nil then use 120'?

    Cheers @hgy29
  • yes, it's a really nice trick to use for default variables in a function too.

    Likes: Tom2012

    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
    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.