Every Cloud

In Pauls ‘Flash Piracy’ post he talked about the problem all Flash game developers have who wish to control the distribution of their works, the flash Pirate. A term which describes someone who takes a copy of your .swf file and usually re-hosts it on their own site with the intention of increasing traffic and/or deriving an income from ads surrounding the game. Every cloud has a silver lining, and here are a few tricks and snippets of code that you could use to make the Flash Pirates work for you.

Treat the copied game as a way to drive new traffic to your site. Paul mentioned that players of DTD will be sent to his domain when they try and submit a score, he does this using the getURL() with the full path to the submit script. If you do this make sure there is a clear link on your scoreboard to “Play again” but this time on your site. If you do not have a scoreboard, or do not want to rely on people submitting to be taken to your site you can re-direct them. Flash has a property called _url which returns the full path the .swf is loaded from. So if this _url variable does not contain your domain name then it is hosted elsewhere, you can then use getURL() to redirect back to your site. I would not do this when the game loads, I think it is best to let the player have a few games on the other host, then when it is gameOver do the redirect. This way the person who copies your game will see that it works fine on their site, if it redirects off-the-bat they won’t pirate it and you will have lost a stream of traffic from them.

Here is a sample block of code that will check to see if the .swf is on your site, and if it is not it will re-direct to your domain. You could put this in an if() statement to only do it when the player has finished their 2nd or 3rd game:

// We first make the URL upper case as people may be using “yourdomain.com” or “yourDomain.com”
domain = _root._url.toUpperCase();
// Check to see if the variable “domain” contains the string “YOURDOMAIN.COM”
if (domain.indexOf(“YOURDOMAIN.COM”) == -1) {
        // This .swf is NOT on your domain, send them to your domain.
getURL(http://www.yourdomain.com”);
} else {
        // All is OK, do whatever you would do.
}

If you wanted to take this to the next level, instead of redirecting you could set a variable which you could use throughout your game to remove certain functionality. In the case of a TD game you could remove certain towers, limit the creep waves and say “This is a demo, go to <link to your domain> to play the full version”.

There are a couple of problems with all of the above. 1/ The dedicated and skilled Pirate will decompile your game to remove this code. Fortunately in my experience 99.9% of people who copy a .swf just re-host it as-is with no modifications. You could use a swf encryptor to make their job harder, but as with all software it it only a matter of time before this too is circumvented. 2/ There is a switch in the flash embed code which prevents the getURL() from working, myspace.com adds this when you try and embed a .swf. A workaround would to simply have the game display the URL it is trying to redirect to in a text field that has the “selectable” box ticked and instructions so the user can copy+paste the link “if you are not redirected in 10 seconds”

Of course this is only really an issue for those who are relying on on-site advertising for revenue (adSense / text links). If your game has built in means of raising revenue then you will want to encourage the distribution which you could do be providing a the embed code for a version with no domain checking or posting it on sites like New Grounds. I have encouraged the Piracy of Flash Element TD for these very reasons, and yesterday 50,148 of the games 121,161 loads took place on other peoples servers which accounts for over 40% of the revenue from in-game advertising. Yes if they had all taken place on my site there would be increased revenue from the ads outside the game, but I do not think my traffic would be as high if it was not for 4,917 hosts that currently have a copy running on their sites, redirecting to me when a score is submitted.

So like it or not, Flash Piracy is something that will happen to a game, you can treat it as a problem or a solution, but either way you can make it work for, and not against you.

6 Responses to Every Cloud

  1. david says:

    nice way to think positive on flash piracy. A+ =)

  2. Roland says:

    Very interesting post! Thanks for the info.

  3. Don Campbell says:

    Great post. Thanks for the insight and information on this Dave!

  4. Ben says:

    Great game, and great logic. Thanks for the post.

  5. I like the DesktopTD v1.21 better then the 1.5 for some reason. Maybe because I have played too much of it. Where can I get it from or where can I play it ?

  6. Mary says:

    Great Blog – Can I post some of your comments on mine?

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: