i didnt see any topic on this subject so i started one :) i have a few questions (just theoretical) about how to write a good MMORPG.

Example: say i want a game that supports up to 500 players simultaniously, i want the characterdatabase in the server (prevent item cheating etc).
So characterdatabase is serversided because of security risks, but now im wondering which things would be good to make server and which are good to make clientsided without having to use a supercomputer with 10 fiberglass internet connections as server offcourse :)

Scorpie

or maybe someone can provide me with a link about this subject?

edit: if my post isnt clear enough please tell me so i can try to improve it
Posted on 2005-02-07 14:28:13 by Scorpie
If there is to be one single server for all players, then IOCP should be used for the server. It can easily handle a couple of thousand concurrent connections.
If you want to handle more players than that, then you think about a layer of "intermediate servers" which are connected to the master server.
Each of these could handle some of the players, with the main server keeping track of all players and routing replies to them. The cost of handling more players this way is the lag introduced by adding the extra hop plus processing time. You have effectively created a "multihomed network" which distributes the load across the server network.
Posted on 2005-02-08 04:04:29 by Homer
thanks for the reply and yea i forgot to mention i want to use one single server for this 500 players. and IOCP sounds like it can easily handle the number of connections but i want to know more about how to keep the amount of data send over this 500 connections as low as possible.

What about player actions (certain movement like jumping for example), client calculates animations offcourse but who checks the action itself, make the client calculate it and send info to the server that player #a is making animation #b positioned at x,y,z with viewing towards vx,vy,vz which will be sended to clients, would this be a good way? since making the clients only send command to server (like jump) and make the server calculate 500 players wouldnt seem that logical but is this a good way or are there better ways to handle this kind of thing?

And what about the world itself, do you need to give all players the whole map and the server sends extra info like NPC's etc to them? and if it does, does it send all data to all players or do you make the server send area specific information (so only npc's in a certain radius around the player).

Hope this post makes more sence about what i want to know, Scorpie
Posted on 2005-02-08 10:02:38 by Scorpie
imho a single server can handle alot. look at runuo, www.runuo.com. handles all the world every thing on one pc. you only want to process messagges to other players that can see the player preforming the action. like if your jumping you dont need to tell all clients your jumping, just the ones that can see you.
Posted on 2005-02-11 21:31:00 by Qages
All players should have the world map.
Collision detection should be performed by the server to prevent various kinds of cheating. Your notion of sending minimal information to clients about the actions of other players is valid and is the defacto standard, and its worth mentioning that GAMETIME should be controlled by the Server too, and therefore the "minimalist" packets should contain at least a TimeStamp from the Server to indicate the time the event occured (or should have occurred but didnt due to transmission lag).
Posted on 2005-02-23 07:18:13 by Homer
By colision detection you mean all colision detections? i mean even with objects and so on?
I understand if you make clients do the collision detection they can make cheats like wallhack but i think making the server calculate it will give a bad gameplay since all your movements are preformed with latency since you should send the server you want to walk forward the server checks where you are and sends back if you can move forward or stay at your current position.

And i like the TimeStamp idea, so you dont waste cpu power on (very) delayed packets which contain things that may not even be in your sight anymore.

Scorpie
Posted on 2005-02-23 09:32:32 by Scorpie
is there no a posible way to protect against this ways of hack???


For example I think in some like by each user connected to the server you send a "key" or some for calculation in X place of the map and if this key pass in other place of the map (for check in the server), you kick them out :P.


Also if is posible like have in a ordered way this keys, for example, you can keep in the server the anterior key of the user, say it was 5, then the only other keys that are accesible are for example: 4 and 6 if the user send a packet that is "cypted" or accessed with a number of 8 (trying to kick others people ass :P) you know that is not posible with key 4 get key 8 ...... and you reduce the calculation of objects collision to take care if is posible to get such sequence or not....




Something like a validation scheme, you let the users do the collision detection....


Or also a similar way.... why dont you let this work to the two others PCs?????


With the same anterior scheme, you assign a key to a object that is moving (a player or a shoot) When a guy is interacting with other people out there, then the two PC handle the collision detection and the checking for hacks....




