Director of Football

Show off your games, demos and other (playable) creations.
User avatar
BOT-Brad
Citizen
Posts: 87
Joined: Tue Dec 02, 2014 2:17 pm
Location: England

Re: Director of Football

Post by BOT-Brad »

SiENcE wrote:I would be interested how do you simulate the matches? What approach to you choose to simulate this complicated game.

thx.
Right now, each team has 3 stats: defence rating, midfield rating, and attack rating.
I then get the difference between the home teams attack rating and the away teams defence, the same for the away teams attack minus the home teams defence, and then the difference between the midfield of both teams.

I then assign a random fluctuation to all 3 values, just to make things a little bit more interesting.
Each value is then weighted according to a weight value (for attack it is currently 0.05, for midfield it is 0.04) which gets things normalised and converted into percentage chances of scoring a goal at any minute. There is also a slight attack boost added too, purely because otherwise games can tend to be very low scoring.

Once that is done, you are ultimately left with two percentages (usually around 1% - 3%), which are the chances of scoring at any minute. The game then steps through every minute and scores a goal if the RNG produced the required values.

There is also a slight scoring boost to the home team, to compensate for the fact that the home team will generally score more goals than the away team.

Ultimately all this combines to produce a pretty nice simulation from just 3 statistics. It produces some interesting upsets, some high scoring games, some dull games, and some standard results you would expect.

The actual match engine used for player games however will run slightly differently, using basically the same system, but will also simulate possession, shots, corners, etc. I already have an outline of doing this in my notebook, but have not implemented it just yet.

EDIT: Here are the functions used in the engine.lua class used to simulate games.
Follow me on GitHub! | Send me a friend request on PSN!
User avatar
SiENcE
Party member
Posts: 805
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Director of Football

Post by SiENcE »

Interesting.

Do you want to use real team and player data?
User avatar
BOT-Brad
Citizen
Posts: 87
Joined: Tue Dec 02, 2014 2:17 pm
Location: England

Re: Director of Football

Post by BOT-Brad »

SiENcE wrote:Interesting.

Do you want to use real team and player data?
I have no plans to. Maintaining real player data for even just 1 league would be very time consuming, let alone supporting potentially many more than that. The game currently has 14 leagues to choose from, and more will be added from different nations over time.

I am toying with the idea of letting you somewhat 'build' your initial starting team however, so you could rename your players and set their stats, obviously with some sort of caps in place so you dont just make your entire team 99 rated. :nyu:
Follow me on GitHub! | Send me a friend request on PSN!
User avatar
BOT-Brad
Citizen
Posts: 87
Joined: Tue Dec 02, 2014 2:17 pm
Location: England

Re: Director of Football

Post by BOT-Brad »

Progress on the game has been a little slow the past few weeks. I did a little prototype of my new match-centre game engine in a seperate repository, but somehow a niggling bug that would occasionally produce RIDICULOUS results crept in. I am unsure whether it is actually a bug, or a flaw in my actual system. I will think it over some more and hopefully begin making more progress within the next few weeks.

Right now I am apprehensive to continue adding new stat screens and gameplay features until the match-centre game engine is working properly, especially because I have yet to decide exactly on what stats are used and stored, and also exactly how much information is stored on players and their abilities. Should players have loads of stats such as Shooting Rating, Passing Rating, Strength Rating, or just a single rating? Of course I would like the more complex approach, but that introduces new headaches and problems. We will see!
Follow me on GitHub! | Send me a friend request on PSN!
User avatar
BOT-Brad
Citizen
Posts: 87
Joined: Tue Dec 02, 2014 2:17 pm
Location: England

Re: Director of Football

Post by BOT-Brad »

Thought I would post a little update here as it's been a few months since the last one.

The GitHub updates have stopped because I moved to a new dev laptop and for whatever reason GitHub wouldn't re-link the project back together without hundreds of errors and headaches. I am a bit of a Git/GitHub noob so maybe/definitely I just did something wrong.

The project continues on however! Unfortunately I hit a bit of a brick wall with the amount of data & assets I was storing in memory after a few seasons simulation, so I had to re-work a lot of the internal cache and memory management system with a fancy new pre-loading system which works quite nicely right now, and has improved memory usage quite considerably. Aside from the actual current state of the game, I have been working a lot on getting a rudimentary "game guide" written up, which is shaping the game mechanics and how exactly the game will play. I have come up with lots of new ideas and systems which haven't yet made it into the game, but will be slowly added.

Hopefully I will have some more updates to show you guys soon and some new screenshots!
Follow me on GitHub! | Send me a friend request on PSN!
User avatar
SiENcE
Party member
Posts: 805
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Director of Football

Post by SiENcE »

Hey,

i had the same problem with aeon after a couple of month. I also had to rewrite the asset loader. Currently I use https://github.com/kikito/love-loader . It has a minor bug, but works quite well. I have a gametemplate to showcase how i used it together with states and texture atlases.

https://github.com/SiENcE/love2d_gametemplate

good luck!
User avatar
BOT-Brad
Citizen
Posts: 87
Joined: Tue Dec 02, 2014 2:17 pm
Location: England

Re: Director of Football

Post by BOT-Brad »

SiENcE wrote:Hey,

i had the same problem with aeon after a couple of month. I also had to rewrite the asset loader. Currently I use https://github.com/kikito/love-loader . It has a minor bug, but works quite well. I have a gametemplate to showcase how i used it together with states and texture atlases.

https://github.com/SiENcE/love2d_gametemplate

good luck!
Yes, I am actually using a modified version of kikito's love-loader myself! I have been mostly working on UI stuff over the past week or so, however I recently got a new job so things on the DoF front have been a little slow!
Follow me on GitHub! | Send me a friend request on PSN!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 5 guests