|
-
Feb 18th, 2001, 07:23 PM
#1
Thread Starter
Junior Member
Hi,
In many games, when you select 'Multiplayer', it will list all of the games that are currently running on the LAN.
I could be wrong, but I think this is done by sending out a network wide packet, and the computers which are listening for this packet (thus are running the game) will respond.
How can this be coded in VB?
-
Feb 19th, 2001, 10:43 AM
#2
Retired VBF Adm1nistrator
Well, if the game uses TCP/IP, then it is sending out a UDP broadcast packet.
If the game is using IPX, then it is sending out an IPX packet.
With the tcp/ip end of things, you would use a winsock control. Set the remotehost = 255.255.255.255
Then send some data.
The data should go everywhere.
But, if there is a switch on the network it might stop the data. On my network here there is a switch, and it will only let the first broadcast packet through.
Im not sure how to send IPX data using VB.
One thing you might want to look into, is the DirectPlay features of DirectX. They allow for this kind of thing. If you're already using DirectX in your game, then I'd use DirectPlay.
- jamie
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Feb 19th, 2001, 04:57 PM
#3
Junior Member
Yup...he's right...
Most of the games nowadays with this functionality just utilize DirectPlay. Using DirectPlay, you can find out all of the available ways the user can play/host using a simple "service provider" query.
I highly recommend using a simple API like DirectPlay unless you really want to get "down and dirty" with your computer game making.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|