C Senthil Kumar

I am developing a simple FirstPersonShooter game. Right now, there are no plans for multiplayer mode. So, I decided not to have server-client architecture (partly because I don't know how to implement it!).

But later, if I wanted to extend the code for multiplayer support, should I remodel the entire game to server-client architecture Or are there other ways How difficult is it to write a server-client architecture as opposed to a normal monolith application

I am new to this online game programming, so I need some help with this.

Thanks.




Re: Game Technologies: General Server Client architecture

Jim Perry

Why not just worry about getting the single-player version done first.




Re: Game Technologies: General Server Client architecture

Inaki Ayucar

Well, it depends on what you want to do. You will have to choose the proper communications platform and learn how to use it.

Appart from that, you may have some things in mind from now, in order to save work when you want to port your game to multiplayer mode in the future. For example:

As players and other objetcs¡¯ info like position, orientation, ... will come through the net in the multiplayer version, it¡¯s a good idea to stablish from now a separation between that objects and the rest of your engine. Instead of accesing objects directly through properties with something like this:

Player1.Position, Player1.Rotation, etc

You can set a structure in between, that isolates your engine from objects that will be networked in the future. For example, an array of structures with all the info you need about each player.

Engine.PlayersIdea.Position

Engine.PlayersIdea.Rotation

That structures would be updated with messages sended from players to the Engine, no matter it¡¯s via a method (now) or via the network (in the future). In other words, simulate a network behavior now with methods like: SendPlayerInfo() and so.

So, the port to multiplayer should be painless.

Cheers !






Re: Game Technologies: General Server Client architecture

Inaki Ayucar

Damnit!

what the hell are those light bulbs

I meant to write an array access: Engine.Players[ i ].Position






Re: Game Technologies: General Server Client architecture

C Senthil Kumar

Forget the light bulbs. I always get frustrated by them whenever I want to show an array reference!

Anyway, thanks a lot for that idea on isolating the engine and the data. I was a bit confused by reading some articles that were too complex for me.

Thanks for the advice.