Live data from Hacker News

Browser Games Aren't an Easy Target

jakob.space

31–40 of 52 posts

Re: Browser Games Aren't an Easy Target

#31
post #20
post #17

Earlier quoted context omitted.

Javascript can be obfuscated too. What is the difference?

Well, someone went to the trouble of writing a Rust binary just to hide the game code, when they could have used standard JS obfuscation instead. This suggests to me that WASM has some properties that make reverse-engeneering harder than obfuscated JS could do alone. This would give some validity to the fears of WASM becoming the "new Flash" that were voiced when it was still in development.

[deleted]

Re: Browser Games Aren't an Easy Target

#32

Alas, we killed Flash. It's undeniable that that technology enabled a Cambrian explosion of creativity.

Yeah, Flash created a golden age of indie animation and gaming. Although I think Macromedia has more to do with that than Adobe. Macromedia Flash was both affordable and easily pirateable, putting it in the hands of millions of budding artists.

Then Adobe bought it and duct-taped it to the Creative Suite and switched to a subscription-based business model.

Re: Browser Games Aren't an Easy Target

#33
post #24

It's slightly annoying that when I create a new game (for the browser) or think of ideas for games I inspect things through the lens of cheat-enabling. It happens to the point that I dismiss ideas based on the fact that there is no viable way for me to stop cheating when it leverages it. The funny thing is that I did most of what I could (source-like networking) and basically no one plays my games so the risk of chea…

that does kinda feel like premature optimisation. First make a game. Second make a game that people want to play. Third make a game that people want to hack. Then maybe look at stopping them from doing that.

Hard to resist that nagging thought, though.

Re: Browser Games Aren't an Easy Target

#34
post #24

It's slightly annoying that when I create a new game (for the browser) or think of ideas for games I inspect things through the lens of cheat-enabling. It happens to the point that I dismiss ideas based on the fact that there is no viable way for me to stop cheating when it leverages it. The funny thing is that I did most of what I could (source-like networking) and basically no one plays my games so the risk of chea…

that does kinda feel like premature optimisation. First make a game. Second make a game that people want to play. Third make a game that people want to hack. Then maybe look at stopping them from doing that. Hard to resist that nagging thought, though.

Knowing and designing around the unavoidable wave of cheaters is extremely important when building online games.

If you build a multiplayer game then come back to "deal with cheaters" only a few months before launch (or heaven forbid, after launch) you're probably going to end up taking the easy route by using invasion ~~spyware~~ DRM solutions, which don't stop cheaters once it's broken. To contrast, designing the game around cheaters means you might actually implement sane networking design, such as nearly everything being server-authoritative, aka. "never trust the client". If your client is broken in to, the best your cheaters can do is script the game (scripting cheats are currently the only ones available for Dota2 and probably League of Legends) or see a small amount of information that's otherwise unknown (for dota 2 you can see which enemy illusions are fake, for example).

Of course this approach can be taken too far, eg. in Call of Duty: Modern Warfare (the new one) sometimes your camera positioning can lag due to packet loss; this probably stops some aimbots but things like camera orientation probably shouldn't be handled server-side.

Re: Browser Games Aren't an Easy Target

#35
post #24

It's slightly annoying that when I create a new game (for the browser) or think of ideas for games I inspect things through the lens of cheat-enabling. It happens to the point that I dismiss ideas based on the fact that there is no viable way for me to stop cheating when it leverages it. The funny thing is that I did most of what I could (source-like networking) and basically no one plays my games so the risk of chea…

Why do you say "for the browser"? Unless you are working on a system with a ludicrous amount of effective DRM (which I hope we all hate for other reasons, and which means we are only really talking about consoles: the closest casual gaming platform you are going to get to "locked down system owned by the manufacturer" is an iPhone, and in practice they don't go quite far enough), players are always going to be able to modify your code: you can't prevent a user "cheating" (which I put in quotes, as I feel like you need to really question whether the environment you set up where that matters isn't somehow itself broken; maybe you are already doing that by "source-like networking", but I don't know the terminology context).

Re: Browser Games Aren't an Easy Target

#36
post #20
post #17

Earlier quoted context omitted.

Javascript can be obfuscated too. What is the difference?

Well, someone went to the trouble of writing a Rust binary just to hide the game code, when they could have used standard JS obfuscation instead. This suggests to me that WASM has some properties that make reverse-engeneering harder than obfuscated JS could do alone. This would give some validity to the fears of WASM becoming the "new Flash" that were voiced when it was still in development.

To be fair, they probably have more practical reasons for using Rust than simply to obfuscate the code.

Re: Browser Games Aren't an Easy Target

#37
A very decent breakdown of some more modern obfuscation and deobfuscation techniques. It's nice to see some Rust getting used as well, I wonder if it's made things easier or more difficult for the krunker.io dev in the long-run.

Re: Browser Games Aren't an Easy Target

#38
post #16

> So I went back to the debugger and placed some breakpoints around where the WebAssembly module is loaded, realizing that its only purpose is to deobfuscate the JavaScript that eventually makes it into that "SOURCE" pseudo-file I saw earlier. [...] > So… the WebAssembly is essentially generating JavaScript on-the-fly. Of course, all renditions of the code do the same thing, but the variable names are changing. [...]…

JavaScript has it covered pretty well. http://www.jsfuck.com/

jsfuck is hardly obfuscation: remove the first 828 bytes (for "eval(") and the last 3 bytes (for ")()"), and then execute the remaining string, and that gives you the original source code.

Re: Browser Games Aren't an Easy Target

#39
post #24

It's slightly annoying that when I create a new game (for the browser) or think of ideas for games I inspect things through the lens of cheat-enabling. It happens to the point that I dismiss ideas based on the fact that there is no viable way for me to stop cheating when it leverages it. The funny thing is that I did most of what I could (source-like networking) and basically no one plays my games so the risk of chea…

The only way to stop players from cheating in a multiplayer game is to make the server the authoritative source for any information you want to stop players from messing with.

If it's a single player game, then who cares?

Re: Browser Games Aren't an Easy Target

#40

Earlier quoted context omitted.

I wouldn't have thought to look there. I'm sure there's many ex-flash devs who would be happy to check it out if they knew.

Any ideas on how best to reach them?

I know lots of indies that hang out on twitter, maybe some appropriate replies or hashtags for people searching?

There's also a handful of forums, gamedev.net tigsource and others.

StackOverflow is a common place to search for answers, if you can find questions asked about "what can I use instead of flash" without coming across as an advertisement.

Post reply on HN