230 likes | 405 Views
Iain Gilfeather. Advanced Racing Game AI in PURE. Race Management. What happens if we don't manage the race? AI either too good or too bad AI won't react to the player's mistakes Necessity of race management mechanisms Make it challenging for anyone Adapt to different situations Fun.
E N D
Iain Gilfeather Advanced Racing Game AI in PURE
Race Management • What happens if we don't manage the race? • AI either too good or too bad • AI won't react to the player's mistakes • Necessity of race management mechanisms • Make it challenging for anyone • Adapt to different situations • Fun
Rubber Band • Big rubber band around the player forcing the AI players to be around him • (Usually) Using any means necessary • Rubber Band: • Pros: • Works almost always • Removes completely the ‘lonely racing syndrome’ • Cons: • Usually needs cheating • It’s easy to spot, so it breaks the illusion of fairness
Skills • Represent how well a player performs on a particular behaviour/gameplay aspect. • 1 Skill per player per behaviour • Eventually all behaviors have the same skill value • Skills are normalized (to the [0..1] range) • They could also be used to represent personality • Original approach to difficulty: static skills
Skill Porperties • Broad Range: if not broad enough we won’t be able to cover all the user cases • Responsiveness: using small increases normally so we want it to have small steps too
Dynamic Competition Balancing • Static skills during the race didn’t work well • Either too hard or too easy • Lonely racing • Dynamic Competition Balancing (DCB) is a system that modifies the skills dynamically during the race according to some rules • Tries to match the player's skill
Dynamic Competition Balancing • The first approach tried to match the player index with the leaderboard position • Way too inflexible • Didn’t work that well • We then introduced the concept of groups • Divided in group heads and members • Members follow the head/heads in order • Didn't work neither • Groups too loose or no groups at all • Lonely racing
Race Script: Summary • It’s the final method we used in the game • This Race Script concept includes not only the definition of the script itself but part of the implementation • Fixed the lonely racing sensation, the groups mechanism and it didn’t feel the AI was cheating.
Race Script: Definition • This is the part implemented by designers • It'll be a document explaining how the race should ideally develop under different circumstances: • The different player abilities must be reflected in the document • It's important for designers to understand that the race depends heavily on the player's performance • It’s not a strict script, just some guidelines for the race
Race Script: Example • Example from Pure: the ideal case • 3 groups: head, middle, back • Head and middle group leave the player behind at the start • Player goes progressing and jumping from one group to another • Some AI riders will jump with the player • At the middle of the last lap the player is in head position and the AI will be more forgiving from now on with his errors
Race Script: Implementation • The main idea is to use distance as the main rule for the DCB. • Every rider is aiming to be at a point X meters in front of or behind the human player • The skills of the rider will vary according to the distance to the aiming point, not to the player • Grouping players is achieved by giving them similar aiming points • The point may also move during the race • Thus we can have groups that progress during the race
Race Script: Implementation • From the player’s perspective it’s him who progresses through the groups • He doesn’t know we are making it easier for him • It’s subtle and rewarding • Main 2 differenciation points from Rubber Band: • Skills limited to a certain range • Follow the Race Script (not all around the player)
Race Script: Other mechanisms • Other mechanisms were used to ensure the game worked as desired • AI will have 1 skill at the beginning of the race • They need to make some distance from the player to ensure the initial groups • It's a complicated a very crucial moment for the AI • Too many cars/bykes • Some difficulty modifier based on the lap • Some people found it too easy at the beginning • Each lap is a bit easier than the previous one • This is very small (0 at the end)
Race Script: Other mechanisms • An 80% of the race is used to interpolate between the initial and end aiming positions, the 20% final uses the last positions. • Is consistent with the script • Otherwise it may be too difficult and unforgiving at the end • The AI riders will stop to improve their skills in the last meters to give make the first position even more accessible to players • Even with previous measures the AI was sometimes hard and unforgiving in the last meters
Other genres • I think this mechanism could be used in other genres • More control to the designers over the difficulty • You only need 2 key elements • Skills • Script • And an idea of how to implement it
Conclussions • I think we achieved our initial goals: • Have challenging, fun races • No lonely racing • Subtle and rewarding • Coherent groups throughout the race • This method may be easily adapted to any other kind of racing game