In the next draw, what is near to object @ is not near to object & in that way only the objects that are related (can watch themselves or have a direct draw) in such cases the interaction with the world would be work of the server ie, watch that is not like a ghost and walk tru the walls or shot tru the walls (and because is something static.. ie only interacting with the world, pheraphs can be done in a secure but easy and fast way), but when to objects or more are interacting and each one have a PC (that is not the server), the work of check for the hacks of walk trought the walls and shoot in the walls is handled by the others PCs in that way when two objects are finally interacting a more in depth calculation of collisions can take place instead of the one handled in the server that is mainly for checking of no hacks.....




? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? | ? ? ?## ? ? ? &? ? ? ? ? ? ?
? ? ? ? ? ? ? | ? ? ? ? | ? ? ? ? ##? ? ? ? ? ? ? ? ? ?
? ? ? @ ? ? ? ? | ? ? ? ? ? ? ? ? ?### ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? | ------- ? ? ? ? ###? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#### ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? %%%? ? ? ? ? ? ? ?##### ? ? ? ? ? ? ? ? ? ? ?
? ? ?%%% ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


Here the objects @ and & are not "connected" and is work of the server to take care of chats...




? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? @? ? ? | ? ? ?## ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? | ? ? ? ? | ? ? ? ? ##? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? | ? ? ? ? ? ? & ? ?### ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? | ------- ? ? ? ? ###? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#### ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? %%%? ? ? ? ? ? ? ?##### ? ? ? ? ? ? ? ? ? ? ?
? ? ?%%% ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?


Here the @ and & can be connected to take care each of them of the other....









By the way, such concept can be extended in other way, divide the map (at runtime or static) in diferents parts and assign the more near players to take care of this part of the map :), you can connect 2,3,4 or a nice number of PC for watch a low but suficient traffic of the others guys for check for hacks......




And the work of the server will be at less have one computer watching the other, mainating low traffic for 56K modem, connect more people each with other 2 or more if posible...
Posted on 2005-02-23 10:57:49 by rea
ALL COLLISION DETECTION SHOULD OCCUR SERVERSIDE.
The only exception is for "collisions that don't matter" - like rubble deflecting from walls after an explosion. These are special effects and not really a game element.

Bear the following in mind:
#1) The server does not need to render ANYTHING, it could for example be CONSOLE based.
#2) For a distributed (multihomed) network, the collision calculations are performed by the first-order ("gateway") servers, and not by the "master server" - thus the workload is distributed over N machines, same advantage as you get doing it clientside but without the possibility of cheating.

The success (or lack thereof) of your game hinges GREATLY on public perception - if people stop having fun due to your lack of control over your own creation, who should you blame?
Posted on 2005-03-01 03:47:45 by Homer
....
The success (or lack thereof) of your game hinges GREATLY on public perception - if people stop having fun due to your lack of control over your own creation, who should you blame?


True, i agree but from a gamers point of view i wouldnt have much fun when i can only play with a ping of 50 max. i mean having a latency of about 100ms everything you do will be preformed 100ms after you wanted it to happen (especialy with walking and jumping this can be very very anoying).
I'd seem more logical to have both the client and first-order server calculate it, the client calculates and it has a smoothg gameplay then and the server checks the colisions so players wont be able to cheat. (im mainly talking about collision with the world now to prevent wallhack and such)

Scorpie
Posted on 2005-03-01 11:07:59 by Scorpie
There is a solution (at least a partial one) to the latency issue.
Assuming that the first-order server is responsible for collision calculations and assuming that the Master server is Authoritative for GameTime over the entire game... what happens if the F.O.S. sends a collision message to the MasterServer with a timestamp, and then the MasterServer integrates this information forwards in Time?
What I'm trying to point out is that the TimeBase can be skewed across servers to take up around 50% of the hop-induced latency, such that on client machines, the game is running "ahead of Time" by the total latency between that client, the F.O.S and the Master.
There was a really neat tutorial describing this over at GameDev, I'll see if I can rustle up a link.
Posted on 2005-03-01 22:42:36 by Homer