Page 1 of 1

football simulator

Posted: Sun Aug 17, 2003 5:04 pm
by toms100
this is more a theory question.
ive been thinking about making a football management game, and ive had a few thoughts about the hardest (and most important) part of design: the match simulator.
now i would have players on each team with stats in different areas, but the question is this:
do i do a one off run through calculation based on the stats and random numbers to generate a score, or, create a virtual pitch where the players run around (based on ai and random numbers) and when players reach each other certain things happen (such as a players tries to tackle another and the stats decide who wins the tackle and it goes on from there), but i think that would be very hard to create a set of circumstances which the ai must react to...

anyone care to share any ideas?

Posted: Wed Aug 20, 2003 5:57 am
by will
i would think to create a large matrix that represents the playing field. a regulation field is 160' wide and 300' long (plus 30' for each end zone). figure a person takes up a 2' x 2' area when standing, so you would have a 80x180 matrix. track the position (X and Y coordinate) of each player at all times, as well as the coordinates of the ball. when two players occupy the same block, the one with the greater strength (maybe factor in fatigue and inuries) will tackle/block/knock down the other player. When the receiver occupies the same block as the ball, figure some algorithm that will determine if he catches it based on skill and whatever else, as well as a little bit of randomness.

well, that's where i would begin anyway.

Posted: Wed Aug 20, 2003 10:15 am
by nielsene
(Note, the original poster is in the UK so "football"="soccer" to us American types. Therefore tackle=steal normally.)

Posted: Thu Sep 11, 2003 1:03 pm
by cybaf
go check out http://www.managerzone.com and see if you can talk to someone at their staff about how to set it up... but in general the setup shouldn't be much different than from the Am. Football example above.

Posted: Thu Sep 11, 2003 1:25 pm
by JAM
toms100 wrote:...but i think that would be very hard to create a set of circumstances which the ai must react to...
Depending on realism (I asume you are into 100% as real) it would be very hard.

Lineup (amount on defence/offence), individual stats, team stats, home/away... yikes. ;)
Extremely (!) interesting topic tho. My question is, how fast would php/sql parse the code and get some sort of result on an average server-sertup? It sounds like intence work...

Posted: Fri Sep 12, 2003 2:19 am
by toms100
it is rather intense:(
ive come to the conclusion that perhaps c++ for an engine would be better... but we'll see:)
thanks for all the usefull tips, appreciated