BluePrints: Steamworks

I shan’t delve into the details of Steamworks itself too much. Anybody with a desire to develop and a spare (recoupable) $100 can get access to Steamworks and its API and documentation. In this post specifically I’ll write a little about integrating it into UE4 (sort of) and adding Steam achievements to Piczle Cross Adventure.

Activating Steamworks in UE4 is pretty easy. You can follow Epic’s own tutorials for it, though it can be hard finding an up-to-date one. You do not need to recompile the engine, merely get the latest Steamworks SDK, turn on a plug-in and adjust some text in your defaultengine.ini. There is a handy YouTube tutorial found here, or you could use a 3rd party plug-in like the SubsystemConfigurator.

Once Steamworks is activated, while working in the editor you need to launch your game as “standalone game” for the overlay to work and show up. Playing within the editor, or in a new editor window won’t suffice.

Steam achievements are a fun way to entice players to play or try different things within your game. I enjoy them so much I’ve built trophies into the Piczle games regardless of the platform they’re on. Piczle Cross Adventure has 24 in-game trophies, so all I really had to do was hook these up to Steam’s achievement system.

As I already have scripts to check whether the player has reached certain milestones to gain trophies I don’t even need to create extra work here. All I do is look at the currently achieved trophies in-game and check them against Steam’s achievements.

E.g. whenever the player finishes a puzzle, or enters a new area the game does a quick trophy check. Sometime sit is targeted, that is it will only check if one particular trophy has been earned, and sometimes it does a quick check against all 24 trophies. The most obvious trophies are for completing a certain number of regular puzzles.

Here I simply call a little function that counts all completed puzzles, and if it is 10 or over the player will get the ribbon trophy (if they haven’t gotten it already). Rather than do the same calculation for the Steam achievement I simply check if the player has earned the ribbon trophy and if so to send a message to Steam to unlock the same achievement there.

As I’m play-testing the game (in stand-alone mode) whenever a trophy is unlocked in-game I can see the little Steam achievement overlay pop-up in the bottom right! Of course it’s useful to reset these achievements occasionally, so I’ll either have a short-cut or a button somewhere that sends the console command “online.ResetAchievements” or I type it in manually from the console while the game is running.

Finally there are a couple of little things to keep in mind when you create your build, like making sure there is a text file called steam_appid.txt, containing your ID, in the /Binaries/Win64 or Win32 folder of your package.

The Steamworks backend has options for entering achievement IDs, names, graphics as well as localisation. Let’s face it, a Steam game with no Steam achievements is barely a game at all, don’t you think?

Even if your game doesn’t have in-game trophies or achievements it is good to keep in mind ways to count progress so that you can implement Steam achievements without having to retro-fit them in at a later date.

Add Piczle Cross Adventure to your Steam wishlist! The more people wishlist it the more it helps with visibility in the long run!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s