Designing a Networked Game

Started by
0 comments, last by Pseudo 19 years, 1 month ago
Ok, ive never really written a fully networked game before, But i was wondering, to those of you who are quite experienced with it, what kind of design do you pursue? I have been thinking of ways to handle it all, and put it all together but none seem "clean", they just seem to be one big hack.I am using raknet so I dont really have to worry about the tid-bits inbetween. Currently I have a state system, the first state is the menu which constructs a "session" struct and is then passed to the new session which is the game run. In the "session" state the system will update and accept new clients onto it if its a server. If its a client it will connect to a server and then recieve the messages it needs. This still doesnt seem to be "right", not sure why. Anybody have any views? Cheers, ash.
Advertisement
I dont see anything in your description that could be done any other way. The server MUST listen for connections and the clients MUST connect to servers. Am I missing something?

The tricky part is in how the messages are handled. Usually you want to timestamp all your messages and do some form of dead reckoning on the moving objects. This can get quite complicated if done right but start with something simple and you should be able to expand it later.

This topic is closed to new replies.

Advertisement