Before you can do this tutorial, you will need the following:
1. Visual Studio 2005 (or Visual C++ 2005 Express Edition)*.
2. A knowledge of basic C++ and Win32 programming.
3. A burning desire to make games.
Note: You will not need two computers to do this tutorial.
Disclaimer: Misuse of the information in this tutorial can open your computer to
security vulnerabilities. Use with caution.
* - other versions of C++ compilers will also run WinSock, however, there are some
language specific changes you may need to make in each of the demo applications.
Before you begin network programming, you must understand how networks work.
The most frustrating thing in network programming, especially on a complex network,
is not knowing what piece of software or hardware is not letting your signal through.
After an intense hunt, you may find it, but why go through all of that if you understand
your network to begin with?
The first step is to initialize the Winsock API. This is a series of calls
which prepares your system for networking. Fortunately, Windows takes care
of most of the dirty work. This lesson covers what your part is.
In this lesson, we will actually accomplish something. We'll learn how to
send information from one computer to another.
Now that we can send and receive data, let's do something with it. In this
lesson we'll go over the basics of how a server works and how clients interact with
it. Then we'll build a simple chat program which runs in a command prompt.
It's good to be able to chat, but it's more important to be able to play games.
In this lesson we'll cover the fundametals of sending game data from one computer
to another.
Coming soon will be more lessons. First there will be a lesson on how to establish
a central game server. Next will be a lesson on coordinating games by event
data rather than constant updating. Finally, there will be a lesson on basic
network security.
© 2006-2011 DirectXTutorial.com. All Rights Reserved.