Sign in to follow this  

Player follow as seen in Donkey Kong Country 2

This topic is 477 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

 

https://www.youtube.com/watch?v=ryM1lxnSjuM

 

 

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! 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

This topic is 477 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this