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?
football simulator
Moderator: General Moderators
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.
well, that's where i would begin anyway.
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.
Depending on realism (I asume you are into 100% as real) it would be very hard.toms100 wrote:...but i think that would be very hard to create a set of circumstances which the ai must react to...
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...