Releasing Chime onto an unsuspecting PC gaming public was a fantastic opportunity and what better platform is there to release it on than Valve’s digital distribution service Steam.
We do what we must…
One of the first issues we had to overcome with when porting the game to the Steam platform was the mixture of languages required. Those of you who’ve been following this blog will be aware that Chime has been written using Microsoft’s .NET game framework XNA using the programming language C#. Being a managed language, C# takes care of memory allocations for you using garbage collection routines, a concept which will be familiar to anyone who’s ever written any Java code.
The Steam API is provided in the form of a static C++ library. C++ is a great language and is widely used across the games industry. It works at a lower level than C# which means you get closer to the hardware, and write potentially more efficient code if you’re prepared to take care of your own memory allocations.
Without a native C# implementation of the Steam API we needed a solution to allow Chime and Steam to play together nicely. The solution we opted for was to create a wrapper library using C++/CLI which is a Microsoft technology used to allow the use of C++ syntax with the .NET framework. This library wraps all of the Steam functionality allowing it to be called from our XNA project.
This was a triumph…
Achievements are a great way of adding extra rewards for playing games, and are as popular on Steam as they were on the 360. As we were porting Chime from our 360 version we already had a set of achievements defined for the title. We also added three new PC exclusive achievements which can be obtained by playing the extra Portal themed level. (The cake is definitely not a lie!)
Valve provides a web-based interface through which we can define the achievements for our title, each of which is identified by a unique text string. Once we have determined that the user has unlocked an achievement during game-play, we simply pass the relevant ID the correct API function to unlock the achievement. This gets passed on to the steam server to link the achievement with the user’s online profile, as well as notifying the user with the on screen pop-up. It’s just too simple!
For the good of all of us….
On a game like Chime, public leaderboards can further enhance the satisfaction of playing a game. Competing with your mates for high scores has been a staple of gaming for several decades, and now the internet allows us to prove our worth against every other player on the planet!
Leaderboards are also defined using the Steamworks web interface. Once set up, and some score data has been submitted from the title, we’re ready to receive listings to display on our leaderboard screen. Data requests are handled asynchronously; this means that we send the request to the server, and give the API a callback function to call when the data has been received. This allows us to carry on updating things such as the background animation, and input logic while the data is being downloaded and to handle trigger the processing of the data when the callback occurs.
I’m making a note here: HUGE SUCCESS
We only used a small subset of the features Steam offers; there’s lots of other great functionality in there, such as cloud data storage for sharing your game data across multiple computers, anti cheating systems and online matchmaking for network games. Along with all these great features, compared to console development, the whole process of submitting builds and creating new versions of a game title is simply a breeze.
I can sincerely say that the working on the PC version of Chime has been a triumph. It’s hard to overstate my satisfaction with the Steamworks tools and the level of support offered by the guys at Valve. Without their help we may not have gotten out of beta or released on time. (Okay I’ll stop now.)
Pete Gunter – Senior programmer
(Steam Profile: Guntereno)