Mini Sports Franchise
Welcome To Our Sports Haven Please enjoy the site and look forward to a great seasons in all of our leagues & future ones as well

Join the forum, it's quick and easy

Mini Sports Franchise
Welcome To Our Sports Haven Please enjoy the site and look forward to a great seasons in all of our leagues & future ones as well
Mini Sports Franchise
Would you like to react to this message? Create an account in a few clicks or log in to continue.

NHL 12 Blog

Go down

20110706

Post 

NHL 12 Blog Empty NHL 12 Blog




NHL 12: Sim Engine Blog
Posted by EA SPORTS at 15:35PM on Thursday, June, 30, 2011

NHL 12 Blog BOXSCORE_656x369

Welcome back for another Game Team development blog for NHL 12. I’m Brian Krause, a ‘game modes’ software engineer on NHL 12. I’ve worked at EA for over 20 years now, starting back in the day at a little Burnaby Software studio called ‘Distinctive Software’. EA came along and bought ‘Distinctive’ 20 years ago and the rest is history. Last year I wrote a blog about the big ‘Be A GM’ upgrade which was our RFA/UFA integration. This year, I’ll be talking to you about another massive re-write I’ve completed, probably the largest re-factoring of ‘game modes’ code since I joined the NHL team back for NHL 08.

Much like RFA/UFA, the target of my re-write this year has been something our customers have been asking for as long as I can remember. I’m happy to say that we’ve completely re-written our Sim Engine from scratch. It was a huge endeavor and has kept me busy for the better part of this year’s entire product cycle.

The new Sim Engine was developed entirely in C# (a programming language) which isn’t typically a language used for console game development. Using C# allowed me to quickly set up and prototype various aspects of our new approach without having to worry about integrating it into the consoles until a later date. Anybody familiar with the NHL Development team also knows who Gurndeep Sumal is, our resident stat junkie and all around walking sport encyclopedia. Gurn and I collaborated on prototyping and designing the Sim Engine brick by brick, layer by layer, so that after many months of development, we could prototype any action in a hockey game, and analyze the results using graphical and statistical harness/outputs to ensure we received realistic stats.

NHL 12 Blog Crosby_PTS_Leader520
Every statistic and result that the Sim Engine creates is based entirely on the ratings and playing styles of the 12 (or less, in the case of penalties) players on the ice at that time. Who takes a shot (or who gets Hit, or takes a penalty, etc) is based entirely on their attributes, which makes the results very dynamic, but also true to life. I’ll walk you through a simple scenario from a Face Off to a shot on net, and highlight the decision making that goes on ‘under the hood’ to ensure that the game flows in a logical manner.

1. Game prepares for a Face Off, both teams (assuming it’s not an icing call) have a chance to determine the players on the ice for the coming face off. Each team will field its roster of players based on awareness of the score, face-off circle, and how long the current players have been on the ice. A determination is made as to whether either center behaves in such a way as to require the ref to eject them from the face off, and bring in the left or right winger instead.

2. A face off winner is determined based on the ratings of each player involved and the location of the face off. It’s not a ‘coin toss’, players skilled at winning face offs in the real world will win the majority of face offs in the Sim Engine. This same correlation applies for all stats we generate.

3. Based on the attributes of the puck owning team, and the defensive team, a certain amount of time will be required to set up the ‘next play’ and prepare for a shot. The greater the defensive abilities for the team without the puck, the greater likelihood that the puck will be turned over, or poke checked away before a shot may be taken. Teams on a power play will have a distinct advantage in this case, as like in real life, they’ll always have one extra player contributing to the abilities (ratings & number crunching) of their team, vs the short handed team.

4. Assuming the puck is not turned over, a determination is then made as to who will shoot the puck, based on the players on the ice who currently have ownership of the puck. By using various real life sources which we’ve modeled our data on, we know that in any given roster size situation, the Center will take percent of the shots, the Left Winger will take percent, and so on. Let’s assume that we decide the ‘Right Wing’ takes the next shot.

5. Now we use other real life data to model where the shot comes from, given that the player is a Right Winger. We know (by using various web sites that track these things) that typically a RW will shoot from location , percent of the time, and shoot from location , percent of the time, and so on. The choice for shot and locations are affected by whether the team is even strength, on a power play, or is short handed.

6. Once we know where on the ice a shot is coming from, we determine what type of shot it is. For example, shots coming from ‘the slot’ are more likely to be back hands, or snaps relative to shots coming from outside the blue line which are almost exclusively slap/snap shots.

7. Once we know that a RW is doing a from , we then chose the likely location to target the net, based on their angle from that spot, and defensive coverage, etc.

8. Once we determine the location on the net being targeted, and the type of shot, we begin creating our formula for whether the shot will go in or not based on the following factors.

a. The wrist/slap accuracy of the shooter.

b. The distance to the net.

c. Whether he is right or left-handed, and the zone being targeted on the net.

d. The quality of the defensive players on the ice, and whether they are likely to be ‘blocking’ the lane, or harassing the shooter.

e. The quality of the goalie in the zone being targeted (ie: five hole, vs stick high, etc)

9. Once we have this formula, we can determine one of five different outcomes, which take all the above factors (and more) into account.

a. The shot may be blocked by a defender.

b. The shot misses the net entirely, distance from net and location targeted feed into this.

c. The shot is saved by the goalie, but bounces free.

i. In this case, depending on the quality of both teams, we determine which team gets possession of the rebound, which may spawn another shot immediately, or clearing the puck out of the defensive zone.

ii. It is also possible for the goalie to get injured in this case, if it was a slap shot from players with ‘slap shot power’ greater than .

d. The shot is saved, and the goalie keeps control, forcing a face off.

e. The shot goes in, and the team scores. Yay!


This is a simplification of how we approached our development, but you get the idea. EVERYTHING that the Sim Engine spits out this year is based on more robust computations and analysis similar to what I’ve outlined above. We do the same type of things for determining hits, penalties, injuries, who gets assists, how long each player stays on the ice, and so much more.

Because we did the development in C#, we have the ability to simulate many thousands of games in under a minute and then analyze the entire results in various ‘harness’ features to see if we got the right mix of penalties, power plays, short-handed goals, power play goals, ejections, injuries, shut outs, blow outs, penalty shots, over time wins, shoot outs, backup goalie starts, pulled goalies, empty net goals, etc, etc.

NHL 12 Blog Luongo_WINS_LEADER520
I also integrated all of our leagues into the Sim Engine as well, meaning we could simulate a game between the Vancouver Giants of the WHL, and the Vancouver Canucks, for example. Each league has its own schedule, so we can simulate a WHL schedule (for example) and ensure that the right players in the WHL are getting the lion’s share of the goals, or penalty minutes, etc.

After all of the C# development was completed, I ‘ported’ the Sim Engine over into our game consoles, so that we could get the exact same statistical results on the PS3 and 360 that we would when running thousands of games on my (or Gurn’s) PC. The C# development allowed for a result we never could have achieved had we developed the Sim Engine only by resolving games on the ps3/360, for example.

There is another ‘big win’ coming down the pipe relating to the Sim Engine that you’ll all hear about shortly (I can’t discuss right now), but it will forever change how you play our game, and what you get out of our modes. I’m very excited for the product we are delivering this year.

Thanks for your continued patronage, and loyalty to our product. I wouldn’t be here, if it wasn’t for you, and I LOVE my job.


Brian Krause

Back to top Go down

Share this post on: reddit
- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum