|
-
Feb 28th, 2005, 11:33 AM
#1
Thread Starter
Member
Re: multiplayer support
I'm not using directx. What is the best way to send data over winsock?
-
Feb 28th, 2005, 11:40 AM
#2
Re: multiplayer support
 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
-
Feb 28th, 2005, 02:24 PM
#3
PowerPoster
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
-
Feb 28th, 2005, 10:52 PM
#4
Thread Starter
Member
Re: multiplayer support
I am programming in VB. Is the winsock file to use called: mswinsck.ocx?
-
Mar 1st, 2005, 02:37 AM
#5
Re: multiplayer support
 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
-
Mar 14th, 2005, 11:29 PM
#6
Thread Starter
Member
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?
-
Mar 14th, 2005, 11:56 PM
#7
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|