CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Network Game

  1. #1
    Join Date
    Oct 2010

    Network Game

    I'm planning on making a game which multiple people can play over a network. I've never done any programming involving a network, so I have lots of questions.

    1) Do I need a third-party library to open ports and transmit data?

    2) What protocol should be used? I don't know the differences between TCP/IP and UDP.

    3) What changes would I have to make to play this over a LAN network, as opposed to the Internet?

    4) How should I make sure that all versions of the game world are synced properly? I'm thinking of initializing one copy per computer, then only sending events like 'move up' or 'attack' between the computers, so not as much data needs to be sent. Is there a better way, or is this good enough?

    5) If I do that, how do I make sure that I don't have timing issues? For example, A receives two events from C and D simultaneously, but B receives C's later, which could alter the internal state of the world.

    6) How should I make sure that random numbers are the same between all computers? Should I just send requests to one computer and have it send out a random number? Seems inefficient...

  2. #2
    Join Date
    Nov 2002

    Re: Network Game

    If your focus is on games, then you might have a better response over at http://www.gamedev.net/index

    For networking, they have a beginners FAQ: http://www.gamedev.net/forum/15-mult...k-programming/


  3. #3
    Join Date
    Oct 2010

    Re: Network Game

    Alright, I'll go check that out. Thanks!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)