Public Group

# Baseball Sim

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

## Recommended Posts

I would like to create a baseball simulation game. I will not be doing most of the programming, I have a friend who is a great programmer and will undertake the majority of that. I do know a lot about baseball which is my main purpose in this project. What we can't figure out is what format we should build it in. Ie. The physics of baseball are pretty intense and were not sure we could handle that and make it realistic. Should we go with like a probability system? Where the players stats and attribute just affect the probability of different outcomes happening? If we go that route, I am not sure how we would balance everything, but it seems like it might be the best way. If anyone can help direct me in that I would be grateful.

##### Share on other sites
You can simulate it authentically, or you can fudge it. To do it authentically, you need a robust physics system, and then you need to tweak the inputs until you see results consistent with reality. To fudge it, you simply use the player stats as a modifier on a random selection to determine how often they do it right vs wrong (and in what way wrong).

##### Share on other sites
I would personally suggest some sort of random function which assigns different boxes to where the ball can go, and based on skills, pick a "random" location. A higher skill means one closer to the center. I'm thinking maybe make the dead center 0, and have the left -'s and the right +'s and vice versa? Higher skill=more probability of closer to 0? This obviously would be based on the pitchers skills. Here's my horrid ascii art of the idea:

-3 -2 -1 0 +1 +2 +3-3 -2 -1 0 +1 +2 +3-3 -2 -1 0 +1 +2 +3-3 -2 -1 0 +1 +2 +3-3 -2 -1 0 +1 +2 +3-3 -2 -1 0 +1 +2 +3that would be the horizantal probabilty.-3 -3 -3 -3 -3 -3-2 -2 -2 -2 -2 -2-1 -1 -1 -1 -1 -1+0 +0 +0 +0 +0 +0+1 +1 +1 +1 +1 +1+2 +2 +2 +2 +2 +2+3 +3 +3 +3 +3 +3that would be vertical probability.

Your programmer may understand this better if you can't (No offense meant)

Show this to him/her and see what they think. Comments on this welcome.

##### Share on other sites
Is it primarily going to be a graphics or text game? Do you want to play as each player, manage the game, be the GM or just a spectator?

For a text game I'd go with primarily statistics with a few attributes indicating batting/throwing side, running speed, etc. If 5.5% of a batter's at bats result in a homerun then a random number comparison is all you need. You'll also need to determine what influence the pitcher will have, if any, on that homerun possibility. Will wind speed and direction play a roll? Temperature or altitude? Lefty/righty?

There's a lot of work writing a baseball program. Deciding how you're going to determine what happens when the pitcher throws the ball is the easy part. You'll also need to worry about baserunning. Curtis Granderson drills a ball into the leftfield corner. Triple? Inside the park homerun? What if Cecil Fielder is on firstbase with less than two outs?

Ground ball to thirdbase with a baserunner on first and less than two outs. Go for the sure out or try for a double play and maybe miss them both? In another situation, with no outs, go for the easy double play or let the tying run score?

How much of an effect do you want the fielders to have? Are they just there to get credit for a A / PO when it is determined the batter is out, with an occasional fielding error, or do you want them to have an effect what is an out or a hit? Can certain fielders actually reduce the probability of a hit or out while others increase it?

Before you decide on what format you're going to use you might want to figure out what part of baseball you want to simulate? Are there certain areas you don't care about, such as how to handle a hit-and-run, delayed double steal or suicide squeeze? Once you decide what you want it'll be easier to decide what you need to simulate it.

There are several baseball programs out there. You may be able to get more baseball programming and/or ideas from one of their websites.

PureSim
Out of the park baseball
Sim Dynasty

You may wish to look into some of the work done in sabermetrics. Some of their stuff may challenge what you thought you knew about baseball. Some of it is pretty far out there and beyond my feeble mind. However, one article that got me thinking more than any other was regarding the effect the pitcher has on whether a non-homerun batted ball results in a hit or an out.

However, if you're writing a graphics or arcade baseball game them maybe you can ignore everything above.

Good luck.

[Edited by - Belgium on March 21, 2008 8:14:22 AM]

1. 1
2. 2
Rutin
23
3. 3
JoeJ
20
4. 4
5. 5

• 23
• 40
• 23
• 13
• 13
• ### Forum Statistics

• Total Topics
631733
• Total Posts
3001928
×