Game Design - How to implement Vine-like swinging?

0 favourites
  • 10 posts
From the Asset Store
Fly Bound
$2.49 USD
Design for game, asset for game, game kit, UI design, completed design for game FLY BOUND
  • I'd like to implement a stage gimmick into a platformer.

    Grab a vine, swing across it to the tip, then launch off the end.

    I sketched out the idea below

    Mario Galaxy 1 also has a similar mechanic in 3D.

    Subscribe to Construct videos now

    (skip to :57)

    How could you implement this in-game?

  • I would probably use a timeline for this. When the character collides with the vine, disable Platform behavior, start the timeline. You will need to move the character above/below the vine on z-axis during the playback.

  • I think calculating the path in a more dynamic way could be possible too. A reason for that could be you want the spinning to start where you first grabbed the vine, or if the shape of the vine is dynamic.

    The first step would be to have a curve fit the shape of the vine, then find the point on the curve that was grabbed.

    After that it’s a matter of moving along the vine, and the spin is done by moving along an angle perpendicular to the vine with a distance of 32*sin() or something. You can use cos() for the zelevation or use it to change the zorder. Finally when the end is reached you’d enable the platform behavior and set the speed.

    The coiled path around the vine could be refined further by doing some relaxation filter or something. Maybe overkill but it seems to kink a bit otherwise.

    I’ll finish up an example tomorrow and see if I can simplify the solution further. At this point I only have twisting around an arbitrary path.

  • Looks like he found a a nice solution. My guess it’s a nice animation and it moves along the vine segments. Not bad.

    twitter.com/PD_CGT_games/status/1708700907238539702

  • Lol yee I ended up workshopping a dynamic solution by making a string indicating the bends the vine takes, then tweening the player along that path. Gotta change around some conditions so there isn't a 1-frame pause between tweens but otherwise happy with how it looks

    x.com/PD_CGT_games/status/1708599992380703109

  • Yeah, that looks pretty good. I wish I could knock out good art that quick.

    Here's the idea I was working on. It needs to be reworked to handle multiple vines and the transfer of momentum when grabbing the vine needs tweaking.

    https://www.dropbox.com/scl/fi/selt7na61fdxs7xkw7zx2/rotate_vine.capx?rlkey=qcom7w4ienynvdjen2r68oyza&dl=1 
  • the dropbox link isn't working for me :/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm this forum broke the link. Copying it from the code block seems to work.

  • Ah, this version is really cool, I like the way the player object physically orbits around and behind the vine, mine just follows the path and uses an animation to convey spinning.

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