Wednesday, June 20, 2012

Windows Screen Resolutions (and Operating Systems)

Baseball Mogul 2013 in a 640x480 window
Just an update for game designers and web designers, since it can be hard to find all of this information in one place. The following is a list of the most popular screen resolutions for Windows machines:

Resolution Share Width Height Ratio Type
1366x768 20.8% 1366 768 1.78 Widescreen (16:9)
1024x768 17.5% 1024 768 1.33 Video (4:3)
1280x800 12.1% 1280 800 1.60 Widescreen (8:5)
1280x1024 7.0% 1280 1024 1.25 Video (5:4)
1440x900 6.4% 1440 900 1.60 Widescreen (8:5)
1920x1080 5.6% 1920 1080 1.78 Widescreen (16:9)
1600x900 4.1% 1600 900 1.78 Widescreen (16:9)
1680x1050 3.6% 1680 1050 1.60 Widescreen (8:5)
768x1024 2.4% 768 1024 0.75 Vertical (3:4)
1360x768 2.4% 1360 768 1.77 Widescreen (16:9)
1024x600 2.2% 1024 600 1.71 Widescreen (5:3)
1280x720 1.6% 1280 720 1.78 Widescreen (16:9)
1280x768 1.5% 1280 768 1.67 Widescreen (5:3)
1152x864 1.4% 1152 864 1.33 Video (4:3)
1920x1200 1.1% 1920 1200 1.60 Widescreen (8:5)
800x600 0.9% 800 600 1.33 Video (4:3)
1280x960 0.7% 1280 960 1.33 Video (4:3)
1093x614 0.6% 1093 614 1.78 Widescreen (16:9)
2560x1440 0.4% 2560 1440 1.78 Widescreen (16:9)
1311x737 0.4% 1311 737 1.78 Widescreen (16:9)
Other 7.5%

Some facts to take away:
  • "1024 x 768" is no longer the most common screen resolution.
  • About 96% of Windows machines have a width of 1024 pixels or more.
  • About 75% of Windows machines have a width of 1200 pixels or more.
  • About 65% of screens are now "widescreen". That is, they have an aspect ratio closer to the new High Definition format (16:9) than the old Low Definition format (4:3). 
  • A significant share of monitors (probably 3-5%) are being used vertically.
And here's the operating system breakdown (among Windows machines):


Windows 7 Windows Vista Windows XP
Game Players 69.6% 12.6% 17.8%
Classrooms 62.8% 4.9% 32.3%
Installed Base 50.6%11.3% 38.1%
Average 61.0% 9.6% 29.4%

Wednesday, May 30, 2012

Baseball Mogul's Simulation Engine

If you're a fan of the Baseball Mogul series, you might be wondering why, after 17 years, I chose this year to fully rewrite the simulation engine.

Well, first, some history:

Tuesday, May 29, 2012

Pythagoras Explained


Pythagoras of Samos, mathematician and philosopher, died about 2500 years ago. Nevertheless, his name is familiar to baseball fans. The "Pythagorean Expectation", invented by Bill James in the 1980s, predicts a team's winning percentage from runs scored and runs allowed. Despite the intimidating name, Pythagorean win expectations can now be found on mainstream sites like ESPN and MLB.com.

Wednesday, May 23, 2012

Baseball Mogul 2013 - Version 15.07


We have just released Version 15.07 of Baseball Mogul 2013. This is an update to Version 15.00 (which was launched on April 3rd). Simply put, if you were waiting to make sure the bugs were worked out of the initial release, this is the version to buy:

  1. Fixes a crash bug that was occurring when viewing Scouting Reports for certain players.
  2. Fixes a bug where a called strike sometimes didn't count on hit-and-run (or run-and-hit) plays.
  3. Fixes calculation of season and career WAR ("Wins Above Replacement").
  4. Includes year-by-year lefty-righty stats for every player going back to 1950 (alas, Retrosheet doesn't have complete data before that).
  5. Improves manager AI and pitcher usage patterns.
If you already bought Baseball Mogul 2013, download and run this file to automatically upgrade to Version 15.07.

Happy simming!

Clay

Saturday, March 31, 2012

Kickstarter Project





Just a quick plug for a very cool project I'm working on with some friends (for October, when the weather is great and my brain isn't knee-deep in baseball code).

