Steam Blog - Valve
When we launched Steam on Mac OS X back in May, there was a lot of buzz about performance, particularly relative to Windows running on the same machine. While we met our goal of making sure all of our customers had an acceptable gaming experience at launch, we have spent a large chunk of effort in the intervening months working with Apple and their GPU vendors to close the performance gap with Windows. The combination of changes in our code and the latest graphics update available from Apple today removes a variety of software bottlenecks, resulting in significant graphics performance enhancements for Mac gamers.

Feature Improvements

In addition to low-level implementation changes which have improved performance across the board, Apple has also removed some implementation inefficiencies which allow us to improve visual quality, most notably in the area of GPU occlusion queries.

Occlusion Queries

When we first released our Source engine games on the Mac, we had to turn occlusion queries off but, with the latest update to 10.6.4, we can turn them back on, giving players higher visual quality. If you're not familiar with an occlusion query, it is a mechanism for an application (running on the CPU) to notify the GPU via OpenGL that it would like to know, for some set of draw calls, how many pixels are drawn to the screen, after shading, z-buffering etc. We use GPU occlusion queries for a variety of effects in our game, but one of the easiest to explain is light glows. It's a simple technique that just about every game uses, but it produces a surprisingly convincing effect. What we do is issue queries for light-emitting objects in our scene such as light bulbs or a disc representing the sun. A given light source may be partly or wholly occluded by other geometry in the scene and we use the occlusion query to determine how occluded it is. The percentage of a given light source's screen area which is actually visible is used to scale the intensity of an additive glow sprite which is drawn over the frame without any z-buffering. Because its intensity is attenuated with the occlusion of the light source geometry, the glow sprite fades gently in and out as it becomes more or less occluded by the rest of the scene. It's a simple technique but it appears to be a complex optical effect which helps to convince your brain that you're looking at something truly bright. To illustrate the importance of using light source occlusion to drive glow sprite intensity, we've created a little clip from Half-Life 2: Episode One, which shows the effect with and without the query. Clearly, the left side of the movie shows a convincing glare effect due to the scaling of the glow sprite intensity while the right side of the movie gives a very crude effect, with the glow showing through parts of the scene, breaking the illusion.




From a technical standpoint, the key to the occlusion query feature is that our game can be written in such a way that it can receive the result of a given query asynchronously, at some point later (usually during a subsequent frame). So, while we are using the GPU to perform this computation for us, we aren't stopping CPU execution to wait for the result---we can pick up the result later, since it's OK for this algorithm that the query results are a fraction of a second "stale." So, if implemented properly by the graphics API, occlusion queries cause no synchronization between the GPU and CPU, allowing both processors to stay busy doing work. Unfortunately, prior to the latest software update, occlusion queries caused the CPU-side driver to synchronize with the GPU, perhaps multiple times per frame. This caused large amounts of time during which either the GPU or the CPU was doing no work, significantly reducing system throughput and consequently the game's framerate. This behavior also caused the application's CPU thread to stop processing, as it waited for the driver thread to synchronize with the GPU, resulting in significant loss of CPU throughput as shown in the Shark capture in the image below. In this image, the green horizontal bar is Portal's thread and the pink bar is Apple's OpenGL driver thread. At the point that we've selected on the timeline, you can see from the callstack that we're querying the driver to find out if an earlier GPU occlusion query has been completed. Before the driver can even respond to the game thread, the driver flushes all of its queued work to the GPU in order to synchronize with the GPU, causing the big gap in the timeline on our thread (the big gap in the green bar), during which our game can do no further processing. The way that the occlusion query mechanism is designed, this CPU-GPU synchronization is unnecessary and, with the new software update from Apple, that big gap in the timeline is gone.






Floating Point Validation

Apple has some very nice performance analysis tools that allow us to diagnose performance issues like the occlusion query stall described above. Using these tools, another area that we've seen the driver spending a significant amount of time is in code which validates floating-point parameters that we hand off to OpenGL to drive the logic in our GPU-side shader code. If you're not familiar with the way that processors encode floating point numbers, there are a few special bit patterns that are reserved to handle illegal results that can happen when code inadvertently does something nonsensical like divide by zero. Unfortunately, the way that the OpenGL specification is written, Apple must spend valuable CPU time doing floating point validation to guarantee that their OpenGL implementation behaves correctly in these exceptional cases according to OpenGL conformance tests. Of course, in a high performance application like a game, the CPU time spent in Apple's driver validating floating point data can really add up. We have been able to measure performance improvements in this area with the latest software update, but we are anticipating even more speedups in this area if Apple implements the uniform_buffer_object extension and GLSL 1.3 in a future update. With these additional features, we will be able to sidestep this particular CPU bottleneck, allowing us to win back a bunch of CPU time and, ultimately, performance.

