Advertisement

Multiplayer Design

Started by July 04, 2002 12:04 PM
2 comments, last by salqadri 22 years, 5 months ago
Hi, Currently we are well underway developing a big 3d space shooter game. however, right now our development is being done with only single player in mind, but have tried to make sure all our code is perfectly modular and 100% OOP so that it might be easier to create a multiplayer version when we are ready. But since this is a game design forum, maybe someone could tell me the basic requirements to develop a multiplayer game. In what way must be design our game. Should we actually develop our single player version based on the client/server model? Actually, how does the game code need to be structured in order to produce a multiplayer game. Do I need to make two separate applications, one the client one the server? And if so, how do I make them interact? Also, if they are to be seperate applications, how can one efficiently develop such an application as it would be difficult debugging/coding our game with two applications running at the same time. i''d just like someone to give me a good overview on the requirements in game design and structure in order to implement something that will allow easy integration for the single player and multiplayer modes. thanx, Salman
And you want this in twenty words or less?

The simplest aproach is local client/server apps for your initial game as it scales up to true client server with the server component on anoter system easier. That said you dont have to start that way.

However I would look at least to have all the interactions between the the 'player' client systems and the AI/processing engine carried out via a pipe or something similar otherwise you'll lock yourself in.

The basic model Im using is:

Client Class(es)<-------->Interface Class(es)<------>World Class

Then I will add a client side interface class and a server side class to replace the 'Interface classes' for the multiplayer system.

By developing each part as libs makes the interfacing consistant no matter which interface has been slotted in. It also means that the interface classes will hold any encryption etc. which as Im writting an open source game is important (I wont make the encryption lib open source).

My only real suggestion is to hit the articals and books. This is too big an area to really cover here. I would suggest however that you practice using a simple protocol to get the componts working. As to debugging multiprocessor apps.... thats the fun bit!

Try having a look at examples of similar apps (www.sourceforge.net search for games etc). The documentation may not be brilliant but the code is usually straight forward. Why re-invent something when you can learn from someone else? That way you can work on content and not on the tedious practical bits! (Open source is like a huge cookbook of ideas!)

Good luck.

BaelWrath

If it is not nailed down it's mine and if I can prise it loose,
it's not nailed down!

[edited by - baelwrath on July 6, 2002 7:53:13 AM]
BaelWrathIf it is not nailed down it's mine and if I can prise it loose,it's not nailed down!
Advertisement
Hey Baelwrath,
thanx a lot for your message. I like your idea about interface classes. so basically, i''d better act early before the game gets too big, or else i might lock myself. also, I think I should start off with trying to determine what parts of my program should be on the client, and what should be on the server side, and also what may be required in the interface classes. and if multiplayer design is as big as an issue as you say it is, i will definately look up read up on it more. i''d like to ask btw, what technologies are available for decent multiplayer gaming. i know directplay 7, never touched directplay 8 (is it too different) however i am using opengl for our graphics and would prefer not to have directx as a requirement for the game. i know that directplay 7 required altering the system registry in order to allow lobby play. is there a way of running directplay 8 without directx8 installed? it is possible to use directinput8, as all you need is the dinput8.dll file, but im not sure about directplay. thus, i was wondering what other good technologies are out there for me to use.
thanx,
Salman
You should have a look at the Microsoft DirextX library, the DirectPlay part. The interfaces are not that bad and it is actually using a messsage based approach. This would or could give you a good start for desgining your own communication layer.

Be carefull with encryption. Sign and check the integrity of your application, too, otherwise the encryption is totally useless and easily broken :-) In one application we write we are currently writing a module regularly checking that there is no debugger attached to the application process :-)
RegardsThomas TomiczekTHONA Consulting Ltd.(Microsoft MVP C#/.NET)

This topic is closed to new replies.

Advertisement