• Advertisement

Archived

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

Role of the engine/client/server in an MMORPG

This topic is 5063 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering what exactly the role of the engine, client, and server is in an MMORPG. Is collision detection client or server side? Thanks for the help.

Share this post


Link to post
Share on other sites
Advertisement
Well, it''s all really dependant on the game. Here''s how I see it.

The engine is used to present the eye( ear? ) candy to the player as well as to control the spatial stuff. ''Engine'' is a pretty loose term, usually broken up into different areas like sound, input, video, networking. Etc. They are the base systems that you use to build your game.

The client is responsible for displaying this stuff, taking player input and sending this data back to the server and updating with any information the server sends back.

The server is responsible for handling all the network traffic, storing player details, managing NPCs, quests etc. The server is responsible to make sure that data comming from the client is valid.

Depending on how you design things then there can be a lot of overlap and shared code between client/server. Depending on how detailed you want it you can do all the collision detection on the server and send that to the client. That may not be practical though since it could really be a lot of CPU power. One option is to do most of the collision detection on the client random spot checks on players to make sure they are not in some sort of "Ghost" mode.

The idea is that any client is not ''trustworthy'' so you have to be careful about any data comming from the client. For example if a client sends back to the server "I hit orc for 10000000 damage" then your server should make sure that is possible

-----------
Andrew

Share this post


Link to post
Share on other sites
Thanks for the reply. One way I was considering handeling the collision detection was having an encrypted file on the users computer, and letting the server do random checks like you mentioned.

I thought perhaps a way to protect the tile data file would be to have the client check the file/rewrite the file when it the client is opened. Do you think that could work?

I dont like the idea of the server handeling all the collisions because X amount of users, all requesting collisions every second or so could probably lag the server.

[edited by - mothman13 on June 9, 2004 6:20:31 PM]

Share this post


Link to post
Share on other sites
No matter how good you think you can encrypt things people will find a way to break it. So it''s a fine balance of trying to offload work to the client that doesn''t affect game play while keeping the information that is critical only done on the server.

Of course there are several fancy ways around this as well like the voting system. Where the server sends out the same set of information to a group of clients. They do the calculations and send back the results to the server. The server then checks all the result and used the one most common. Again this can still be broken by just having a lot of ''tainted'' clients.

It''s a constant struggle

Share this post


Link to post
Share on other sites
If you make a good object oriented game you should think data, not code.
The client owns the render device, sound device, input device etc.
It also owns the scene tree, a treelike structure that holds all game objects, the world at the top, static data (trees buildings rocks etc), dynamic data (npc''s walking around, dropped objects), the player, camera, inventory for every player and npc.
The client transforms the data of the scene tree into a list of objects to render, then draws that list.

The server has the authoritive scene tree, and updates all changes to it through network messages. The client receives those and updates the scene. The client also sends movement of the player and actions (attact, drop, pick up etc), the server can process those or if illegal ignore them. Because the player is just one of the objects in a scene tree which is continously updates from server to clients, moving through a wall will send a message to the server with new position and direction, but the server will do collision and update the client with a message (position of object x is (a,b,c)) which means the attempt to move through the wall didn''t work.

The game runs on the server and updates the server scene tree in a loop, every update/delete/new generates messages in a list, because they are properties. The game knows all the game rules, and updates the objects because they are moving/fighting/influenced by a timer.

The network code on the server looks at that list and sends state updates to all clients that are interested in those objects.

Share this post


Link to post
Share on other sites

  • Advertisement