Posts

Showing posts from July, 2017

Setting up Steam Achievements in Unity C#

Image
Hey everybody, my name is Steven and I'm the lead programmer over here at Mutant Studios. We've been hard at work on our new game Questr and it's finally entering it's final stages for launch. A couple weeks ago we started getting into Steam integration, which included Achievements. Being unfamiliar with Steamworks the first thing I did was go to google. The top result I found with example code was this GitHub repo, which is a C# port of the official Steamworks example. This example was an excellent starting point to get going quickly, but it was very quickly apparent that a more flexible system was needed. I'll go over the issues that I had one by one, then show the ways that I improved upon the given code.
example code:
private enum Achievement : int { ACH_WIN_ONE_GAME, ACH_WIN_100_GAMES, ACH_HEAVY_FIRE, ACH_TRAVEL_FAR_ACCUM, ACH_TRAVEL_FAR_SINGLE, }; private Achievement_t[] m_A…