What services do you use for sharing unfinished games

What services do you use for sharing your unfinished Phaser games online without revealing the source code? I want to show my boss and colleagues the game I’ve been working on during the summer, but don’t want to reveal the code, since it’s in an early stage. I want to be able to share a URL without revealing the source code of the game.

Hi,
I use Itch.io in draft mode with a secret url
For the code source, it’s javascript…running client side, you can’t really protect the code but you can minify and obfuscate it. There’s a lot of online free tools for this.

1 Like

I usually copy all the game’s .js source files into one big file and obfucate it, then distribute the game with just two scripts mygame.min.js and phaser.min.js

You can minify obfuscate javascript using this: http://jscompress.com/

Btw another tip is to put a domain lock in your code, because some gaming sites tend to just copy games onto their own websites. They can disable this by editing the js code, but at least it is better than nothing. So something like this

// site lock, enable for no hotlinking
var domain = document.domain;
siteLock = false;
var siteLock = (domain.indexOf("mydomain.com") == -1);
if (siteLock) {
	document.write('To play this game, please visit: <a href="http://www.mydomain.com/">http://www.mydomain.com/</a>');
	console.log('%c To play this game, please visit: http://www.mydomain.com/', 'background: #000; color: #0f0'); // cool hax0r colors ;)
	return;
};
2 Likes