Network Programming...
Hey all,
I have a small problem... I''m currently working on a 3D shooter game( which is going verry well thanks to Genesis 3D ) and I''m now at the network implementation part of the game. Not sure how to start. I know alot about network( MSCE in trainning ) but I''m just not sure where to start to code my Network engine... Can anybody give me a helping hand... Thanks..
Cyberdrek
Headhunter Soft
DLC Multimedia
Two Guys Soft
[Cyberdrek | ]
I don''t know if this will be any help what so ever but if you are going/will to use DirectX I suggest you have a look at some Direct Input docs. I think there is a tutorial on the GameDev site somewhere.
//--- Created by Tom Oram ---
// tom.oram@vodafone.net
//--- Created by Tom Oram ---
// tom.oram@vodafone.net
xstreme2000: DirectInput for networking? You meant DirectPlay right?
Cyberdrek: Look into DirectPlay for sure (I don''t know much about it, but it looks handy . If you pass on that and decide to get your hands a bit dirtier, then I guess the next stage is WinSock (actually, I''m sure there are some intermediate stages such as networking libraries - I don''t know of any, but I''m sure some others around here do...). For a 3D shooter you basically want to create a UDP (connectionless) socket. If your game is client-server based then the server can simply send "snapshots" of the current state of the game to the client - if any get lost (UDP doesn''t guarantee order or even delivery remember) then that doesn''t matter - the client just cares about the most recent one.
If you are using WinSock, then look into the WSAxxxx functions (WSAInitialise(),etc.). Also, look in the Multiplayer Programming forum here on GameDev.net
As for where to start, I''d start by setting up your engine so that you have the "client" (rendering, player input, etc.) and "server" (game logic, representation of game world, etc.), then have the "client" render the data sent to it by the "server".
-Hotstone
Cyberdrek: Look into DirectPlay for sure (I don''t know much about it, but it looks handy . If you pass on that and decide to get your hands a bit dirtier, then I guess the next stage is WinSock (actually, I''m sure there are some intermediate stages such as networking libraries - I don''t know of any, but I''m sure some others around here do...). For a 3D shooter you basically want to create a UDP (connectionless) socket. If your game is client-server based then the server can simply send "snapshots" of the current state of the game to the client - if any get lost (UDP doesn''t guarantee order or even delivery remember) then that doesn''t matter - the client just cares about the most recent one.
If you are using WinSock, then look into the WSAxxxx functions (WSAInitialise(),etc.). Also, look in the Multiplayer Programming forum here on GameDev.net
As for where to start, I''d start by setting up your engine so that you have the "client" (rendering, player input, etc.) and "server" (game logic, representation of game world, etc.), then have the "client" render the data sent to it by the "server".
-Hotstone
Thanks all for your help, It does help me in a way as far as using UDP, I already knew that part( it''s what I had planned to use ). Anyhow, thanks...
Cyberdrek
Headhunter Soft
DLC Multimedia
Two Guys Soft
Cyberdrek
Headhunter Soft
DLC Multimedia
Two Guys Soft
[Cyberdrek | ]
DirectPlay? NOOOOOOOOOOOOOOOOOOOOOOOOOOO! This has a habit of being slow and generally not working. On flipcode (www.flipcode.com) they have a very good article on network programming (look down the left hand side of the screen). Much faster that DirectPlay.
MENTAL
MENTAL
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement