Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
STAGE SETTINGS AND PROJECT DEVELOPING — Gideros Forum

STAGE SETTINGS AND PROJECT DEVELOPING

gaboritalygaboritaly Member
edited July 2012 in General questions
Hi ,

I've got started testing , how is to possible to create an universal (iOS, Android for multiple screens ) apps in Gideros.
Well, I tried to set the document properties in:
Letterbox
Pixel Perfect
and now testing No Scale- Top Left option

I want to try doing in the Landscape mode, and create the graphics for all screen sizes.
I read several articles regarding the topic, both here on Csdk, but have not led to a thing of all.
My attempts are quite disappointing and confusing.
I thought starting with the highest resolution, the retina iPad, also the graphics and in Gideros.

with these settings :
letterbox
320x480
1536x2048

letterbox
480x320
2048x1536
I noticed if i set the stage 2048x1536 or 1536x2048 and set in landscape mode in any case my objects viewed in oriental mode.And in this case the scale proportions it's very different.

Letterbox:
I thinked is a better solution because I don't do other calculations with the proportion and etc..
But ad example in my test, iPhone and iPhone hires have got the lateral white space, and if I test for android my result it is a really disaster.
Pixel Perfect:
I think it is good, but only if i do for iOS and not universal apps.
In this case the background images viewed well, but view also for iPhone and iPad same images , in this case I think I should doing the bigger images for bg (because accept only integer scale), and in this case the proportions will be more screwed.

Asks:
Why the y =0 to start to scaled screen position, and not a real area?
How can I calculate the correct positions if I want x= 0 and 0=y or other positions?
It is a good idea to start to bigger resolution , or I should to start to little?
How can I set the correct sizes (width , height) of my graphic objects, included the background ?
Why if I use landscape mode the the stage width and height are reversed, and the object width and height are the good sizes?
What is the better practices?
How it is to possible to create the real universal apps ?

Sorry for the a lot of asks, but I proved for some weeks without success.

I attach my big_to_little example.

zip
zip
screen_test_big_to_little.zip
6M

Comments

  • http://appcodingeasy.com/Gideros-Mobile/Ignore-Automatic-Screen-Scaling-when-positioning-objects

    You may find this article useful. You can grab the scaling being used to still position things to always be top left (0,0 like you were saying) etc.
  • gaboritalygaboritaly Member
    edited July 2012
    Thank you @Zvardin, You have removed a enormous weight off my shoulders... :P
    One less thing, from my questions
    With this solution I can adapt also the background.

    I controlled in photoshop and the bg scaled 1.128, I would create the dynamic solution , but working yet on it , actually I don't have any idea how it is possible to calculate this percentual 1.128.
    Anyway this code working perfectly for iOS.
    local dx = application:getLogicalTranslateX() / application:getLogicalScaleX()
    local dy = application:getLogicalTranslateY() / application:getLogicalScaleY()
    background:setPosition(-dx, -dy)
    if application:getLogicalScaleX () % .5  ~= 0 then 
    	background:setScaleX(1.128)
    end
  • ops why not working now also < pre lang="lua" >
    [-O<
  • ar2rsawseenar2rsawseen Maintainer
    you should remove space between < and pre ;)
  • Thanks <a href="https://forum.giderosmobile.com/profile/ar2rsawseen" rel="nofollow">@ar2rsawseen</a>
  • Just a side note, while not the nicest option application:setScaleMode("stretch") will force all screens to react the same way--based on the setLogicalScale call or app settings--it sounds like you don't want to use "stretch" mode but I thought someone better mention it anyway :)
    ThumbHurt Games / FB: ThumbHurt Games / FB: Eli/Teranth | Skype: teranth37
  • I think the best option is to use letterbox 480x320 or 320x480. Have a background image larger than 480x320 to cover any black bars. If your using retro pixel art graphics then you most likely don't have to worry about providing more images and sizes. If your using vector like graphics you can easily provide additional sizes of images @1.5x @2x @3x if your worried about blurriness, pixelation on larger devices http://www.giderosmobile.com/documentation/automatic_image_resolution.html

    So I think small -> big is the better solution also performance wise ;)

  • Thanks @Teranth , yes maybe for Android in some cases it is a possible, but I think only in few cases.
    Thanks @glennbjr , I watched that article and I read same articles in guiders CSDK, Flash +Starling .
    Unfortunatelly CSDK and in Flash use other settings, and design solutions.
    And I don't found similar articles from Gideros, with the design guide and demonstration and sources, what I found for Gideros only technical description , but for me it's really long from to find the solution how create the good design interface (and including programming solution: you can see on the top @Zvardin suggestion )
    By the way, I think it's a real good solution how publish there the articles it's really suggestive ;) Description+code + video demonstration
    Well, my left questions, how can I doing for Android without create hundred images for any resolution.
    And how can I scale for android my background similar solution how I did for iOS.
    Someone has source for Android, or the solution how is it to possible to calculate , in this case I can set the position example bottom-center .
    Thanks a lot.


    txt
    txt
    DIFFERENT_SCREEN_SIZE.txt
    2K
  • @gaboritaly nice links I think I am going to go through and see how easily I can convert some of that tutorial code from CSDK over to Gideros functionality :)
    ThumbHurt Games / FB: ThumbHurt Games / FB: Eli/Teranth | Skype: teranth37
  • Can anyone give me a little help, how can I solve the adaptation for Android?
    Thank you
Sign In or Register to comment.