What are the possible downsides to using (client side) JavaScript when creating a multiplayer game?
Game description: It's an MMORPG/RTS. That means players actively contribute to structures in the world and create much of the content themselves.
What are the possible downsides to using (client side) JavaScript when creating a multiplayer game?
Game description: It's an MMORPG/RTS. That means players actively contribute to structures in the world and create much of the content themselves.
It's fine if:
Whether or not your game is a good fit for JavaScript development depends on the game. You didn't describe your game, so there's no way for us to answer the question in the title.
However I can say that your hacking concern is not a problem here. Not because JavaScript can't be hacked (it can, and easily) but so can every other client-side technology. One of the basic tenets of multiplayer game development is "never trust the client". Design your game in such a way that anything you need to protect from hacking is running on the server, because the client will be hacked. This means only send UI commands from the client (eg. "the player clicked the Bomb button") and calculate the results of player actions on the server. Then the server sends back to the client the results of those actions.
Since no matter what technology you relied on you should design your game with the assumption that the client-side component will be hacked, the hackability of JavaScript isn't a consideration when deciding whether or not to use JavaScript.
People can change the client code in order to cheat, that is a problem for any multiplayer game. If reaction speed or speedy solving of mathematical tasks is a part of the game you can't completely prevent cheating.
For any other game element you must ensure that the client won't and can't obtain information that is supposed to be hidden to the player. And of course the server must validate that every action taken by a player is legal.
The greatest problem I see in JavaScript games is that a lot of browsers have a tendency to stutter, especially Firefox was pretty bad last time I checked. For this reason JavaScript is not a good choice for timing-sensitive gameplay. But for turn-based or at least slow-paced games JavaScript can work quite well.
Changing Javascript variables is pretty easy to do with tools like Firebug (for firefox) or the build in dev tools of Safari/Chrome. You can simply type in javascript in the console and it'll get executed. As a simple rule, do not rely on the client side for security. Apart from that, with the introduction of the HTML5 canvas element, javascript offers you some real possibilities for simple games (There is a full javascript/html5 version of Angry Birds for instance).