Football simulation manager WIP

hi all,

I want to create a simple football manager, have already tens of mind maps of what should be there (if they could help in directing me, i will post them here), but dont know how to start some prototype design of the game and there were no other games like manager in the forum (at least i didnt find)

i will start the MatchEngine library which should handle one match with temporary teams and players, but i dont have any clue at the start… dont you know some principles how to do something like this, or at least how would you design the app? i dont need any (uml) diagram (but they are welcommed), just some clues or some articles/books of something similar?

I dont know how to implement the saves, the db of all informations and the graphic either. No need of animation, it will be mainly textbased, where time will pass in the match but the weeks will be turnbased (like any manager or most sports game)

thanks

I’m not much of a Sports guy, but I do know you could probably handle the teams with ArrayLists of Player objects, in which can have predetermined/set/random stats depending on what you want. That’s only if you want, though.

Other than that, if it’s mainly text-based, you can probably just use Javas in-built graphics (Java2d/Graphics2d)

Implementing file management is just a matter of learning how to read and write them in Java. Which, you can start with here:
http://www.javapractices.com/topic/TopicAction.do?Id=42

I hope this helps a bit.

It seems you have little to no understanding of java?

I suggest starting here

complemented with reading from
http://docs.oracle.com/javase/tutorial/getStarted/index.html

If you make it through both you will know everything you need to know. Goodluck!

SkyAphid - no no, maybe i did not explain myself clearly, its not abou sport, what i want to know (i know that team will have some set of players) i wanted to ask for help with design of the whole application… like if model-view-controller is suitable for such static aplication where there will be only a few screens (Team view, League view, Transfers, match view, Career view etc) but many texts on them whith one engine that will simulate the match between two teams according to its strength from players
the grafics am I able to do smthing like this http://365psd.com/wp-content/uploads/2011/02/AppleUI.jpg with java2d? I mean my own buttons, textboxes and so on :slight_smile: thanks for your interest so far :slight_smile:

I nearly get offended… why do you think that? I am not beginer in java nor c#, I am just inexperienced at developing games :wink: thats why I am asking for architectural and design hints, not the concrete implementation of the set of players in team :slight_smile:

Sorry! no offense intended.

Having never played a football manager im working off limited knowledge here…

I use slick2D which is fantastically easy to print text and simple graphics to the screen unless you want it be console based? Download here,
http://slick.cokeandcode.com/

On the slick wiki there is a tutorial that shows switching between game states, menu, gameplay and is easy to adapt to your own etc
http://slick.cokeandcode.com/wiki/doku.php?id=02_-_slickblocks

Team wise i would say that each team is an Object Array and contains a number Player objects. Calling the various stats of the players will be easily done through the team array. Comparing these to the other team should give you the results of the match.

now this is something that I needed, no all i wanted but i am bookmarking it for ui development time later :wink: thanks a lot

Wow wow, model-view-controller? for game?

no? would it be bad? i thing it could work for this type of game…
Model - all the statistics of players, temas, stadiums, leagues etc…
View - screens for specific game state like transfer window, player detail, team detail, team rankings, player seach…
Controller - event and view handling according to user movement in the app + associacion to Match engine whitch will be called at match day and whitch produces match report, match result and updates players for development, goals + cards + assists statistics…

what would you suggest instead?

I’m not in position to say no or yes, it’s just to shocking and unique ;D
Personally, I suggest to you do whatever it can to make it finished and work.

rebirth - yes, thats definitively something i should do :smiley:
I will start with the MatchEngine - for now there is OddsAnalyzer that calculates the odds for some events according to input strength (or other) datas

Plan:
It will simulate the game of two opponent teams. Both of them will have 11 players and can support the engine with strength datas, like strength of midfield, defence, attack and GK…
the engine will decide according to comparison of midfield strengths of both which team will get the chance to attack
then according to compar. of attacking teams attack strength to defending teams defence str. will be decided it there was any shot on goal
and finally to the GK strength will be decided, if it was caught or not…

Later, every decision will have some chaos koeficient, that shoul make the rare surprising results, and there will be more events, like foul, Freekick… possesionAnalyzer is in todo too, it will record the possesion in every minute of game and update the possesion indicator (some bar) for last ten minutes… but just later

