Archived

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

weasalmongler

Absolute Beginner : Needs Guidence For Network Programming

Recommended Posts

I have no previous networking experience. I am wanting to implement a multiplayer section of my game for online play over the internet. First up, I''ve done some research, and have discovered 2 main API''s that I can use : DirectPlay Winsock2 Of what I have seen, Winsock would be the better choice, but I was wondering what you people think would be better for using in an online FPS game. Secondly, I want to implement the system as a server which serves all the client computers. I wish to have the server active all the time. I have my own online webspace. How would I implement a perminant online server? I don''t want my PC connected to the internet 24/7, but I want my friends to be able to play my game online whenever. Thanks for any responses. - Weasalmongler

Share this post


Link to post
Share on other sites
I would say that Winsock2-UDP would be your best bet for transfer of data for a FPS, its relatively easy to get sockets up and running, as for the speed I don''t know as i''ve never used DirectPlay.(i''m just basing it off Quake and all quake engines use Winsock and it seems to work ).

As for the permanent server, it won''t be possible unless you have a computer connected to the internet on a static IP.(or do something fancy with dynodns.org and a dynamic ip ) Assuming you/one of your friends has a Cable connection(or faster), they should easily be able to get the IP of the person hosting the game and get all the players to connect to their machine running the server.

Share this post


Link to post
Share on other sites
For the network stuff I would use Winsock. If you need to convert the server to run under UNIX one day then converting it to use proper socket calls is easy.
As for he server, well if you have DSL then you can safely leave that on all day. If not then you can ue the option of having some free webspace with a simple CGI script that logs and thn displays the last IP address to access a certain page. This way you can get your server machine to ial up to the internet, fetch the secret page rom the free site, then your friends can open another web page that displays the dynamic IP of your server.

Share this post


Link to post
Share on other sites