Setting Expectations

We are seeing dramatic performance improvements on iMac (Late 2009 and Mid 2010), Mac mini (Early 2009 and Mid 2010), Mac Pro (Early 2009), MacBook (Early 2009 and Mid 2010) and MacBook Pro (15-inch, Mid 2010) and MacBook Pro (17-inch, Mid 2010) models. Depending on the game, video settings and the hardware, we have measured frame rate improvements from 15% to 120% on these systems. On older systems, we are generally already operating at the limits of the hardware, so it is not obvious that any significant performance improvements can be achieved in the future.

Conclusion

We're very excited about the performance improvements that Apple and the GPU vendors have been able to deliver this summer and we are working with them to further improve performance.
Steam Blog - Valve
Steam's browser and chat windows are now grouped as tabs! You can manage multiple chats and web pages each in a single window in our latest Beta.

We've also been making some improvements to Steam's browser performance and stability, with the biggest gains on the Mac in particular. Flash video playback is now faster and more stable here, and the browser now loads cached content quickly. The video below shows a before and after comparison of our store's home page loading in the released Steam client and our latest Beta. The comparison is fair, in that both versions of the client had the same amount of time after start up to "settle," and both had the page content in their local cache. What was once molasses is now a normal web page in a normal-speed web browser. Yay!

You can give these improvements a whirl in the latest Beta by visiting Steam client Settings or Preferences and opting into the Beta Update offered there. And as always, do share your feedback on the Steam Forums.



Jul 15, 2010
Steam Blog - Valve
Steam's opt-in hardware survey has been providing valuable data to the gaming industry for several years now, for gamers looking to upgrade their systems, game designers striving to target their customer base, and PC manufacturers anticipating gaming system adoption rates and trends. However so far it's been limited to just hardware components, which everyone knows is just one part of a gaming system.

So in today's Steam Client Beta release we're extending the survey to include installed software - Any programs listed within Windows' Programs and Features control panel (OS X coming soon) are reported alongside the hardware information Steam collects and reports online.

The new software component of our survey helps us understand what else our customers are using their PCs to do, and as a result, what features we can deliver or leverage to make Steam and our games better. PC users, developers and manufacturers will no doubt also find this information useful, so we plan to publish these results and trends over time. The first set of software survey results will be published among Steam stats at the end of the month.

As always, this survey is both optional and anonymous, with none of the collected data being associated with your Steam account. Survey selection is random; you'll know you're part of the Survey because Steam will ask if you want to take part.
Steam Blog - Valve
We're taking a break for E3 this week. Enjoy the new Portal 2 trailer and get ready for Counter-Strike: Source to come to the Mac next week.
Steam Blog - Valve
Half-Life 2 took 6 years to build, and here almost 6 years later we get to release it again - this time on the Mac. As of today Half-Life 2, Half-Life 2: Episode 1, and Half-Life 2: Episode 2 are available on Steam on the Mac. They're SteamPlay titles, so if you own the games on the PC you already get them on the Mac, and if you haven't played HL2, buying it gets you access on both systems. Half-Life 2 has one of the highest critical ratings of any Valve game, with a 96 on Metacritic, and has seen consistently high player numbers on Steam with over 216,000 users playing it in the last month.

So to give everyone an excuse to play through them again, we've added Steam Achievements to Half-Life 2 and Episode 1, for both the Mac and PC versions. 32 achievements for Half-Life 2, and 13 achievements for Half-Life 2: Episode 1 (Episode 2 already had achievements).

To make sure you never lose your progress, your save games will now be stored in the Steam Cloud automatically each time you exit the game. If want to upload existing save games to the cloud, just launch the game and then exit. The Steam Cloud will store your most recent 100MB of save files - each save game, once compressed, takes around 2MB so that's around 50 save files. We've spent a lot of time racking server boxes crammed with hard-drives, so please take advantage!

The best part is that even the save games are Steam Play - you can take your PC save games and use them on the Mac. To demo this feature, we've got Alfred, the Mac team lead, showing off his work by starting a game of HL2 on the PC and then continuing it on his Mac:

Ready to play again? Click here: Half-Life 2, Half-Life 2: Episode 1, Half-Life 2: Episode 2
Haven't played before? Click here: Half-Life 2, Half-Life 2: Episode 1, Half-Life 2: Episode 2
Steam Blog - Valve
Since we launched Steam for the Mac a little over a week ago, one of the biggest complaints we have gotten is that we put game content into a "Steam Content" subfolder in the Documents folder. This interferes with how many of our users backup their files, who want to be able to back up their entire Documents folder with Time Machine, Dropbox, or some other software, but who do not want to back up all of their game content. Additionally, many users simply don't like seeing files they don't directly interact with in such a visible location.

