christian.tucker Posted December 9, 2014 Share Posted December 9, 2014 I've been working on a fairly decent sized project, and I'm porting it over to HTML5 so I can put it on a lot of the larger game-portals. It's a multiplayer RPG. I'm not so much worried about people being able to see the source, or easily modify packets, as my server is fully authoritative and will gut-punch anybody being stupid; However I'm curious as to in which ways I am protected as a developer from having my game stolen, and hosted somewhere else for profit. All it'd take is a half-beat programmer to write a server to handle the packets being sent, and voila. Quote Link to comment Share on other sites More sharing options...
oddskill Posted December 9, 2014 Share Posted December 9, 2014 Actually there is no way to avoid that ur javascript code can be stolen easily when u make it available for running in a browser.Thers some ways to make it harder to steal the code in a easily readable way (google "javascript obfuscation"). ,but in the end its reversable by anybody with a decent programming knowledge easily.You could encrypt your sorcecode and decrypt on runtime loading the key via an encrypted connection, but still at some point its readable because it has to be for the browser, and also the key is transferred or stored,so...,Binding ur code to a specific domain/ip adress is possible too, that together with obfuscation makes it a little harder to host your code somewhere else, but still with a little effort its possible to overcome that barrier.If anybody has diffrent knowledge about that id appreciate any comment, im always willing to learn. best regards odd Quote Link to comment Share on other sites More sharing options...
achexi Posted December 9, 2014 Share Posted December 9, 2014 There really isn't a whole lot you can do. The most I can suggest is an obsfucation tool like google's or jscrambler to at least try to discourage people. Quote Link to comment Share on other sites More sharing options...
agamemnus Posted December 10, 2014 Share Posted December 10, 2014 1) Minify your code. You can obfuscate it with a few different obfuscators beforehand to make it much harder to figure out. But given enough time, it can be. 1b) The more complex your code, the more difficult it is to unwind from a minifier. 1c) Your game can still be reverse-engineered without anyone looking at the code. Many large companies do this, so that is a risk you have to take, although a faint one. A recent example is KING. They, of course, are known for making a very popular Bejeweled clone that brought in billions of dollars. On the other end, there is 2048, where the basic mechanic was so simple that it was copied by hundreds of other companies and individuals. (They do claim that many other 2048 clones don't have the same fine-grained random-position generator, which makes those games extremely easy to solve, but that is a moot point since the basic mechanics is what brings the initial interest.) 2) Make your code dependent on data / account data coming in from your own server. 3) If you see anyone infringing your copyright, send an email (i.e.: cease and desist, etc.) about it to the legal department of the host of the content. In the vast majority of cases, they are not going to risk lawsuits and will take the content down. Quote Link to comment Share on other sites More sharing options...
Mrst2L Posted January 1, 2015 Share Posted January 1, 2015 You can try sitelocking your code and then obfuscating it after. Quote Link to comment Share on other sites More sharing options...
SolarJS Posted January 4, 2015 Share Posted January 4, 2015 If performance is important to you, don't use JScrambler. See here why:http://www.html5gamedevs.com/topic/5807-best-way-to-hide-javascript-code/page-2#entry65903 The process I use, which has a 0% performance impact is: combine & minify with Google Closure Compiler in Simple Mode (DO NOT use the advanced mode, it hurts performance). After that use obfuscation tools like Jasob or others. Quote Link to comment Share on other sites More sharing options...
WombatTurkey Posted January 7, 2015 Share Posted January 7, 2015 Protecting Javascript... lol You could implement Javascript as an extension in your C++ application and go that route, then use XIGNCODE for protection. (I believe the license is 10,000$+) But other then that, don't waste your time with bullshit obfuscation. Accept that JS is a client side language. Quote Link to comment Share on other sites More sharing options...
Bruno Garcia Posted January 13, 2015 Share Posted January 13, 2015 Well, like everybody said, there is no way to protect your code even if you made a .swf. The only way is to obfuscate the code with some techniques and tools available in web. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.