# Sports Simulator

This topic is 2053 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites

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.

Edited by archanian

##### Share on other sites

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.

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 10
• 9
• 9
• 11
• 11
• ### Forum Statistics

• Total Topics
633691
• Total Posts
3013344
×