Archived

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

Punika

Network Game Design

Recommended Posts

Hi! I got my network code working now and I am implementing it into my Game Engine. I am thinking about the Design and how to handle Server and Client on one PC. For example how should I handle my Level. Load it twice? (one for client, one for server) Should the Server handle Bots or Singleplayer Creatures? Should the Client get all visible Objects (creature...), send this Information to the Server that it can process them. If I am having many variables that the Client and the Server use, how do I handle it when one PC is Server and Client? Many questions, I know. Hope you can answer some. Thanks Punika

Share this post


Link to post
Share on other sites
It really depends what kinda game you are making. If you are making mmorpg then client shouldn''t load any objects except map. If client doesn''t load map transfer rate will increase alot.


By the way, could you tell me how to take strings from incoming dplay message?

Share this post


Link to post
Share on other sites
Hi!
Thanks for your reply. I never worked with DPlay. Sorry. I am working on a 3D Shooter. I would like to know if Quake or Unreal load there Level twice. One for the Server one for the Client.

Thanks

Punika

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Well the FPS proably structure their arch so if it''s a single player game the client directly references the servers data structures, as they proably operate upon similar if not exactly the same underlying data structures, and the server just forgoes the step of sending the info to the client, as it has direct access to the servers information. It wouldn''t be wise to duplicate the data structures and emulate a virtual connection between the server and client, if you can avoid it, as you''ll be consuming 2x the cpu for doing the samething in the game simulation code, the server ofcourse doens''t have any rendering code or sound.

-ddn

Share this post


Link to post
Share on other sites
Half-Life for example actually send network packets internally (this is how fakelag etc... works).
So client and server parts have at least got seperate entity arrays. This can be an advantage because it makes the programming model more simple and consistent. On the other hand, it may be a waste of space, obviously. So if you''ve got a data structure which can easily be shared between client and server parts (such as the map''s BSP tree), you should do so.

cu,
Prefect

Share this post


Link to post
Share on other sites
You should have the client load all data like levels models and sprites. The server should tell the client what to load and where to put it. On a client/server game on one machine, load the level once and use it for the client and server parts. This will require some extra coding but its more efficient. On a network, the server and client should have the level loaded.

Share this post


Link to post
Share on other sites
Hi!

I am programming it, but it''s really hard work. It much more complicated than get some Stuff on the Screen. Hope my design will let me at all the other stuff later...


Bye

Punika

Share this post


Link to post
Share on other sites