Anti-pirated-version function with Steam

I am a game creator, I am building a game called "Blood Wielders". It is still a WIP.
I am a little bit worried about pirated version of my game, so I want to make sure that my game can't be launched (or close instantly after launched).

I have seen some Steam games behaves that way. Can anyone post a tutorial about this or just explain it? THX!

It is impossible, as even if you implement something like that, it can be bypassed.

The only thing you could try to do is tying your game to an online account, but a steam buyer wouldn't want to mess with additional 3rd party login.

There is no way to stop pirating.
If anything, if you game gets enough attention, to even someone put effort to get it pirated, that is good thing. Otherwise is waste of effort, you could spend on adding useful features otherwise.

What you can do for exqmple:
Release frequent updates;
Make track of released game keys.

As all posters before me pointed out, without something drastic it will be easily removed for a pirated version.

What you are seeing in other steam games is a "mandatory"(At least when I first needed to implemented it) feature which is described in the steam sdk The function SteamAPI_RestartAppIfNecessary is what you are seeing which provides the basic check if it has been started through steam functionality. Depending on which of the .NET Wrapper APIs you are using you will need to call the corresponding function.
If you haven't chosen one yet, is the most popular and probably one of the oldest ones. I personally am happy with Facepunch.Steamworks as it provides a more c# like interface and also leverages tasks which make some async functions way easier to write for us.


As others have already mentioned, you cannot completely prevent piracy. The Steam SDK methods noted above will help some, though. It won't prevent determined pirates, but it will prevent many end users from simply copying the game and giving the copy to a friend.

That's not even how piracy works anymore, hasn't worked like that for ages. If somebody wants to pirate a game, they just type it into any of the eight billion torrent trackers online and torrent the first result where somebody has already gone through the laborious process of using an entirely automated process to divorce a game from running through Steam.

Nobody's copy-pasting files and giving them to their friends even more, even from DRM free services like GOG.

Not exactly, I know from a friend that he got a game that way just a few months ago.
But I don't know what most people do nowadays.

1 Like

I agree that a lot of potential pirates just search for a download, but there are still some people who really do try to just copy files for friends. I have seen younger kids try it. It is worthwhile to set up the bare minimum Steam SDK level method of reducing some of the simply copying. It definitely won't stop any serious pirates, though.

I like your idea, I will work super hard to get my game some attention. Thx!


I'd like to do that.

I am pretty interested, thanks. I will try out facepunch. nice name


Release game keys?

In back days, games used cd-keys, now often reffered as game keys. I.e. on steam, to allow player download genue version of a game.
Number of software are using cd-keys still.

Knowing player is using valid key, or not, you can control, how game behaves. From not allowing game to start, to permitting only demo / trial, to full version.

Keys can be also completely replaced with player accounts, what many online games does.

You want to truly prevent piracy? Make your game free to play, with an authoritative server component to handle all core player account logic such as winning, purchasing items, currency management etc.

Version 2 of my top down racing game will be free to play with IAP and ads.

One thing I did notice from Steam SDK in v1 of my game, was if the game was pirated, the player's name coming back from the Steam SDK was blank, so you might want to implement some logic based on that. I ended up not allowing players to be on any leaderboards if their username was blank, although I did let them continue to enjoy the game.

Come to think of it, I could have had a lot more fun with these players :roll_eyes:

1 Like