Any way to make closed-source games?

As I understand it, BabylonJS is interpreted and the entire app is sent to the client as plain text. Am I wrong? Is there a way to only send binaries so that the game can’t simply be copied, modified, and pasted onto another site?

I’d like to make a game that sells products and I don’t want players just going to some pirate site to have everything unlocked for free.

hey
you can not close the JavaScript 100% in browser
it is not depend for BABYLON js but you can make encryption and hide your key
that can make hard for copy and use it
for myself i make key from domain name and encrypt my js files so that just work on the main domain but it not mean i close it completely

2 Likes

Basically, no. Anything you send to the client they can modify (even compiled code, with a little bit more difficulty).

“I’d like to make a game that sells products and I don’t want players just going to some pirate site to have everything unlocked for free.”

Is your game single player? If so, then there’s not much you can do to stop piracy or “hacking”, you can only make it less easy. I just minify & uglify JS to make it less easy, but anyone with programming experience will easily get past it.

If it’s multiplayer you could handle interactions authoritatively, which can fix a lot of those issues.

3 Likes