Public Group

# Looking for pointers to chasing algorithm

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

## Recommended Posts

Dear all,

I was wondering if anyone could give me some pointer for the following project. I am creating a real-life running game with the arduino platform, in which the runner is wearing a wristband that gives the illusion that he is being chased. Although it is an arduino project, my question relates to the game programming side of it, which is why I was hoping people here might be able to help.

In the game, runners have to get to a finish line (say 3 km / 2 miles from starting point) and not get caught by the pursuer, who is behind him. At the start, this pursuer could be anywhere between 500m and 50m behind the runner (depending on the program). It is one-dimensional, in the sense that it doesn't matter which direction the runner is going in, his speed is used to determine how much distance he is covering. So basically the only input into the system is the speed of the runner.

I have little to no experience with algorithms that could determine different strategies for the pursuer. Basically the only outcome of this algorithm should be the speed of the pursuer, so I imagine it doesn't have to be too complicated. I want to find a strategy that gives the best type of game experience. For instance, the speed of the pursuer should be proportionate to the speed of the runner: if the pursuer is way too slow for the runner, there will be no excitement, if he is way too fast, the game will be too difficult. But the speed could not be completely proportionate to the runner's speed, that would be too predictable.

I don't really know where to begin. So I'm looking for any article, book or tutorial that covers this type of problem. I have tried google and forums, but I don't really know which search terms to use. Anyone an idea? Thanks in advance!

##### Share on other sites

In racing games, the 'cheating' that makes races exciting is called rubber banding.

When done crudely, it can be quite obvious (my 7yo daughter noticed rubber banding for the first time when playing a game recently!). There's a good article on gamasutra by the guys who did the AI on Pure : http://www.gamasutra.com/view/feature/132313/the_pure_advantage_advanced_.php?print=1 although if your design calls for the pursuers to always stay behind you, then you options are rather limited.

##### Share on other sites

Thanks for the replies, the rubber banding phenomenon seems very interesting, I will definitely investigate this further. Paradigm Shifter, were you talking about the same idea?

Does anyone else have different ideas?

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634134
• Total Posts
3015742
×