Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to make a kind of online game, completely in JavaScript, using the <canvas> and socket.io. The general How is covered, there are just some minor problems with the design and architecture I want to ask some people with experience (i.e. you).

  1. Can I trust the client?

    In a game with a dedicated client (about any MMO), the collision handling and animations are handled by the client. For that, a specialised protocol is employed. My game will not have complex levels, but communicates over HTTP, using JSON. So can I trust the client with collision detection and interaction, or should the server do that? And can I trust the client with executing simple commands like emotions?

  2. Update often vs. Update collected

    Using socket.io, I have a communication similar to that of other MMORPG, a steady connection with messages. In my design so far, the client sends the player's position and animation frame with every update frame. When the server gets that message, it broadcasts it to all the clients, which will then move the graphic accordingly. Would it be a better idea to 'collect' these and broadcast them, say, once in 1/10 of a second? Also, should the client send many different messages (exp gained, clicked on item) or rather just one collected?

  3. Different Channels for Game and Socials

    I heard that especially 3D-MMORPGs channel their chats over entirely different servers. I can't do that, but maybe convince socket.io to employ different ports and thus different node.js server programs.

  4. Useful Persistence

    Does it make sense to save the player's coordinates and state with every time they send it? Node.js can do that easily without blocking a response, and I want to employ a Mongo database, but maybe it's more appropriate to do that once a second, in a server-wide event.

Uh, that is what I have in mind for now. I hope these don't seem stupid, I kind of can't discuss them somewhere else.

share|improve this question
3  
Separate questions should be separate questions on the site. This is so that 1) you can mark a question as "accepted" even if it only touches on one particular topic and 2) I will be useful for further visitors of the site when looking for a particular topic of conversation. – Tetrad Nov 2 '11 at 18:44
Point #1 is a dupe of this question: gamedev.stackexchange.com/questions/3884/… – Tetrad Nov 2 '11 at 18:45
Don't trust clients. The server should be running the game and the clients should merely be viewing the game and telling the server to do stuff. – John McDonald Nov 2 '11 at 19:03
@Tetrad: I did not want to be looking like I am spamming with 4 questions at once. But if it's ok I will ask the last three seperately as 1 seems to be covered. – Lambda Dusk Nov 2 '11 at 19:06
1  
Don't worry about spamming. If you have a (good) question, ask it. If anything we need more good questions. – Tetrad Nov 2 '11 at 19:18
show 1 more comment

closed as not a real question by Tetrad Nov 2 '11 at 20:54

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.