Get Controls Like Doodle Jump :)

JoshKahaneJoshKahane Member Posts: 470
edited November -1 in Working with GS (Mac)
Hi

So as we all know Doodle Jump controls are very responsive and work a charm. My game iFall needs similar controls. I want to use the accelerate function to get that sense of speed but I also want it so that you can quickly switch directions without waiting to slow down. How can I achieve this?

Thanks.

Josh.

Comments

  • EastboundEastbound Member, BASIC Posts: 1,074
    I used changing the X value and it was very efficient. Just set the X to X+(15*accelerometer.x)
  • JoshKahaneJoshKahane Member Posts: 470
    Sorry Eastbound I lost you. Where about do I enter this? In the accelerate rule?
  • synthesissynthesis Member Posts: 1,693
    Sounds like a constrain attribute.
  • JoshKahaneJoshKahane Member Posts: 470
    No move rules of any sort then? No 'if accelerometer = > 0.1 move in direction 0 acceleration speed 100'. None of that? Just one constrain rule will do left and right? Sorry I am slightly confused.
  • synthesissynthesis Member Posts: 1,693
    Use a realtime calculation. Track your X and Y location of the object and manipulate that with the accelerometer then feed the updated value back to a constrained attribute.

    In other words...
    1) Track the realtime X and Y location of the "doodle".
    2) Get the acceler. input and feed that to the doodle position.

    I think this is what Eastbound is saying.
  • JoshKahaneJoshKahane Member Posts: 470
    Got it! Thats excellent it really is! This gives me a reason to play with he accelerometer controls now over on-screen. Thanks guys.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    does this work with the upward acceleration in the jumping?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    not working for me. did you use a constrain? or a change attribute with a timer?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    never mind, contrain works prety well. nice tip eastbound - thanks a bundle!
  • lloydowenlloydowen Member Posts: 78
    Sorry guys, but could you help me with what Eastbound said i can't seem to determine what to do in GS. Thanks!
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    constrain attribute self.position.X to self.position.X+(15*accelerometer.x)
Sign In or Register to comment.