Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Really good multiplayer tutorial
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dark_Chaos
Neophyte

2 Posts

Posted - Feb 18 2005 :  11:47:48 AM  Show Profile  Reply with Quote
Can someone please send me a really really good multiplayer vb tutorial or source code(wich actually works)??

Thx

Almar
Moderator

Netherlands
192 Posts

Posted - Feb 20 2005 :  11:15:27 AM  Show Profile  Visit Almar's Homepage  Send Almar an ICQ Message  Reply with Quote
www.pscode.com
www.vbip.com

You won't find a multiplayer 'tutorial'. There's more involved than just sending and receiving data. Think of interpolation, dead packets, latency, cheats, etc.

Gamedev has a good multiplayer forum. Something definetly worth reading :)

Go to Top of Page

PointOfLight
Squire

11 Posts

Posted - Feb 22 2005 :  12:22:57 AM  Show Profile  Reply with Quote
For a game that will have just a few bits of information going back and forth each turn, a maximum of 4 players, and no use of DirectX, would the winsock control be sufficent, or is there something else I should look at for communications?
Go to Top of Page

Eric Coleman
Gladiator

USA
811 Posts

Posted - Feb 22 2005 :  11:56:02 AM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
For turn-based games, the winsock control is great. If you need to transmit realtime data, then you need to look into what Almar mentioned. Network communications can only go so fast, so switching from the winsock to control to the API isn't going to speed things up for a real time game. The bottleneck is not the winsock control, it's the physical network.

So, go with the winsock control, and if you find that it's not fast enough, then you need to optimize your network communication. For an example of such a problem, download my checkers game. You can find it in the games list in the menu at the top of the page. The problem with this game is that I transmit mouse coordinates in realtime accross a TCP connection. On a LAN, it works OK. However, over the internet you'll notice that the movement sputters because data throughput and bandwidth over a network is not constant. To overcome the problem in the game, I should have have transmitted mouse coordiantes in regular intervals instead of as fast as possible. On the receiving end a simple interpolation between last and current mouse positions would have been sufficient to show a continuous mouse movement.
Go to Top of Page

timbo152k
Squire

Canada
25 Posts

Posted - Feb 22 2005 :  2:41:30 PM  Show Profile  Visit timbo152k's Homepage  Send timbo152k an AOL message  Click to see timbo152k's MSN Messenger address  Send timbo152k a Yahoo! Message  Reply with Quote
A quick correction Eric, at least, this is what I have learned. The winsock control has a 20ms automatic latency, meaning, even if the ping is lower then 20ms, the best latency you'll see is 20ms - no lower. Depending on the architecture of your game, this may or may not have significance, like Eric said, sometimes it is better to aim for a common intervol (and use interpolation), and others its best to work as fast as possible. Anyways this hard-coded minimum latency of 20ms was listed on VBip.com I believe as one of the advantages of switching to the API over using the control. Not verified, but just a consideration!
Go to Top of Page

Eric Coleman
Gladiator

USA
811 Posts

Posted - Feb 22 2005 :  4:32:29 PM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
Thanks for that information, I didn't know that.
Go to Top of Page

PointOfLight
Squire

11 Posts

Posted - Feb 22 2005 :  6:30:38 PM  Show Profile  Reply with Quote
Thank you both for your input. It's really appreciated. I kind of felt like I was asking a n00b question, and didn't really know if I'd get positive responses or somewhat chided remarks. Thank you for providing the former. The sad thing is that I have been a Visual Basic programmer for years now, but I haven't really had the need to employ this type of technology in any of my applications. As far as my current project is concerned, though, the data transfered between users will be very minimal, so the Winsock control should work just fine. If I get this up and going and some point I will post a link here for all of you. Thanks again for your time.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.11 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.