Blob Companion with Platform behavior - capx

  • Hey guys, this is my first post around here, and this is also my first game project. I need some help <img src="smileys/smiley1.gif" border="0" align="middle">

    Basically I created a companion based on the "fairy companion" tutorial, but with a platform behavior added to it. This sprite, named as "comp" needs to act like a "blob jumping thing" (as seen in the game A Boy and his Blob) and follow the player through the platforms.

    I'm having issues with the way it acts though, I've set two instance variables "following" and "standing", that works according to Player bounding box imagePoints distance and collision. I need the "blob" to smoothly stop "bouncing/jumping" while it gets closer to the player.

    The logic I used behind it is probably wrong or too clumsy (the blob thing only jumps/bounces because it was set to follow an image point high above the head of the player (lerp(self.y, Ytarget, dt)), and the gravity of the platform behavior keeps "pulling" it down.

    <img src="http://i1238.photobucket.com/albums/ff490/murilokleine/Blobplatform.png" border="0">

    Also, I'd need help to move the "comp/blob" to an image point next to the player on R pressed, so I've set "keybord-> on R pressed-> set position...." but its instantly moved. I'd like it to smoothly reach its position next to the player. It would be awesome if the blob could jump to high platforms and not fall in every gap too.

    Well, I can't express myself correctly in english, so enough with the clumsy text, here's the .capx

    capx_file

    (use W,A,D for moving the player)

    Thanks a lot for the help!

  • hmmm anyone? <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Rather than have the blob character move straight to the image point, have the position moved toward the image point every tick by a few pixels.

    For the bounce behavior, decrease the amount of bounce depending on the distance from the player. There's a distance equation in the System object that can help with this.

    Hope that helps some! I did like the game boy and his blob, but never did beat it

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply sketchee, but I think the first condition you mentioned is already applied. :)

    As for the bounce behavior, how can I decrease the amount? I didn't set any variables to make the sprite bounce, it's just the result of the blob character following an imagepoint with platform behavior enabled(to the blob). Can you please explain further? I'm posting a printscreen of the event sheet group related to the blob character.

    <img src="http://i1238.photobucket.com/albums/ff490/murilokleine/eventsheet.png" border="0" />

    Is it possible to achieve better results with physics maybe?

    Thanks man!

  • anyone else? ^^

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