How do you heighten competition in racing games without making the AI seem unfair? In this feature, Black Rock programmer Eduardo Jimenez goes in-depth to reveal the company's AI tactics for the critically acclaimed off-road racer
Pure.
When developing
Pure's AI, Jiminez and his team not only had to make sure they provided computer-controlled opponents who could match different players' skill, but also make sure players didn't spend too much time racing along without any nearby competitors.
One solution the team considered is rubber banding, a system that maintains the tension and thrill of the race by keeping AI characters around the player. To do this, the system reduces the velocity, cornering skills, obstacle avoidance abilities, and other characteristics of the AI characters in front of the players, while increasing the skills of those behind them.
"Usually rubber band methods rely predominately on speed changes, and so are often criticized because it's obvious when AI riders are going superhumanly fast or brain dead slow.
This method is very effective, as it keeps players surrounded for the whole race. It has an important downside: it's not fair, and that unfairness is easy to spot. It can easily break the illusion of fairness in the race. No matter how well a player does during the first 75% of the race, everything is decided by how they perform at the end. A single mistake in the last section can cost the player the whole race.
On the other hand, no matter how many mistakes the player makes at the beginning, there is still a chance of winning the race. The result: players can get frustrated and feel the competition is not fair. Given all this we rejected using rubber band."
The team eventually settled on a "race script" concept that covered all possible scenarios, taking into account that the player's skill might be greater than the best AI-controlled opponent, lower than the worst AI-controlled opponent, and at specific points somewhere in between.
"Races don't always follow the ideal script, in other words, as they depend on the player's performance. The script forced the designers to think about that fact and how the game should behave on those occasions. The script is only a guideline, then, not a strict, linear script to be followed. An example of what this script would look like could be:
'If the player is as skilled as the top AI characters, the race will start and soon after the start he will be at the front of the back group of AI competitors. Then he will escalate positions throughout the first 70-80% of the race. When he is progressing to the next group, some AI characters will jump with him to try to avoid him feeling alone in the race. He should be fighting for the first position the last 20-30% of the race.
The guys in the first group will make it a little bit easier for the human player to get in first place being more forgiving with mistakes, especially in the very last part of the race. This way it will seem like he has worked his way through the race, and even if he make a mistake in the last part he won't be so punished for that. This is the main script for the race.'"
You can
read the full feature, which includes details on how Black Rock implemented its "race script" to combat "lonely racing" experiences in
Pure (no registration required, please feel free to link to this feature from other websites).