Results 1 to 20 of 20

Thread: multiplayer support

Hybrid View

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2005
    Posts
    51

    Re: multiplayer support

    I'm not using directx. What is the best way to send data over winsock?

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: multiplayer support

    Quote Originally Posted by simgirl
    I'm not using directx. What is the best way to send data over winsock?
    The Winsock Hide Out

    Learn Winsock

    Pino

  3. #3
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339

    Re: multiplayer support

    What language you in?
    In VB winsock is actually very easy to learn and get used to.

    I have yet to try winsock in c++, but my next project requires I learn it.
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

  4. #4

    Thread Starter
    Member
    Join Date
    Feb 2005
    Posts
    51

    Re: multiplayer support

    I am programming in VB. Is the winsock file to use called: mswinsck.ocx?

  5. #5
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: multiplayer support

    Quote Originally Posted by simgirl
    I am programming in VB. Is the winsock file to use called: mswinsck.ocx?
    hold ctrl+t

    Go to Micosoft Winsock Control 6.0 and select it,

    The you will see it on your tool bar, look at the FAQ I linked to above

  6. #6

    Thread Starter
    Member
    Join Date
    Feb 2005
    Posts
    51

    Re: multiplayer support

    I've gotten my multiplayer feature in my game almost working now, but I have 1 problem. To much data is being sent at once from the host to the client for some reason. I'm having problems figureing out why its happening so I can stop it. I got it so that the host sends the current game to the client and then the game starts and the host then starts sending the data for the game. Why is too much data being sent at once and how can I stop it from happening?

  7. #7
    Member
    Join Date
    Feb 2005
    Location
    Usa Nyc
    Posts
    45

    Re: multiplayer support

    Because thats the way sockets work. Packets get stacked on the stream. I had that kind of problem, actually I think anybody who coded big winsock apps had that problem. One thing you can do is sleep() which would pause and let the packet get sent out of the stream. Or you can use headers. For instance one packet is "10" the id and the other is "BoB" the name. What you can do is..
    Send the packet "ID:10" and then send the packet "NAME:Bob" if your names and ids contain the delimeter ":" then find another one else its perfect. Then in your dataarrival use a for loop 0 to the occurences of ":" - 1 then in the loop you just split it in a nice way and get all your info.
    Kiss, Aerosmith, Black Sabbath, Nazareth, Judas Priest, Status Quo, Cinderella, Scorpions, Tool, SteppenWolf.

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