RPG catapillar logic

Started by
2 comments, last by Dko 14 years, 3 months ago
A simple question. Does anyone know of a write up of the logic that goes into having a sprite follow another sprite like in a old 2d Role Playing game? Or could some one even tell me them self? Thanks for any help.
Advertisement
I think a lot of games just have the fellow party members just follow the exact path the player walked, only at some timed delay. For example, PartyMember1 could wait one second, then start doing the exact same thing the Player did. PartyMember2 could wait two seconds, then start doing the exact same thing the Player did. Just keep a buffer that holds two seconds (or whatever the max delay you'll be using is) worth of input from the player, and use that buffer as the input for the party members' movements.
In particular, a ring buffer would be particularly useful. Just keep adding actions/locations of your lead character as suggested by Samith.
Hemm that might do the trick. Thanks

This topic is closed to new replies.

Advertisement