I'm in the middle of planning a game built using JavaScript and HTML5.
I'm having trouble understanding how you could prevent someone from simply copying the JavaScript from the web server and either making their own game with it (not my biggest concern), or substituting their own JavaScript functions and dashing any hope for reliable clients in the wild if the game was to eventually support multiplayer.
Can anything be done to prevent just anybody from reading the JavaScript?
If not, should all game processing be taking place on a server somewhere with the client's only responsibilities being capturing user input and drawing graphics?