The start of the Fixture Engine

What is a Fixture Engine?

The Fixture Engine, as one may expect, is the heart of any Sports Game. It’s responsible for calculating the result of any fixture and producing the stats of the players involved.  It has to be accurate and it has to be enjoyable.

Choosing what type of Engine

It was clear from the start that any type of 3D engine was not possible for a variety of reasons. Even so, I still felt the Fixture Engine was one of the the most important parts of Football GM.

For a sports game simulator there are two main ideas for this engine:

  • A Statistical Engine
  • A Engine based on the player’s actions/movements. – which can then been displayed to the user (in Football GM‘s case in 2D).

The Statistical Engine, as the name may suggest, is based on real life Statistics. For example the real life average for a RB in a certain game situation against a certain defence might be 3.5yds. Extrapolating this over the entire game, and an entire season produces a very realistic statistical result.

There are however drawbacks to this method, significantly the user is just told the result of the play, there is no way for them to “see” the play as it develops (you could show a predefined diagram of the play result, but that’s not the same).

The other method is to create an engine which calculates the movements/actions of every player on the field in such a way that we get results which are realistic. It’s a lot harder to tune this type of engine to get statics which are realistic, but I feel the benefit to the user are enormous – for one the player’s position on the field can be shown to the user at any time.

I decided that for the user the attraction to see the play develop was too much to ignore, and so – unfortunately – the statistical only engine was not an option.

The Start of the Engine

Having decided upon the type of engine would be used, the first thing to do was create the basics: Define the constructs of the field (e.g how long/wide it is) and make the player’s move around in a realistic manner. For this I created a simple 40 yard dash test. Using the player’s attributes (detailed in an earlier post) I got to the stage where players would run the 40 recording the same times as one would expect in real life for that player.

40 Yard Dash Test - Jan/Feb 2013

40 Yard Dash Test – Jan/Feb 2013

40 Yard Dash Test - Jan/Feb 2013

40 Yard Dash Test – Jan/Feb 2013

From there I could gradually expand what players could do. Running in a straight line became running back and forth, or players chasing each other. Ball physics were created so when a player kicked/passed the ball it would travel realistically. Player’s actions would expand, so they could get into a huddle, wait until everyone is in the huddle, talk for a while then walk into the chosen formation.

40 Yard Dash Test - Feb 2013

40 Yard Dash Test – Feb 2013

Around June 2013 the engine was in a stage where it played a (very, very) rudimentary game of football. However, as can be seen it was still a way off being complete at this stage.

And the engine as of September 2013:

Match Engine September 2013

Fixture Engine September 2013

Feel free to leave your questions and comments!

Advertisements

Attributes – Generation

Attributes

One of the most important aspects in a sports game is the attributes of the players involved. Whether it be speed, strength or how well they can catch the ball, the attributes will give a clear indication to the user how good the player is, and are crucial to the Fixture Engine.

The realism of the Attributes are also vitally important to the user. When you start the game you want the attributes of real life pro bowl players to reflect that fact;  If when you started the game Peyton Manning’s attributes were no better than an average 3rd string QB, all realism would be lost and most likely you’ve probably lost the attention of the user before you have even begun.

The Problem

Football GM currently contains around 4500 real life, active players when you start the game (8000 players if you include those retired), so researching all these players and inputting their attributes manually would be too much work (not to mention the inherent bias and errors of manually inputting attributes). Some kind of automated system had to be developed to create realistic attributes for every single player, from MVPs, to players who spend every year in training camp but never make a final roster.

Automated Attributes

The solution was to created some extensive algorithms with takes extensive amounts of real life publically available data to generate attributes.
The algorithms will continually undergo improvements, however the results so far looking very good.

Attributes sorted by Rushing Power

Attributes sorted by Rushing Power

One important thing to remember with Football GM is that there is no single “magic” attribute which player’s of a certain position use. It is certainly (extremely) useful that a good RB have a good Running Power attribute,  but if he has little speed, agility, awareness etc then he will not be productive as you may expect.

The user also needs to take into account the current injury status of a player. A running back may have great running power, but if his knees are wrecked it would extremely risky using him extensively

Attributes sorted by Throwing Power

Attributes sorted by Throwing Power

Attributes sorted by Speed

Attributes sorted by Speed

.

The attributes range in Football GM is 1-100, where 1 would indicate a pre-college level of ability at that attribute (for example an Offensive Guard might be rated at 1 for the “Running Routes” attribute), while a 100 range will indicate perfection. There are currently no players in the database with a 100 rating, and even a rating above 90 would be extremely rare.

The attributes above are not final, and some may change if/when errors are found in the generator.

As always feel free to leave your questions and comments!

Early development…

What is Football GM?

Football GM aims to put you in the role of a General Manager of a Professional (American) Football franchise. Drafting/Cutting/Trading players, handling contract negotiations and – but only if you want – calling the plays on game day (we’ll pretend you are an egotistical GM who has appointed themselves as the Head Coach).

Why Football GM?

With my prior experience of Sports Management games, and my deep interest in Football the fit seemed obvious. However the story of the development of Football GM isn’t a short one and has been an on/off process for the last decade; Only starting to really ramp up in the Summer of 2012.

The Origins

While at University (around 2002) I created the very first prototype of Football GM for my final dissertation. The results were not great, and looking at the game now it doesn’t look too great.

Development ground to a half after a burglary in which all the code was stolen (this was before the day of cloud backups, and I foolishly left the CD backups next to the laptop).

The version first Football GM prototype c2003

The first Football GM prototype c2003

The version first Football GM prototype c2003

The first Football GM prototype c2003

The version first Football GM prototype c2003

The first Football GM prototype c2003

All remains of the Match (Fixture) Engine, unfortunately, were lost.

The Return

In early-mid 2012, and after continually requests to re-start the project from people who were aware of my original prototype, I decided to start afresh with Football GM.

The return of Football GM. cMid-2012

The return of Football GM. cMid-2012

The progress up until around early October 2012 was slow, the work focusing on the base code and data structures. The UI (as can be seen above) was truly woeful!

This changed in November 2012, when the UI underwent a complete overhaul – and hopefully for the better.

UI overhaul - November 2012

UI overhaul – November 2012

Refinements to the UI continued throughout the month.

UI overhaul - November 2012

UI overhaul – November 2012

UI overhaul - November 2012

UI overhaul – November 2012

Roster Screen

UI overhaul – November 2012

UI overhaul - November 2012

UI overhaul – November 2012

UI overhaul - November 2012

UI overhaul – November 2012

UI refinements continued up until around Christmas 2012, by which time the first database had been complete. Allowing for the first time real players and their real life stats to be in the game.

One of the first real players. December 2012.

One of the first real players.
December 2012.

And with that, we have reached around January 2013.
Feel free to leave your questions and comments!