Drag to change scene perspective (is this possible?)

cnmeyer1980cnmeyer1980 Member, PRO Posts: 211
edited April 2012 in Working with GS (Mac)
Hi guys,

Is this possible?

Can you have a scene that's built up of a couple of layers that when you click and drag your ringer over the screen it changes the view slightly? 

For example, the scene maybe of a forest, by dragging your finger over the screen it slightly moves the perspective of the area?

I assume things would have to be linked to a camera so the camera changes with a touched invisible actor when moved?

It's a cool effect that I've seen in a couple of games, I was just wondering if anyone had attempted such an effect in GameSalad?

Cheers

Chris :)

Answers

  • joshuawildejoshuawilde Member Posts: 96
    like fez or super paper mario?
  • cnmeyer1980cnmeyer1980 Member, PRO Posts: 211
    Hi mate, nothing quite as elaborate as that really, just a scene that you can change the perspective slightly by dragging your finger over the screen, if you have elements on different layers, the perspective will change giving it a very subtle pseudo 3D look.

    I saw this displayed really well in a kids app I saw a while ago, I will see if I can get the name as it was a really cool effect, and maybe one that other GameSalad users would find useful too.

    Cheers

    Chris
  • joshuawildejoshuawilde Member Posts: 96
    i was actually thinking about the same thing earlier today. search rotating in the new section. i think they have something there.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I'm not sure what you mean, although its 6:44 am here and I've only had an hour and a half's sleep so it may just be me being dumb ;)

    If you can find a YouTube video or something so I can see what you mean, I'll have a go.

    Ace
  • cnmeyer1980cnmeyer1980 Member, PRO Posts: 211
    Hi Ace,

    Thank you for your comment.

    I didn't really explain myself very well at all, so dont worry, you're not being dumb :-)

    I've actually found an example on YouTube that shows what I'm wondering is possible really well.

    This example actually shows someone tilting their device to change the perspective, of you scroll into about 5:15 of the video, you will see the effect:



    If you want to swap details, we can have a go at working it out together if you like.

    Cheers

    Chris
  • cnmeyer1980cnmeyer1980 Member, PRO Posts: 211
    Hmm, well, I've spent most of the day trying to work out how to do the above, but am failing, I've tried attaching camera/images to accelerometer, and nothing appears to create a similar effect, which is a shame - if anyone else gives it a go, I would love to know how you get one as it would be a cool little effect.

    Cheers everyone.

    Chris
  • BarrytheBraveBarrytheBrave Member Posts: 134
    I have no idea how you'd do that but it's an awesome effect - kinda like stereoscopic 3d!
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    edited April 2012
    thats a 3d thing. I am highly highly doubtful you can do something like that with GS since its only a 2d SDK. I have seen a few pseudo 3d things done with gs but nothing to that extreme
  • cnmeyer1980cnmeyer1980 Member, PRO Posts: 211
    Hi @tenrdrmer, yeah, I thought as much, however, GS is a great bit of software and I reckon I 'may' be able to make a pseudo effect. If I do, I will post it on the forum so everyone can share.

    Cheers,

    Chris
  • pinata14pinata14 Member Posts: 150
    @cnmeyer1980
    you could do this, but it would have to be manual :P you would have to program every single actor in the scene to move a different amount/grow a different amount based upon their position (depth) so like a parallax background but way harder for every single direction and actor for every layer :P
    anyway good luck
  • simo103simo103 Member, PRO Posts: 1,331
    @cnmeyer1980 ... I recalled a 3D effect like demo template but couldn't find the forum thread. I had it in my GS files so I uploaded a copy here (on the right side - 3D City):

    http://www.funkymunkygames.com/GameSalad/search/
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited April 2012
    Here is a demo of one way to do it:
    http://www.mediafire.com/download.php?bh0aerheb088tuv
    Warning: it is a 3.8mb file (due to some unoptimized graphics) so it takes a while to download. It was an interactive book based upon Rikki-tikki-tavi I was doing last August.

    Basically the idea is to have each object have its own distance. (US inches for me.) Then when the device is tipped just enough, it sets off a moveto behavior using the formula:
    self.originalX -(1000/self.distance).

    Otherwise, when it is tipped back to level, there is a moveto behavior that moves the object back to self.originalX

    So, each object moves a little less as its distance increases. The 3D illusion seems better on an IOS device, rather than viewing it on a monitor.

    Maybe it will be useful?
Sign In or Register to comment.