|
Networked multiplayer games are a huge part of the games industry today. The number of
players and amount of money involved are staggering. As of 2014, League of Legends boasts
67 million active players each month. The 2015 DoTA 2 world championship has a prize pool of
over $16 million at the time of writing. The Call of Duty series, popular in part due to the
multiplayer mode, regularly has new releases break $1 billion in sales within the first few days of
release. Even games that have historically been single-player only, such as the Grand Theft Auto
series, now include networked multiplayer components.
This book takes an in-depth look at all the major concepts necessary to program a networked
multiplayer game. The book starts by covering the basics of networking—how the Internet
works and how to send data to other computers. Once the fundamentals are established, the
book discusses the basics of transmitting data for games—how to prepare game data to be
sent over the network, how to update game objects over the network, and how to organize the
computers involved in the game. The book next discusses how to compensate for unreliability
and lag on the Internet, and how to design game code to scale and be secure. Chapters 12 and
13 cover integrating gamer services into and using cloud hosting for dedicated servers—two
topics that are extremely important for networked games today.
This book takes a very practical approach. Most chapters not only discuss the concepts, they
walk you through the actual code necessary to get your networked game working. The full
source code for two different games is provided on the companion website—one game is an
action game and the other is a real-time strategy (RTS). To help with the progression of topics,
multiple versions of these two games are presented throughout the course of this book.
Much of the content in this book is based on curriculum developed for a multiplayer-game
programming course at the University of Southern California. As such, it contains a proven
method for learning how to develop multiplayer games. That being said, this book is not
written solely for those in an academic setting. The approach taken by this book is just as
valuable to any game programmer interested in learning how to engineer for a networked
game. |