Player follow as seen in Donkey Kong Country 2

Started by
2 comments, last by Khatharr 7 years, 7 months ago

I am trying to figure out the simplest solution to do a Donkey Kong Country 2 -like player follow.

Here is a video of what I mean. The way Diddie follows Dixie.

Does anyone have any idea how to achieve this the most simple, clever way? Replicating player movement input is not good enough, because of moving platforms, and interaction with the world that can change the main player position and velocity.

Thank you in advance!

Advertisement

Replicate player movements while also adding pushing the follower towards the player, based on distance, and stop replicating player movements if within a certain distance?

This way the follower will do what the player does, but just a little bit faster, and if the player jumps on a platform/gets away from the follower, it will correct itself mid-jump to make sure it reaches the player.

I'd suggest downloading an editor for it, and trying to reproduce edge cases to see how they handled it

http://www.dkc-atlas.com/forum/viewtopic.php?f=37&t=1325

Maybe set cases where you follower can't follow, and see how it's resolved.

That's a good idea. Btw how would you do the replicate player movement part? Collect the last few player input in an array, and feed these inputs to the follower with a delay?

Looks like it's got a few techniques that it's delegating to based on distance from the player character. If it's too close it backs away slowly, if it's slightly too far then it plays back recorded player positions, if it's significantly far then it just approaches the player as quickly as possible.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

This topic is closed to new replies.

Advertisement