Archived

This topic is now archived and is closed to further replies.

krismort

Client Server sollutions?

Recommended Posts

Hi does anyone know some desent client server solutions for games like mmorpgs ? Like: How does the server handle monsters / players / NPC''s ? Is it best to have the client just drawing the monster and have the the server generating all movings...sending thoose to the clients in the nearby area ? What shpuld happen when a player drop a object from his/her inventory on the ground ? Should the server notify all the clients when a new player logs into the game ? or should it only notify thoose in the nearby area ? //Kristian Mortensen www.lok.punkersoft.dk kristian@punkersoft.dk

Share this post


Link to post
Share on other sites
First of all, only send game information about the nearby area. Everything else would just flood the clients out of the game.

Secondly, the entire gamelogic must run on the server. This is necessary to prevent cheating. Ideally, a player would just send a command "I want to move north" and the server then checks for collision, stamina, whatever and sends "Ok, you''ve just moved one tile north". Of course this can result in major lag between the player clicking and the avatar moving, so you will eventually want to have some kind of clientside prediction. However, the server must have the final say.

It''s probably easier to build a model without clientside prediction first and test it over a LAN. Later, when you test over the internet, you''ll notice which parts might need prediction, and you can then work on those.

cu,
Prefect

Share this post


Link to post
Share on other sites
The rule is basically that a message must be sent to everyone who is affected by what caused the message to be sent. If an item is dropped on the ground and there''s no other way for the client to be notified of it later the message has to be sent to everyone in the map when it happens.

If a character is just moving it only affects those people that can see it because other clients will pick it up when it moves into their view.

It''s best to start everything off as single player only. So moving and dropping items and what not is dealt with at the client only. Once you have them working properly, then move them to the server.

The hard part is making everything generic enough that moving it to the server doesn''t require changing the code.

Ben



Share this post


Link to post
Share on other sites