Live-action gaming is one of the world's most maligned hobbies. But my experience is that getting out into the woods with other people and killing zombies in the middle of the night is a lot less dorky than sitting at home alone playing World of Warcraft.

Please pass this link along to anyone who might be interested (in New England, or willing to drive).

Role Models (a very funny movie)

Sunday, March 25, 2012

Win Expectancy (Baseball Mogul)

Another new feature for Baseball Mogul 2013 is that all the game logs now show Win Expectancy after each play.

Win Expectancy is the chance that a team has of winning the game, based on the inning, score, outs and runners on base. In the case of the Baseball Mogul game recaps, the Win Expectancy for the home team is shown after each play.

Here's an example from the 9th inning of a game I just played in Play-By-Play mode:


At the top of this screen shot, the home team (Washington) is leading the game 4-3, at the start of the 9th inning. In this situation in the current run-scoring environment, this gives the home team an 87.2% chance to win the game.

Then the Washington pitcher walks the leadoff man (Sanchez), dropping their win chance by 9.6% (to 77.6%).

When John Buck doubles down the right field line, the game is tied and the Marlins have the go-ahead run on second base. The biggest play of the inning is when Jose Reyes singles with two outs to knocks in the (eventual) winning run. By the end of the inning, the Marlins are ahead 5-4 and the Nationals chance of winning the game has dropped to 17.4%.

In the bottom of the 9th, Washington's chances just get worse. The leadoff hitter (Marrero) strikes out, dropping their win chance below 10%.

At the end of the game, their chance to win has dropped to 0.0%. (This is self-evident, but it shows that the math adds up).

Thursday, March 22, 2012

Strike Zone Heat Maps (Baseball Mogul)

As I mentioned here, this is the year that Baseball Mogul went from being a random number generator (like Strat-O-Matic or previous computer sports games) to becoming a true physics-based simulation of each pitch. However, it's difficult to determine if our model is realistic without having a way to visualize the results. So, I added heat maps to Baseball Mogul 2013, plus the functionality to record data for every single pitch.

Ideally, we should see the same patterns in our data that we see in Major League Baseball. For example, we know from actual pitch data that BABIP (Batting Average on Balls In Play) varies by pitch location:
Heat map by Dave Allen
This heat map is for right-handed batters only, with a view from behind the catcher. Imagine the batter standing to the left of the strike zone.

As you can see, BABIP is slightly higher in the lower part of the strike zone, because low pitches lead to more ground balls, and ground balls turn into hits a bit more often than fly balls.

And, the "hot zone" for BABIP tilts. That is, on low pitches, the highest BABIP occurs just inside the middle of the plate. On higher pitches, this region is a bit farther away from the batter.

This prime hitting zone tilts at this angle because the sweet spot of the bat passes through the strike zone roughly along this line. With the bat (and arms) pivoting on the batter's shoulder, it's easier to reach the high outside corner with the heart of the bat than it is to reach the high inside corner. So, with Baseball Mogul, I modeled the bat moving through the strike zone, by assigning different coeffecients of restitution to each point on the bat. The coefficient of restitution (COR) reflects how quickly the ball comes off the bat at each spot. It can be represented as a parabolic function along the length of the hitting surface, with the COR peaking at the bat's sweet spot.

I hope I didn't lose you with the technical jargon. Simply put, once this COR model is added to the simulation, we should see results that look somewhat like real life. So here's the same heat map from one season of Baseball Mogul:

Heat map by Baseball Mogul 2013
Wow.

I honestly didn't expect it would look that good. As with the first heat map, BABIP is highest from the middle of the plate down to the bottom edge. And, we see the same tilt: on low pitches, the batter is more likely to hit the ball solidly if it's over the inner half of the plate. As the pitch moves up in the strike zone, BABIP improves as the pitch moves toward the outer half.

Very cool. I'm really looking forward to using these heat maps to continue to dig into the new simulation engine.