Game Career Guide is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Get the latest Education e-news
 
  • How to Become a Great Network Programmer: Part I

    [08.16.07]
    - Adam Martin

  •  Suggested Courses

    1. Data Structures and Algorithms

    What to learn: How to choose the right data structures for a given problem. What data structures are available or are standard. How to make new data structures for compound problems.

    This course is pretty much essential for any serious programmer, even though it's not as necessary for network programmers as it is for, say, graphics programmers. Still, it's very useful and will contribute to one's overall game programming knowledge.

    2. Computational Complexity

    What to learn: How to calculate the space/time complexity of any algorithm. Using computational complexity to choose which algorithm to use for a given problem.

    This class is essential for server programming. The biggest single problem you will have with all server development is scalability, and this class will teach you the basics of scalable code. Without this class, no code you ever write will deliberately scale well, and you'll be forced to learn by trial and error. On the other hand, a computational complexity class lets you calculate in advance what will actually happen.

    3. Information Theory

    What to learn: Theories of entropy and information. Many different compression and encoding algorithms. Error-correcting encodings. Differencing and patching.

    Informational theory is essential to all low-level network code. This class teaches you half of what you need to know to write good wire-protocols for transmitting basic information between different computers on a network. An information theory class will focus especially on the algorithms used to increase performance and correctness even in the face of the inaccurate and lossy internet.

    4. Networking

    What to learn: The ISO OSI seven-layer model. TCP's 22-state FSM. UDP and TCP packet formats. IP Routing. SYN attacks.

    Look to take a networking class some time in your second year of study. You'll mostly learn specific protocols from the internet and how the internet sends data from computer to computer. You should also aim to learn what all the parts of the IP stack are and how they interact to solve (or cause) problems and increase (or reduce) performance.


    Guild Wars

    5. Relational Databases

    What to learn: What "relational" means and why it's fast. Normal form. SQL.

    Some network programmers never use SQL while others use it a lot. One thing's for sure: All multiplayer games with any persistence, either of game characters or multiplayer progression, definitely need a database, and in almost every case that's going to be an RDBMS. Databases are always the slowest part of a game server, so knowing how they work and how to achieve high performance with them is extremely helpful when designing and developing servers. Databases are also gradually becoming more prevalent in games, as designers start to persist more and more data "online."

    6. Distributed Computing

    What to learn: Transactions and how to implement and use them. Different architectures for clustered technology. Operating system and platform support for clustered technology. Messaging and time synchronization between distributed computers.

    This is all mostly of use to server programmers, especially MMOG programmers, but it's good for anyone who's trying to make a game scale well with multiple physical servers.

    7. Security

    What to learn: Standard secure protocols. Threat modeling. Basic cryptography and cryptanalysis.

    Although there's really only one thing you need to learn about security ("Never trust the client"), it's an area that's infamous for rarely converting good theory into practice. Classes about security are full of useful examples, interesting anecdotes, and salient warnings of the mistakes you almost certainly will make despite your best efforts, and what to do to minimize the damage. They also cover the basics of encryption, but you'll soon learn that encryption is just one small tool and that most successful attacks don't bother breaking the encryption -- hackers usually find an easier way in.

     


    City of Heroes

    Field Experience

    A degree will only provide you with theoretical knowledge, such as algorithms, protocols, and facts. If you want to be a good network programmer, you have to learn all the nasty stuff, too, the things that shouldn't happen but always do.

    In the real world, even the internet itself never quite functions the way it was originally supposed to. Everything you learned about how TCP and IP work falls open to question once you start interacting with other people's code.

    That's the essential problem: On any given large network, your source code represents only a tiny fraction of the network traffic, and neither you nor your players have any control over that other traffic.

    In Part II of this article, I'll outline four games that you can make in your spare time to get some experience working with real-world constraints -- and that kind of experience is what separates wisdom from knowledge.

    Adam Martin, lead programmer at NCsoft Europe, likes to solve difficult problems in online game programming, having spent almost 10 years looking for them. Along the way he's patented technology, written for Game Programming Gems 4 and 5, and founded a couple of start-up companies. His blog has more advice and practical about programming.

    The author thanks Jason Beardsley for his help in writing this article.

Comments

comments powered by Disqus