If you click on a link and make a purchase we may receive a small commission. Read our editorial policy.

Under the Bonnet: SHIFT 2 Unleashed - 2

Slightly Mad talk AI, Helmet Cam and capturing the thrill of the race

In this concluding segment of Digital Foundry's extensive chat with Slightly Mad Studios on the development of SHIFT 2 Unleashed, we discuss topics as diverse as artificial intelligence and steering wheel peripherals, as well as more technical issues such as the move to a light pre-pass deferred lighting system and the limitations of the current generation consoles. Also coming into focus is the studio's attempt at capturing the visceral thrill of real-life racing via innovations such as the unique Helmet Cam.

Once again, many thanks to the following team members at Slightly Mad for the truly remarkable level of effort they put into making this feature happen: Andy Tudor (Design Lead), Ged Keaveney (Lead Programmer), Tim Mann (PS3 Lead), Jan Frishkorn (Vehicle Lead), Andreas Moll (Art Director), Doug Arnao (Physics Lead), Dr Stephen Baysted (Audio Lead), Rob Dibley (Render Lead), Peter Nicholls (Render), Stephen Viljoen (COO), Suzy Wallace (Producer).

We're returning to the interview right where we left off, so for those new to the party, part one of the feature can be found here.

Digital FoundrySome driving games receive a lot of criticism for the quality of the AI. What are the challenges in creating believable CPU opponents and how did you implement them in SHIFT 2?
Andy Tudor

The 'X' of Need for Speed: SHIFT really focused on 'the driver'. So when we were implementing the XP system we analysed all the actions a driver does on the track - so overtaking, drafting, taking the inside line, getting a good start off the grid etc. From those it was then pretty clear they fell into two categories - aggressive and precise. When we then looked at real-world drivers this 'aggression versus precision' was substantiated in their personalities - Schumacher vs Villeneuve or Gronholm vs Blomqvist.

When it came to the AI therefore, their profiles were created using traits that not only defined their raw 'ability' but their personalities too. So things like 'Risk Taking', 'Concentration', 'Grudges', 'Antagonism' and 'Adrenalin' were all present. We then made around 15 unique profiles that dialled up certain attributes - so there'd be an AI who was really clinical and avoided all crashes but then there'd be another who'd actively bash into you, one that would swerve out of your way if you drafted him, and others that made silly mistakes when cornering etc.

Within each race therefore you'd have a variety of drivers with different levels of ability and different reactions to you as a player. These were then playtested and tweaked and scrapped and redone and boosted right up to the last minute; the anti-vision being a funeral procession of cars that trawled around the racing line but one that recreated the kind of actions you'd expect to see playing others online - true gritty back-and-forth duelling.

When we were implementing the XP system we analysed all the actions a driver does on the track... overtaking, drafting, taking the inside line, getting a good start off the grid etc.

As we looked to community feedback after the release of Need for Speed: SHIFT however, we were given another perspective on the AI: players were having a great time racing only to be knocked off the track on the last lap by an aggressive driver and lose. Or they'd be driving side-by-side with the AI and they'd be trading paint with them in an effort to knock them off the racing line. Or they'd be approaching a corner and the car in front would spin out for no apparent reason.

In many cases, either an overly-aggressive opponent was ruining your race or they were appearing to do 'silly' things. Because there were a wide range of personalities in each race however these incidents were limited to a small percentage of the AI pack and instead of players identifying some as aggressive and some as precise, instead most were 'correct' and the rest were 'bugs' or 'idiots'.

So going forward into SHIFT 2 Unleashed, our aim was to remove the 'idiots' with a three-pronged attack... To streamline the number of traits that created their personalities in order to reduce the randomness effect, dial down or even remove the traits that caused either bizarre or harmful on-track manoeuvres, and focus more on their 'abilities' (defence, blocking, intelligence, passing, reactions) to achieve consistency and calibre within our AI. When you couple this with some matchmaking filtering to ensure 'aggressive' human opponents don't ruin the online experience too we think the pack racing experience in SHIFT 2 Unleashed is a lot of fun and so far, the reaction has been overwhelmingly positive to the changes.

An early concept for the Helmet Cam on the left saw the inclusion of distracting reflections on the helmet glass - this was removed in the final game. The new lighting system (right) allowed for effects such as the driver being temporarily dazzled by sunlight.
Digital FoundryHelmet Cam is a key addition to SHIFT 2; what did you set out to achieve with this and what problems did you have to overcome?
Andy Tudor

When we approached the cockpit cam in Need for Speed: SHIFT we knew it had to be fixed. Here's the most natural view for a racing game and no-one uses it. Why? Well a number of reasons - not all games have it for a start so you get used to going from one game to another using another (the favourite being Chase Cam). Also, it doesn't have a clear advantage like the others; the bumper cam gives you an enhanced sense of speed because you're very low to the ground, the chase cam gives you a greater sense of your surroundings, and the hood cam is a compromise giving you a great sense of speed plus the spatial awareness of how wide your car is. The cockpit cam therefore was kind of relegated to fourth place and it was very restrictive - with the area above the windscreen and the dashboard below it, it felt like driving with immovable widescreen borders and a smaller view of the world outside as if looking through a telescope.

We used a variety of techniques therefore to overcome these issues. The first was to allow you to look around the cockpit. We were crafting each one individually and the car artists were putting a ton of detail into them. With the lighting effects and variety of materials in use and the animations of the driver, this was a no-brainer to showcase this attention to detail. It also gave you freedom from being locked into that blinkered widescreen view - you didn't feel as constrained any more.

The next was to couple the camera to the physics in order to simulate the g-forces your body undergoes when accelerating and braking. This was key to the X of the "True Driver's Experience" and once again gave you a sense of freedom within those widescreen borders since they would now grow and shrink as you moved forward and backward in your seat.

We then used a variety of stylistic techniques from the first-person genre to further enhance the cockpit experience: at high speed the cockpit would blur out (similar to looking through the iron sights of a gun in Call of Duty) which really made your eyes focus on the road rather than the surrounding interior, and when crashing we simulated the disorientation of the crash by de-saturating the screen and blurring the edges (again, similar to a grenade going off).

The overall effect therefore was one where the player's perspective was constantly changing and was representative of both the physical and emotional experience you have when sat in the driver's seat. As with most new features of course, the strength of each component was raised and lowered and focus-tested throughout development ranging from the game being unplayable and people becoming motion sick to it being so subtle it was barely noticeable.

Richard Leadbetter avatar

Richard Leadbetter

Technology Editor, Digital Foundry

Rich has been a games journalist since the days of 16-bit and specialises in technical analysis. He's commonly known around Eurogamer as the Blacksmith of the Future.