🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

First multiplayer game...

Started by
1 comment, last by Rah 22 years, 4 months ago
Hi all, Just looking for some advice... I''m currently in the planning stage for a small multiplayer game... just a simple, single screen 2d game with little people (each a seperate client) running around. I''d rather use a lower level approach (namely winsock) rather than direct play if it can be helped. What sort of system will I need to implement. I''ve never done any MP coding before. Assuming my game is ''reproducible'' (namely, given the original random number seed and player input, it will replay exaclty the same) could I get away with just sending each clients key inputs? Or will I have to go into sending gamestates and such - I''m sorry for my ignorance on this topic! For this sort of game, with only entities moving in 4 directions and bullets being fired, will the amount of data being sent be so small I wont need to bother too much with prediction and such? Thanks for your time, Russ
Advertisement
I suggest just experimenting.

There is no one way to do it. Get something working and then figure out ways to make it work better.

It doesn''t matter if you use Winsock or DirectPlay though I prefer DirectPlay as it does alot of work for you. Just pick one. Eventually you should learn both.

Ben

[The Rabbit Hole | The Labyrinth | Programming | Gang Wars | The Wall]
My personal experience says that it depends on the network connection. If you are using an unreliable connection (i.e. UDP), send gamestates since a lost packet would be outdated by a newer packet anyway (which would get through), and you would have all the gamestate information, obviously.

If you are using a reliable connection (i.e. TCP), you could get away with using key presses, since you shouldn''t be losing packets.

Just my 2 cents, it really boils down to what you feel more comfortable doing, since both designs *will* work.
---------------------------------------------------------------------------------------Before I couldn't spell engineer, now I are one.

This topic is closed to new replies.

Advertisement