Jump to content
  • Advertisement
Sign in to follow this  
arithma

Leaving the right gaps

This topic is 4404 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am creating this game and I want to make it multiplayer. I don't know Winsock yet and don't intend to learn it right away.. However I also wouldn't like to rewrite my game just because the multiplayer component wouldn't just fit in.. So what I need is a set of pinpointers and does/don'ts so that I can develop against and finally I would learn whatever skills needed for multiplayer/(or delegate them to another person)...

Share this post


Link to post
Share on other sites
Advertisement
It really depends on how you are planning to implement the multiplayer in the future. Are you going to use a message based system where each game entity/player object/enemy constructs and parses their own messages? Are you aiming for a higher level system where you use classes to store the state of your game objects and want the contents of those classes propagated to other players? Which language are you using?

Share this post


Link to post
Share on other sites
The game states are simple but huge. The biggest of those is a list of vertices (triangles actually, whatever) that are being built at an enormous rate. The other player must be able to see those and interact with them as soon as possible. The game is very high paced, and interaction with this list is vital for the success of the concept.
I am using C++ and DirectX.

Share this post


Link to post
Share on other sites
How many players, and is sequence of appearance important?

If sequentiality of data is important (and you want to 'stream' the new geometry to the other player (and you don't have lots of players) a TCP implementation is probably best. You can rig this so it'll stream data out, and guarantee delivery. Synchronicity (must both player be kept in sync) is also a consideration - blocking TCP sockets would guarantee this, but may make the game horribly laggy. It depends what you mean by 'an enormous rate of generation'.

If raw speed is important, and you plan to send many small updates, UDP may be more appropriate, but may involve extra work to include any reliability you need.

Basically you need to consider what information would need to be sent to the other player to keep the two games in (or nearly in) sync.

Share this post


Link to post
Share on other sites
Check out the Forum FAQ for a list of pointers on how to get started, as well as a list of libraries you can use if you don't want to learn WinSock.

Share this post


Link to post
Share on other sites
After thinking about it, all I need to send is a set of six floats. The order in which those [EDIT][the set, not the individual floats][/EDIT] should arrive is important. So am gonna add an integer to the structure that am gonna send that holds the index of each set of floats.
The game is high paced (in terms of network) since each player should know the history of the position and orientation of the other player at all times.
I am thinking, in the way you put it, that I should use UDP to accomplish high rate(?)..
The reliability requirements are a bit less stiffer than I may have described.
The reciever of data should get as much information as he can to keep the speed in the game. From the indices, it should check what information bits are missing and it should ask for it after a bit of time..

So is this design ok. And can I assume that all of this could be wrapped into a simple class or namespace whose methods/functions will be called and voila, everything done, or should I first learn the network issues first and integrate it (as necessary) directly into the game as it is created..

Am gonna visit the FAQ now.. But I don't want to get a lib since I want to learn Winsock in the long run.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!