how to make a sonic style spring

0 favourites
  • 6 posts
From the Asset Store
Hybrid Sonic Branding Kit is a business identity & motion graphics sound effects library.
  • I am making a small fan made sonic game and I am needing springs to get up to higher areas. How to I add physics to launch sonic on the angle that the spring is facing

  • That's not an easy question to answer. One way is to give the spring an instance variable with how fast it should launch Sonic (for example, "launchSpeed"). Then if you're using the Platform behavior, you can set Sonic's Vector Y to "launchSpeed*sin(spring.angle)" and his Vector X to "LaunchSpeed*cos(spring.angle)" (you might have to play with minus signs to get those equations right).

    If you use this method, it will be important to set Sonic's deceleration relatively low so you can really see him move at an angle. Also, you will need to shape the spring's hitbox a special way or find some other method so the spring only triggers when Sonic hits the top and not the bottom or sides.

    But overall, making a Sonic engine on C2 isn't very easy. There's one somewhere in the forums that works well, but if it were easier, I'm sure we would see tons of Sonic or Sonic-like games on the arcades. That said, don't let my nay-saying stop you.

  • are the springs all going to boost them the same amount? If so, could do something along the lines of, On Collisiion- Set Jump Height To (NewJumpHeight), Simulate Control - Jump, Set Jump Height (Original JumpHeight).

  • If seperate springs, I suggest the same but adding pick by UID, however pending what youre working with that may take up several events for several springs, which isn't always ideal.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here is a link to what I assume one of the posters above meant when he mentioned a sonic engine of sorts

    He even mentions wanting to incorporate/create springs eventually. Maybe you could ask him about it.

  • I am using this behaviour It work really well

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)