Multiplayer Code design
I''m the leader of a project a couple of friends and I started
about half a year back. We finally designed what we want our
game to look, and play like. Now we face the problem of code
design. We are looking to code a space-combat game that is
multiplayer, and very fast paced. Basically, a Quake3 re-done
to have the same fast action as a space-combat. The game will
have little to no single player. So, basically, the whole game
depends solely on the network code. The only problem is that
none of us know how to design a game for network play. I figure
that we don''t want to be transfering very much data for each
client to save bandwith. But every once in a while, a larger
update will be required to keep the clients in sync. Some major
tracking of time will be needed, and also some cubic splines to
predict player movement between updates. So the big question is
how do I build the foundation of the game in order to accomplish
this in a scalable/modular way that should allow for the
implementation of the rest of the game-design? I guess it should
be something similar to how Quake3 handles net code, but I have
no idea what that is. I''m not looking for actuall net code or
the implementation to any form of lag handling. Just a nice way
to design the basic structure of such a fast paced game.
I''m feeling kind of stuck, because it seems that a good network
based game would take the network into consideration when the
gameplay code design is created, but the network code design must
also take into consideration the gameplay code design. Anyone
know a book that describes fast paced game network coding? lol,
it''s a pretty select target for a book, but I need it . Right
now, I need anything... a starting place, an article, even an
idea.
If you''d like to know more information about the project, or
want to get in touch with me for anything that deals with the
project, please email me at riptide@linux3d.net.
- RipTide
------------------------------------------We shall not cease from explorationAnd the end of all our exploringWill be to arrive where we startedAnd know the place for the first timeT. S. Eliot
It''s not actually that hard to develop network games. You just need to decide on your method.
Is all the data going to go into and out of a main server, or are you going to do something more like a peer-to-peer thing so all the clients communicate to each other and the server takes a peripheral role (maybe just houses overall data, maps etc).
Basically the hard part is getting all the clients talking together but once you have that going, it''s just a matter of continuous data feed rather than large single packets.
One way to do this is to generate a shorthand way of sending the data and only send enough so that the client can plot what is happening. Basically all you need to know is positional data and relative velocities etc. If you have all of that then the client can determine what is going on.
Obviously if there are dozens of players, this gets somewhat intesive, but no matter how much data you are communicating, you should be able to rack up 32 players without too much effort.
I haven''t seen any good articles on Network Game programming but it is pretty much common sense:
- Utilise as little data as needed to represent the game.
- Compress if possible (compressing and decompressing is always going to be faster than sending a big chunk).
- Limit the number of players.
- Make the client do the heavy processing.
- Use the server only intermittently to update the game environment (who is still playing etc).
I hope that this has helped a little bit? There is an article on here about producing a Chat server/client in VB. That might be worth a skim to understand the fundamentals of client/server architecture and how it all works.
-- And that''s my $0.02 worth --
Hang on, where I come from, $0.02 is rounded down. Does that mean my opinion is worthless or priceless?
Talent2
Is all the data going to go into and out of a main server, or are you going to do something more like a peer-to-peer thing so all the clients communicate to each other and the server takes a peripheral role (maybe just houses overall data, maps etc).
Basically the hard part is getting all the clients talking together but once you have that going, it''s just a matter of continuous data feed rather than large single packets.
One way to do this is to generate a shorthand way of sending the data and only send enough so that the client can plot what is happening. Basically all you need to know is positional data and relative velocities etc. If you have all of that then the client can determine what is going on.
Obviously if there are dozens of players, this gets somewhat intesive, but no matter how much data you are communicating, you should be able to rack up 32 players without too much effort.
I haven''t seen any good articles on Network Game programming but it is pretty much common sense:
- Utilise as little data as needed to represent the game.
- Compress if possible (compressing and decompressing is always going to be faster than sending a big chunk).
- Limit the number of players.
- Make the client do the heavy processing.
- Use the server only intermittently to update the game environment (who is still playing etc).
I hope that this has helped a little bit? There is an article on here about producing a Chat server/client in VB. That might be worth a skim to understand the fundamentals of client/server architecture and how it all works.
-- And that''s my $0.02 worth --
Hang on, where I come from, $0.02 is rounded down. Does that mean my opinion is worthless or priceless?
Talent2
-- That's my $0.02 worth --
Hang on, where I come from, $0.02 is rounded down. Does that mean my opinion is worthless or priceless?
CHROM
Hang on, where I come from, $0.02 is rounded down. Does that mean my opinion is worthless or priceless?
CHROM
A good academic treatment of the subject is Singhal and Zyda''s Networked Virtual Environments. It will give you a good overview of the ideas behind multiplayer games. It''s considered the bible by academics.
Unfortunately, the book is so forward thinking that it prefers to talk about client to client models (their theory is that client server models are not nearly as scalable as client to client models. . . an interesting, counterintuitive point that they prove in some detail.) It also ignores implementation details.
So . . .
Check out directplay -- it greatly simplifies implementation details of networked game play and supposedly adds features that allow massively multiplayer. Getting a simple client server program running using directplay is very easy . . . optimizing the netcode is very hard and takes a great deal of knowledge: most of which can be found in Singhal''s book. =)
In other words, you need both a technical implementation of sending packets (direct play is very easy) and an overarching understanding of networked game design (Singhal''s Book.)
DmGoober
Unfortunately, the book is so forward thinking that it prefers to talk about client to client models (their theory is that client server models are not nearly as scalable as client to client models. . . an interesting, counterintuitive point that they prove in some detail.) It also ignores implementation details.
So . . .
Check out directplay -- it greatly simplifies implementation details of networked game play and supposedly adds features that allow massively multiplayer. Getting a simple client server program running using directplay is very easy . . . optimizing the netcode is very hard and takes a great deal of knowledge: most of which can be found in Singhal''s book. =)
In other words, you need both a technical implementation of sending packets (direct play is very easy) and an overarching understanding of networked game design (Singhal''s Book.)
DmGoober
Alexander "DmGoober" Jhinalexjh@online.microsoft.com[Warning! This email account is not attended. All comments are the opinions of an individual employee and are not representative of Microsoft Corporation.]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement