Results 1 to 3 of 3

Thread: Multiplayer Games

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Posts
    19
    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?

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    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]

  3. #3
    Junior Member
    Join Date
    Jan 2001
    Location
    New York City, NY
    Posts
    16

    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
  •  



Click Here to Expand Forum to Full Width