• Advertisement

Archived

This topic is now archived and is closed to further replies.

Network Programming...

This topic is 6522 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
thanks for the tipper, mental. i was lookin to use direct play, but everybody is telling me - winsock or this flipcode thing. i''ll look into it.

a2k

Share this post


Link to post
Share on other sites

  • Advertisement