How to make a soccer manager match engine? Part 1


How to make a soccer manager game engine is perhaps not the most important question in the world, but for the fans of the genre it is the most important how (more or less) the engine works in their favourite game. Why? Because the realism and the intuitive laws of the engine is what makes even simple soccer manager game entertaining and, at the end, good.

Of course I'm not gonna give you the piece of software ready to use, but rather I want to give you hints based on about 25 years of experience in making such engines and some tips on how to avoid mistakes made by me or other manager games developers.

Absolute basics 
Match engine in soccer manager is not much different from what you can find in other genre, f.e. RPG or fantasy games. Each of the players selects his team for the confrontation and the two teams are compared to determine which one won. Those are the absolute basics that everyone know.  In early games of the genre hardware limitations were making developers to be creative, but often I found that those limitations gave them better ideas.

Player skills
Player skills in soccer manager game is topic worth dozens of books, but for the purpose of the basics we assume that player is described using only one parameter, called SKILLS that will cover everything. In most cases of the early soccer manager games it was the simplest and most effective way to describe player (not the best though) - complete amateur that has no experience would have value 1 and the veteran champion of the World Cup and with tons of trophies would have value 10. 

Start small and build up
As a reminder I will add at this point a great wisdom that is forgotten by so many modern game developers - start small and build up. Of course everyone wants to make a huge game, with tons of options, AI that will stun the world, but the best way to build any IT project is start with small goal and plan further steps when the bit you are working on is fully tested, so you won't have to track back and bugfix something important.



slightly annoying advert

free online soccer manager Football-o-Rama





Soccer manager match engine A
Based on that rule we will start with something so small and embarrassingly simple that some of you will stop reading the article right now. That kind of match engine was used in games on 8-bit computers (like Atari, ZX Spectrum, Commodore 64). Some people won't obviously admit it, but it was even used in some of the indie games on later generations of the genre.

You have two teams of eleven players, each with skills between 1 and 10, so match engine A simply make sum of the skills of all players in each team and compares the sums. That's pretty much it. The team that has more points wins, you add at the end some random generator to determine how many goals each side have scored, if they sums are equal or close to equal you call it a draw. If you want to make it a bit more interesting, you may introduce procedure that may in some cases give some advantage to one side (f.e. home side or to give the weaker side some chance to draw), but in general that is the most basic match engine that will work not only in soccer manager games, but for other sports or even the fantasy / RPG titles.

The procedure steps:
  1. sum skills on both sides,
  2. compare the two sums,
  3. generate number of goals for each side,
  4. determine win or draw.

As I said before it is so embarrassingly simple that anyone can come up with something better than that, not to mention that it does not even need computer to make the decisions - random factor has minimal influence. But keep in mind that simplicity is not always a bad thing - it is hard to make mistake inside a software that is so simple.

Pros:

  • very simple,
  • hard to f*ck up even for very novice programmer,
  • results are partly based on player skills.

Cons:

  • random factor is pretty high (there is no clear link between skills and number of goals scored or who scored them),
  • treats all players as mass without individual factors,
  • leaves no space for the impact of tactical settings.

 


 

Soccer manager match engine B
Match engine B is very similar to match engine A, but has one huge advantage - it allows the influence of team formation. That form of match engine was often used in games on 8-bit computers and even further, including some online games, and yes, I mean Hattrick, one of the most popular soccer online manager games in history.

Just like in engine A you sum skills of all players, but add them not to the sum of whole team, but to sum for each formation: goalkeeper, defenders, midfielders and attackers. This means that, comparing to engine A, it makes a lot of difference if you select 4-4-2 formation, 4-3-3 or 3-5-2, because each of them means that different part of your team will have more chances to overpower the opponents.

Unfortunately match engine B is a bit tricky - while in engine A you simply compare the sums for whole teams, here you will have the comparison of opposite formations, so you will compare home team defence with away team attack, midfield formations against each other and home team attack versus away team defence. What is so tricky about it? You will not get any particular result, you will get 3 different results of comparison, but how they influence the score is something completely different.

That is why engine B requires one more step - interpreter of what the comparison of the three results actually mean. It is unlikely that one team will have the advantage in all three formations (unless they are from completely different levels), but if advantage in defence and midfield mean that they are more likely to score goals? It is unlikely that sum of the attack players will be greater than defenders, since usually there are 4 defenders that will have to face only 2-3 attackers. How important it is for team to have advantage in midfield.

The procedure steps:
  1. sum skills on both sides for each of the formation,
  2. compare the sums of opposing formations (defence vs attack, midfield vs midfield, attack vs defence),
  3. interpret the meaning of all received results,
  4. determine how interpreted meaning includes goalkeeper skills,
  5. determine number of goal chances each side will get,
  6. generate the goals.

Engine B is still very simple, but is one of the first engines that include team formation in the calculations and, what is the most important bit, leaves the result open to interpretation. And that interpretation part of the software is what distinguishes well written engine from poorly written.

Pros:

  • simple,
  • allows influence of team formations,
  • results are partly based on player skills,
  • leaves space for interpretation of the basic sums,
  • leaves space for tactics elements.

Cons:

  • random factor could be high,
  • treats all players as mass without individual factors,
  • creating good interpreter could be hard.

part 2 of the article

1 comment: