|
-
Feb 28th, 2005, 01:59 AM
#1
Thread Starter
Member
multiplayer support
What is the best way to add multi-player support to a game?
-
Feb 28th, 2005, 05:58 AM
#2
KING BODWAD XXI
Re: multiplayer support
Are you using Direct X?
You can use the winsock control or if you want to use DX you can use Direct play
-
Feb 28th, 2005, 11:33 AM
#3
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
#4
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
#5
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
#6
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
#7
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
#8
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
#9
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.
-
Mar 15th, 2005, 04:25 AM
#10
Re: multiplayer support
 Originally Posted by Evgeni
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.
I dont personally like sleep(), your best bet is delimeters, have a look at the link below, its a guide i wrote a while back.
http://www.vbforums.com/showthread.php?t=297570
Pino
-
Mar 15th, 2005, 06:14 PM
#11
Thread Starter
Member
Re: multiplayer support
 Originally Posted by BodwadUK
Are you using Direct X?
You can use the winsock control or if you want to use DX you can use Direct play 
How would you use Directplay in DirectX?
-
Mar 15th, 2005, 06:50 PM
#12
Re: multiplayer support
 Originally Posted by simgirl
How would you use Directplay in DirectX?
http://216.5.163.53/DirectX4VB/TUT_DX8_DP.asp
-
Mar 16th, 2005, 03:31 AM
#13
KING BODWAD XXI
Re: multiplayer support
Only send data at certain intervals. You dont need to send it every frame if its a game for example
-
Mar 22nd, 2005, 06:25 PM
#14
Thread Starter
Member
Re: multiplayer support
Does anybody know where I can find the DirectX SDK for VB?
-
Mar 22nd, 2005, 06:29 PM
#15
Re: multiplayer support
It was in the sticky FAQ DirectX starter projects
http://www.vbforums.com/showthread.php?t=280609
On #18 is DirectX 8.1 SDK which installs both the C++ projects and VB projects
-
Mar 22nd, 2005, 06:43 PM
#16
Thread Starter
Member
-
Mar 22nd, 2005, 07:59 PM
#17
Not NoteMe
Re: multiplayer support
Microsoft have broken compatibility between VB6 and DX9.0, meaning that you can't use VB6 to make a game that uses DX9.
If you're using VB.NET then you can, otherwise you're stuck with using versions of DX that are pre-9.0
No worries though, DX7 and 8 should be fine if all you're gonna use it for is networking.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Mar 22nd, 2005, 09:35 PM
#18
Hyperactive Member
Re: multiplayer support
if you want to wait for it to finish sending you can alway use the sendcomplete event on the winsock control
It's not just Good, It's Good enough!
Spelling Eludes Me
-
Mar 23rd, 2005, 04:50 AM
#19
Addicted Member
Re: multiplayer support
Simgirl
What programming language and graphics libraries u use?
If using vb.net, i woulnd use the winsock ocx control ... using the socket classes of the .net framework. There are easy to use and easy to make async sockets streams.
About DirectPlay for DirectX ... they left it out of the SDK sinds December 2004 release 
U can get the latest DX SDK for free at MSDN
http://msdn.microsoft.com/directx/di...s/default.aspx
-
Mar 23rd, 2005, 07:24 AM
#20
Re: multiplayer support
 Originally Posted by Nigh™a®e
About DirectPlay for DirectX ... they left it out of the SDK sinds December 2004 release 
That is because there has been no changes to it in a looong time. And DPlay is depricated. But there is roumers saying it will be in the next version of DX though. But THAT can take a while.
ØØ
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
|