So we thought we'd take a moment to tell you why we decided on the Documents folder in the first place, and what we plan to do about it.

Our original inclination was to put game content under "~/Library/Application Support/Steam", along with the other support files Steam uses. The problem is that uninstalling an application is meant to be as simple as dragging it from the Applications folder into the Trash. However, uninstalling Steam this way will leave all of your game content on the drive, which could easily be quite a few gigabytes of wasted space. Our solution was to put the content in a very visible and often used location so users could easily find and delete the game data if they didn't want it anymore. That's right, we chose the Documents folder specifically because it was visible and often used -- the very reasons users don't want it there.

We've taken your emails and forum posts to heart, and we've come up with a different solution for users who uninstall Steam. We are working on adding a feature to Steam to detect when you drag it to the Trash, and ask you if you want to delete your game content files as well. This will allow us to put your game content in an non-intrusive location. In an ideal world we would let you choose where the game content files are located, and in the long term that is a goal of ours, but due to architectural issues with our engine this is not as trivial as it may sound.

As soon as the feature to help users uninstall Steam completely when they drag it to the Trash is complete, we will be moving the game content folder into "~/Library/Application Support/Steam".
Steam Blog - Valve
According to the accounts of many happy Mac gamers, last week's launch of Steam on the Mac has been a huge success. Those of us on the Steam team were especially pleased to be able to include Portal as a free download to celebrate the launch, and it appears that many of you agree it was a good idea - there have been approximately 1.5 million downloads so far. Aperture Science, we've heard, is pleased. Be sure to pick it up today - the offer ends on the 24th of this month.

As we've mentioned, Steam is going to be adding a new set of Mac games every Wednesday for a few weeks. Here is today's dozen new Mac titles:

Madballs in Babo: Invasion
Killing Floor
Altitude
Europa Universalis 3
Hearts of Iron 3
Sam & Max Season 2
Sam & Max Season 3 - Ep. 2
Chains
Simplz Zoo
Caster
Eschalon Book 1
Windosill

All of these titles support Steam Play, meaning that you'll be able to play each title on both Windows and the Mac from any computer with just a single purchase. Several of the titles also support cross-platform multiplayer action - a first for games on Steam.

In other Mac news, we're getting ready to add Mac numbers to our hardware survey. As longtime Steam customers are aware, our Steam Hardware Survey has become an industry benchmark for gauging what kinds of computers gamers are running around the world. We are in the process of updating this monthly report with Mac information and other new aggregate data. Here's a sneak peak at some of the preliminary findings we've gathered about Mac hardware since we launched on that platform just over a week ago:

- Roughly two thirds of all Steam Mac users are running on a laptop.
- Portal (with the same code base across platforms) is one fifth as likely to crash on a Mac than on Windows.
- And one week after launch, already more than eleven percent of all Steam purchases are for the Mac.

You'll be able to dig deeper into those numbers sometime next month, which is when we're planning to ship the complete report. After that it will be automatically updated each month with new survey data.
Steam Blog - Valve
Steam is now available for the Mac. Read what the press has to say, and what other gamers are saying. Or just download Steam now.

Steam has been a service exclusively for PC users since we launched it in 2004. For the first time we and our partners are bringing it to another platform. It's been a ton of work, but the Mac is great for the same reason the PC is great - they are both open systems that let gamers and game developers be as close as possible.

So check it out. If you have a Mac and are new to Steam, welcome! If you've been with us since the beginning, borrow a Mac and log into your Steam account and jump into a game. And for everybody, Portal is free from today until the 24th.
Steam Blog - Valve
The 2010 Steam client is now live! The overhaul changes many things about how information is organized on Steam, and makes it easier to do the most important things on the platform, like play games with friends. We wrote up an overview of what's new, so definitely check that out so that you don't miss anything. As we've mentioned, the beta testing went well - participants suggested valuable changes and reported lots of bugs for us to squash.

We're very interested in your thoughts on the new client, so please stop by the forums to tell us what you think.

P.S. This is the first post in the official Steam Blog. It's hard for us to believe we've never had a blog until now. Anyway, watch this space for thoughts from Steam central. Coming soon: Mac!
Steam Blog - Valve
The 2010 Steam client is now live! The overhaul changes many things about how information is organized on Steam, and makes it easier to do the most important things on the platform, like play games with friends. We wrote up an overview of what's new, so definitely check that out so that you don't miss anything. As we've mentioned, the beta testing went well - participants suggested valuable changes and reported lots of bugs for us to squash.

We're very interested in your thoughts on the new client, so please stop by the forums to tell us what you think.

P.S. This is the first post in the official Steam Blog. It's hard for us to believe we've never had a blog until now. Anyway, watch this space for thoughts from Steam central. Coming soon: Mac!
...