Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Techniques for site locking?

A topic by Polypogon Games created Apr 26, 2018 Views: 1,526 Replies: 6
Viewing posts 1 to 6

In the interest of not having my game be spread around the internet without my permission (I don't mind people playing for free, but if someone puts ads on my game, I want the money from it!), I'm currently trying to write code that figures out where my HTML game is being played, and redirects to itch.io if necessary.  I'm using Unity's WebGL, so it's also strange from that perspective (I can call external javascript but firefox gives all sorts of security warnings when I do).  Are there any suggestions or recommended ways of doing this?  

Also, what are the servers that itch will serve from?  In particular, I see hwcdn.net, are there others I will have to assume exist?

Thanks in advance.

Admin (1 edit) (+3)

At the moment we serve HTML5 games through v6p9d9t4.ssl.hwcdn.net, but in the future we may migrate them to our own domain. For future proofing, you can add *.itch.zone to the sitelock. (That is, any subdomain on the domain itch.zone).

Something we're also considering is injecting a small piece of javascript to every HTML5 game that implements a sitelock automatically. If you like or dislike this idea tell me.

I like the idea, especially if it were an optional flag.  I am  really not enjoying trying to figure this out myself, and the ready made solutions on the net don't work, and the conventional advice tells you not to follow simple solutions since they have so many ways to get around them.

(+3)

For other people trying to do this, here is the simple solution I'm using:

    private void CheckWithUnity() 
    {
        string urlPath = Application.absoluteURL.ToLower();
        Debug.Log(urlPath);  // For determining where I am hosted
        if(!urlPath.Contains("hwcdn.net"))) {
            ChangeScene.changeSceneStatic(28);
            GameObject.Find("Music").GetComponent<AudioSource>().Stop();
            Application.OpenURL("https://polypogon.itch.io/wisdom-collector");
        }
    }

Well, I just discovered the I need to sitelock my HTML5 game because the game just got uploaded to another site just one day after of being uploaded here. I like the automatic sitelock idea.

Gotta lock your deals, so they don't get stolen.

Admin(+1)

An update for people who happen to come across this topic: We deployed a global javascript-based sitelock that’s automatically applied to all HTML5 games.

If your game is loaded on an invalid domain, it replaces the game with a banner that encourages to viewer to go directly to your itch.io page. It should help capture traffic from the sites that have been trying to steal itch.io CDN urls up until now. Thanks!

If you have an issue or any questions about it, please post here: https://itch.io/t/614172/sitelock-update