
The work on the proper real time 2D engine began in the summer of 2005, after the initial European release of the NHL EHM 2005. The foundation of the new engine was modelled after the succesful FM engine, although the code was written completely from scratch. The work started out with coding of the physics engine to track objects, have them move around at given speeds, slowdown, drop, raise etc. A dynamic rink was coded to handle rinks of different widths and lengths to operate as the playing ground for the in-game objects. The early weeks were spent mostly honing the physics of a puck bouncing around the rink, with the puck set at a spot and then "fired" at the boards at different speed and angles. To compare with the previous versions, the new 2D engine simulates games in 0.2 second slices and tracks the positions of objects to within 1/10th of a foot (approx. 3cm). So time-wise, the game is simulating the action 5 times more accurately than the previous engine and the coordinate system used will track the puck and the players 50 times more accurately. So as you see, the leaps forward in the engine department are quite drastic. Not to mention what other advantages the newly built system had over the old engine, but we get to those later.
Once the basic physics engine, the rink and the puck was laid out, it was time to get some players involved. The first task was to simply get a player to enter the rink and skate around predefined waypoints, just to test out the physics and code in basic path finding methods. And so, one rainy evening, a goalie entered the rink. Once the first goalie learned how to move around the rink along pre-defined paths, it was time to put a skater in to do the same...and another one...and another one. And pretty soon we had a team of dots skating around the rink, doing an imaginary warm up.
Then it was time to take everyone out expect for the goalie and two skaters and code some basic AI for the skaters to retrieve the puck, the goalie to align himself properly to face the shooter etc. And bit by bit, different areas of the AI were added in until it was time to unleash full strength teams onto the ice, moving around in basic tactical positions and actively trying to make simple plays. This naturally required some coding to handle the coaching, roster management, and tactical side of things inside the 2D engine. And all this time, we’re still in a stand-alone mode, since the player data used is created on the fly to make “perfect” players. We’ll get to using real player data later on. For the time being, these generic players were used to add and improve the physics engine and the AI to handle things like bodychecks and other collisions. Funny memories from these times include teaching the players how to pokecheck the puck when it was in someone else’s possession. This lead to a jaw-dropping moment when a goalie made a save, but a forward reached in before the puck was properly closed by the goalie to pokecheck it in. Not because he meant to score really, but because his basic instincts (AI) told him to pokecheck. And that was just the beginning of what would be a wild ride in the development of the new 2D engine.