Every minute (till 90) of the match the engine will decide if something happend and according to the datas will decide what was the result and update the screen if needed (for start console :slight_smile: )… the algorythms for strength decision and chaos factor will be something that i will have to change continualy until the correct version for any team (strong vs strong, weak vs strong…) will be found

so i have the base engine algorithm, but i get stuck…

I tried to compare the teams (everyteam knows his player so it can tell me how strong he is) and calculate the odd as
teamStrength/maxStrenght and it gets a odd from 0.0 to 1 exclusively. maxStreght = max possible strenght of any team.

But now i have a tactic modifier too, so if teams selected tactics, where one team will have advantage, i wanted to add some bonus, like 0.2 or multiply by 1.2

But there is a problem, that a team could get bigger odds, than is the universe (1), and there will be more modification, not just tactic (redCard, injury, visitors, wheather etc)

have u please some idea how to improve my logic?

Not related to programming (and not knowing much about sports ratings), but have you tried looking up some sports ratings mechanisms?

There is a good explanation including some sort of calculation of the soccer rating system on wikipedia http://en.wikipedia.org/wiki/FIFA_World_Ranking_system_1999-2006

Sorry, haven’t really bothered looking further than that, but I bet you can find out more on the official systems used by the sports of your choice (football? soccer? depends where you’re from eh?).

waw didnt even think about it, thanks a lot :wink: thats definitely smthing I could use for rating my temas and manager :slight_smile: but still need to know how to influence the match with tactic without getting over the 100%

You’re welcome.

Why do you want your match rating between 0 and 1? It might be easier to compare an absolute rating. Add all the ratings of the players on the field (from 1 to 10 maybe), multiply it by some sort of “motivation multiplier”, “trainer quality multiplier”, etc. That way you don’t have to worry about the maximum strength a team could possibly have, and it will make tweaking multipliers easier.

for more granularity, do the ratings above for the different sections in the field, or even individual players. Every section or every player has a designated section or player from the opposite team to attack or defend against. For instance
(team 1 defense players ratings times your multipliers from tactics, motivation) weighed against (team 2 attack players times your multiplayers from tactics, motivation) etc. Also calculate how much time per game is spent in each section of the field (attack, defense, midfield) by taking their ratings into account. All those weights combine into an end score.

it was just an idea… every player has a technical, mental, physical skill, all in scale 20-50, so one player can have overall strength between 60-150. any team can tell his overall strength (11* player[n].overall) or partial strengths (sum(foreach attacker.overall in team.attackers) for attacking strength etc)

i did not insist on using 0.0 -1.0 (0-100%) strength comparison, it was just an idea to universalise the strength comparisons by expressing it as percents, i wanted to have it as some slider, that will be at strat at 0.5 and after this it will be modified by some tactics, morale boosts, fans for home team and so on

forexample… the possesion was calculated as:
original posssesion odd - 0.5 (50% for any team)
this is modified by the difference between the teams midfield strength, whitch can be from 180 (3 worst midfielders) to 750 (5 best midfielders) so the diference is divided by 1000 to express it in 0.0 - 1.0
diff = (teamHome.midfieldStrength - teamAway.midfieldStrength) / 1000

and now i wanted to modify the possesion by adding the result to 0.5 original odd so it could modify it to 0.7 or 0.3 or else…

but you are right i have to think it out somehow diferently, this will not work as i thought
the granularity in the third of fields and player vs player is far too detailed for me, maybe it will be in the updates in the game, for now i want it simple and working :slight_smile:

How would you recomend to develop the football player in this football manager game?

the skills of players are mental, physical and technical, every in range from 20-50.
from 16y to 21y - developing a little bit more physical skill
from 20y to 24y - more technical skill
from 24y to 30 - more mental
from 28y overall decrease of development
after 30y development stops, the physical and technical skill can decrease

player can gain 0-4 points overall in development

now what i dont know is how to do this. Two ways that I thought about:

  1. after every GAME there will be dynamic x% chance of developing 1 point where x will be declared from age and development till now (if developed 4 points already, the x = 0)

  2. after every SEASON for every player will be generated development points for next season (0-4) relative to age (and maybe to some hidden talent coeficient). Then after every game there will be y% chance (y will be constant for every player, somewhere 5-7%) and if it will be successfull, 1 development point will be transfered to skill point. After every point is transformed, no more points will player gain in this season, nevertheless of success in development chance.

  3. do you know something better?

thanks