Mmorpg client/server concepts?

Blitz3D Forums/Blitz3D Programming/Mmorpg client/server concepts?

fall_x(Posted 2005) [#1]
Hi,

Can anyone help me on understanding some multiplayer concepts? I know how to do netwrk programming with blitz, sending packets etc, but I really can't get my head around what happens on the server and what happens on the clients.

I assume that when a player connects (or enters an area), a "state" of the area is sent with the positions of all players and enemies. I also assume that the clients work with a command buffer that stores commands that get there either trough the network or by local actions (key presses etc).

But what happens when, for instance, a player presses the button to walk forward. Does his client send out a "keydown x" command and when it is released a "keyup x" command to the server? Or does it send some command for each frame that the key is down? Or does it work with sending coordinates?

And what about enemy AI? Is this all done on the server?

Does anyone know of any tutorial/document that explains this, or could anyone explain to me how this works?

Thanks a lot!


PS: I'm not some newbie taking on an overly ambitious mmorpg project, it's mainly curiousity.


Rroff(Posted 2005) [#2]
AI would normally all be done server side, although I did see a document once for distributed AI processing that involved all clients in a zone, not sure if it was something that was really useable or just a concept. However the AI movement (and other objects) would normally be predicted to a degree client side.

What you would need for things like key presses is a "reliable command channel" which would be checked to make sure the server always recieved the client's latest input commands. Unless bandwidth is an issue you can probably get away with sending a complete client state to the server each frame including what keys are being pressed...

There are a couple of good basic FPS networking examples in the code archives here that would prolly be worth checking out.

PS :D there are 2 types of newbie IMO the first type don't even know what the windows registry is and think they are gonna code a 3D game, the other type which I think we both fall into, are technically minded but not experienced enough to know quite how ambitious the project is we are taking on, I don't think thats a bad thing as its usually a great learning experience and a big step towards eventually being good enough to achieve that goal.


GC-Martijn(Posted 2005) [#3]
I'm busy with making a very super simple 2D server/n client's game.

But now I have a big problem with 1:1 sync.
->
http://www.blitzbasic.com/Community/posts.php?topic=46680

as you can see, the best thing to learn is to try.


Rook Zimbabwe(Posted 2005) [#4]
nah GC I think you need to add to your gauge a bit...


_PJ_(Posted 2005) [#5]
http://www.gamedev.net/reference/programming/features/ws2games/page2.asp

______________________________

it's basic but givs a brief view of the architecture.

Ideally, MMorpgs have most processing done server-side. This is not so possible for home-based dedicated servers which may not be fast/powerful enoug to porcess and transmit all the required data, whilst tracking what's going on in the world.

Advantages of the server taking the strain are many and varied:

Clients freed to process more efficiently
Security of files, and makes cheating harder
Less to update and housekeep on Clients

to name just a couple.


ozak(Posted 2005) [#6]
Actually even a small server can host an online rpg of about 100-200 users. You just need to be smart about it.

Also, never trust the client. Do all things serverside (unless it hurts performance too much but you can fix it with dead reckoning etc.) for maximum security :)