Advertisement

Sports Simulator

Started by April 29, 2013 12:00 AM
1 comment, last by walsh06 11 years, 8 months ago

I have just started work on a sports simulator and Im wondering about some general design tips and wondering do people have any good ideas.

At the moment every minute of the match runs like this:

- Check which team performs event (better team overall more likely)

- Check what type of event: score, wide, save (determined by skills of attack, defence of each team)

- Check what player performs event (determined by probability for each player by skill and position)

This seems to be giving me fairly good results so far and its outputting text files as my match reports. But does any have some other tips or things to add in to help the game improve.

Hi there,

I have created a hockey match simulation engine as part of an online hockey management game I built, it works pretty much how you have described only it runs each second rather than each minute. I think you're on the right track.

- All possible events are defined and given a baseline probability between 0-1. Each team has its own set of these event-probability pairs.

- Probability ratios are adjusted using formulas taking into account the ratings of the two teams.

- Each second of the game a "dice roll" is performed to determine which event (if any) has occurred.

- If an event occurs it breaks into a separate simulation whereby the players involved are selected (weighted based on their skills), and possibly further events are then tested for (ie. an attacking play may result in a shot on goal, a hit may result in a turnover, etc.)

- User-defined strategies modify the ratings for their team, thereby affecting event probabilities.

The trick lies in defining and tweaking appropriate probability ranges for each event, and coming up with formulas that result in the right probability given the ratings for each team you are comparing.

Advertisement

initially I was going to do it more like yours but I decided just to go per minute and calculate large events to start and maybe break it down later. Thanks for the help and its nice to know I started off along the right track.

This topic is closed to new replies.

Advertisement