Screen Resolution when it comes to variables question.

SandbirdSandbird Member Posts: 69
edited November -1 in Working with GS (Mac)
I am doing a resolution independence game but i reached a point where i have to use some offset on a block that i have on stage and i am not sure how many pixels i should set for the offset.

My block is 300x64 in real life. When i make it an actor due to the IR, it makes it 150x32 pixels.
Now if want to say:

When Attribute: game.Mouse.Position.X > self.Position.X+50

That means it will be +50 for the 150pixel block, and automatically the appropriate pixels for the 300px block ? Or do i have to calculate first what screen resolution the user has and put a global variable lets just say offset. When sometimes it is 50 and other times 100, according to the resolution of the iphone.

I hope i explained it well.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi Sandbird, all of my apps in the pipeline are for iPad only so I've never used RI. (Although that might change with iPad3... ;-) But I'm 99.99% certain that the higher resolution for iPhone4 doesn't have any bearing on any parameters. So for offsets, positions, etc; just treat as normal.

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • SandbirdSandbird Member Posts: 69
    So i should just disregard the fact that the actual image is 300x64 and trust the stage where it converted the prototype to 150x32...that these are the pixels all iphones/ipods will work with.
    so offset 50 will be the same for all of them. (well not for ipad right :P, or is it the same in ipad but just bigger stage resolution?)

    Thanks
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Sandbird said:
    So i should just disregard the fact that the actual image is 300x64 and trust the stage where it converted the prototype to 150x32...that these are the pixels all iphones/ipods will work with.
    so offset 50 will be the same for all of them. (well not for ipad right :P, or is it the same in ipad but just bigger stage resolution?)

    Thanks

    That's right. :-)

    As for the iPad - same again, 50 pixels offset will be 50 pixels offset there, or on a mac screen, etc. And to underline the point, 50 pixels offset will be exactly that whether you're using RI for iPhone or not.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • SandbirdSandbird Member Posts: 69
    Cool thanks gyroscope + 50 offset :P
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Sandbird said:
    Cool thanks gyroscope + 50 offset :P

    Heh! Bargain!! :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.