How do you make a character bounce?

I want to make a game kinda like this one (I used to play it when I was a kid)
http://games.disney.com/disneychannel-fish-hooks-freshwater-bounce

the kind where you use your mouse to control a bouncing character.

I've drawn all my characters, props and backgrounds...
The problem is...I can't get my actor to bounce! It's supposed to look something like this: http://arcade.gamesalad.com/games/127254

but instead of the arrow keys I want to use the mouse to control the character.

How do I do it?

guys it's my first time using gamesalad don't make fun of me... I do art, not game-building!

but it's fun tho

I've made a bunch of chibi sprites and I'm using them as characters cuz I want the game to look pixelly and cute.

Thanks for your help! <3

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2016

    Constrain the Y position to:

    A *sin((self.time *B)%180)+C

    Where A is the height of the bounce, B is the speed of the bounce and C is the centre position of the bounce.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Depending on the actual effect you want you might be able to get it by adjusting the Bounciness of the player actor and the platforms too.

  • IceboxIcebox Member Posts: 1,485

    @Socks said:
    A *sin((self.time *B)%180)+C

    He said he's new lol :)

  • IceboxIcebox Member Posts: 1,485

    @cmykidd I attached a demo hope it helps

  • SocksSocks London, UK.Member Posts: 12,822

    @Icebox said:

    @Socks said:
    A *sin((self.time *B)%180)+C

    He said he's new lol :)

    They've got to learn :) :smiley:

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @Socks said:

    @Icebox said:

    @Socks said:
    A *sin((self.time *B)%180)+C

    He said he's new lol :)

    They've got to learn :) :smiley:

    :D

Sign In or Register to comment.