★ iOS 7 Parallax GS Demo ★

GSAnimatorGSAnimator Member Posts: 312
edited June 2013 in Working with GS (Mac)
Just upgraded to iOS7 beta 2 and like the parallax background So made this quickly demo in GameSalad.

Hope you guys can make it better :)

DOWNLOAD DEMO

Comments

  • JarrenHJarrenH Member Posts: 206
    Awesome! I tried my hand at doing this but failed miserably! Looking forward to testing it out a bit later today!
  • GSAnimatorGSAnimator Member Posts: 312
    edited June 2013
    @JarrenH haha go get it And try if you can make it better :)
  • ashtmjashtmj Member, PRO Posts: 405
    haha I tried this tilt as soon as I saw the video too :)

    here is my code to make a BG move with the tilting of the phone

    Make 4 real attributes in your BG actor: "My X" and "My Y" "movement point X" and "movement point Y"

    rule 1
    change attribute my X to self.position X

    rule 2
    change attribute my Y to self.position Y

    rule 3
    constrain attribute movement point X to self.My X + game.accelerometer X * 28

    rule 4
    constrain attribute movement point Y to self.My Y + game.accelerometer Y * 28

    rule 5
    constrain self.motion.linear velocity X to 10*(moment point X-self.postion X)

    rule 6
    constrain self.motion.linear velocity Y to 10*(moment point Y-self.postion Y)

    this keeps it moving pretty smoothly.
    -Ash



  • LumpAppsLumpApps Member Posts: 2,881
    awesome! That's would look great in a game.
  • OskarDeveloperOskarDeveloper Member Posts: 533
    Made this apk with it :)
    http://db.tt/5wiyGto2
  • JarrenHJarrenH Member Posts: 206
    edited June 2013
    Alright, the affect is pretty much ruined when ran on the ipad. I even tweaked the code a bit to get it inside the iPads view, but the affect is lost for some reason... Maybe I'll tinker around some more.
  • GSAnimatorGSAnimator Member Posts: 312
    @jarrenH this demo is base on iPhone5 I'd like to make a universal demo this weekend :)
  • WbokoWboko Tennessee, USAMember, PRO Posts: 621
  • GSAnimatorGSAnimator Member Posts: 312
    edited June 2013
    @ashtmj I've tried your code feels a little bit strange, seems it's tilting in reverse way But use this code instead:


    rule 3
    constrain attribute movement point X to self.My X - game.accelerometer X * 28

    rule 4
    constrain attribute movement point Y to self.My Y - game.accelerometer Y * 28

    that will be right ;)
  • ericzingelerericzingeler Member Posts: 334
    @GSAnimator.com

    Not sure if you checked out my project above... I've worked a lot with the accelerometer in the past.

    The example project uses only 2 constrains and no rules. Most importantly, the function includes a low pass filter with a couple settings to adjust sensitivity as you see fit.

    Also, function is based on camera size so it should work completely independent of scene or project size (as in for any device with no modifications to function).
  • JoeMeisterJoeMeister Member Posts: 602
    ericzingeler fantastic job. Thank you.
    Oscar what am I supposed to do with an apk?
    GSanimator filling out a form/shopping cart and handing over all kinds of private info? I DONT THINK SO.
  • SocksSocks London, UK.Member Posts: 12,822
    ericzingeler fantastic job. Thank you.
    Oscar what am I supposed to do with an apk?
    GSanimator filling out a form/shopping cart and handing over all kinds of private info? I DONT THINK SO.
    Gotta agree with Joe here, I think GSAnimator's demo is great (and I appreciate you sharing it), but is there really any need to extract private / personal info and sign people up to a website just to share a demo, lots of people freely share projects whilst making no demands on the community.
  • JoeMeisterJoeMeister Member Posts: 602
    Thanks Socks. People are pretty fed up with adding more Passwords to their lives and filling out forms and what not. More and more I see a Trend on the Internet where companies make it clear up front that you want be asked for a credit card or any other information cause they know people are turned of by that.
  • GSAnimatorGSAnimator Member Posts: 312

    but is there really any need to extract private / personal info and sign people up to a website just to share a demo

    People are pretty fed up with adding more Passwords to their lives and filling out forms and what not
    @Socks @JoeMeister Haha, thanks you guys are right why didn't I just put the demo under the post, sorry, it was a huge mistake of mine. ;)

    Few month ago we got our a new website called GSAnimator.com then put our product on it and allow people to buy&download the templates without register or fill form, after that a lot of people said that they don't get the files or any email info after purchase the item, so we decided to change the way when people buying templates require to register&login, so they can automatically get the file in their account without any problem.

    Now we still working on some high quality Templates&Animations And if you guys afraid to provide your personal info on GSAnimator.com here is the iOS 7 Parallax GS Demo
    for you to download directly. ;)

    Cheers
    Zhong.
  • SocksSocks London, UK.Member Posts: 12,822
    @GSAnimator.com

    Cheers ! :)>-

  • GSAnimatorGSAnimator Member Posts: 312
    edited June 2013
    @ericzingeler Great job! =D> Yes, I've tried your project And you did a nice Loop demo, But Just one problem like @ashtmj did, the background tilting in reverse way on Y position. it's very simple to fix that, just need to change your last Rule "YPosition - Constrain Attribute" like this:

    self.Position.Y*self.smoothFactor+(game.Screen.Size.Height*.5-(self.moveDistanceY*(game.Accelerometer.Y)))*(1-self.smoothFactor)
    See the picture attached (People like picture tutorial) :)

    Cheers
    Zhong.
  • SocksSocks London, UK.Member Posts: 12,822
    @ericzingeler Great job! =D> Yes, I've tried your project And you did a nice Loop demo, But Just one problem like @ashtmj did, the background tilting in reverse way on Y position. it's very simple to fix that, just need to change your last Rule "YPosition - Constrain Attribute" like this:

    self.Position.Y*self.smoothFactor+(game.Screen.Size.Height*.5-(self.moveDistanceY*(game.Accelerometer.Y)))*(1-self.smoothFactor)
    See the picture attached (People like picture tutorial) :)

    Cheers
    Zhong.

    @GSAnimator.com

    Agreed, ericzingeler's demo (with it's excellent LPF) is working back to front, I made exactly the same change as you did (*0.5+ . . . . to *0.5-).

    Also I changed the move distance to Y=0.2 and X=0.3 as I think the more subtle/subliminal this effect it the more it works.

    But regardless excellent work from everyone ! :)>-
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Very nice guys. Thanks for sharing!
  • JoeMeisterJoeMeister Member Posts: 602
    GS nicely done and Thanks.
    One more question. In your demo who is that Girl (bg2)?
  • ShakurShakur Member Posts: 43
    Thanks @GSAnimator.com for sharing! But am I the only person who gets this message?
    "The document “iOS7_Parallax_Demo_iphone.gameproj” could not be opened. Unable to read file."
  • JoeMeisterJoeMeister Member Posts: 602
    Shakur its working fine here:
    GS Creator 10.3
    Mac running System 10.8.4
    I even implemented it in my latest App I am working on. Nice touch.

    BTW Bist Du in Deutschland?
  • ShakurShakur Member Posts: 43
    @JoeMeister
    Thanks, I got it fixed. It was my fault.

    Quite off topic: z.Z im Ausland
  • JoeMeisterJoeMeister Member Posts: 602
    Alles klar. Good Luck.
Sign In or Register to comment.