Log In  


So I've heard talk about how the new version allows one to do some basic piracy protection. Presumably by reading the URL of the website a web players is embedded in. Not exactly sure how to implement this. Can anybody post some sample code?

3


1

i just ran a few tests, stat(102) returns:

  • 0 (a number) when run from pico8.exe or binary export

  • "" from local html export

  • "www.yoursite.com" when run from www.yoursite.com/whatever.html

  • or "yoursite.com" if the www is omitted in your browser's address bar.

  • "game.itch" from the itchio app

so basically you would test stat(102) against "www.yoursite.com" or "yoursite.com"
(might be a good idea to remove the www part in 0.1.11h?)


Is this only useful for binary exports?

I can't see how it'd help for the web player, since it's basically delivered as source and a person could just remove the code that checks those stats.


only useful for html exports, outside of the bbs. the code is compressed and/or encoded, so less easily hacked off. I guess you could put something like this at the end of your cart:

function static()
	for a=0x6000,0x7fff do
		poke(a,rnd(0xff))
	end
end

if (stat(102)!="felice.itch.io") _draw=static

Nice one Ultrabrite. Thanks!



[Please log in to post a comment]