📜 ⬆️ ⬇️

The book "Multiplayer games. Network Application Development

image Hi, Habrozhiteli! Earlier, we asked you whether to translate the book Multiplayer Game Programming: Architecting Networked Games (Game Design). Recently, a novelty came from the printing house.

This book discusses in detail all the basic concepts needed to create online multiplayer games. First, we will learn the basics of networking: how the Internet works and how data is transferred to other computers. Next, after laying the foundation, the basics of data transfer in games, how to prepare game data for transmission over the network, how to change the contents of game objects over the network and how to organize the interaction of computers involved in the game will be considered. Then we will talk about how to compensate for the unreliability of connections and delays in the transmission of data over the network and how to ensure the scalability and security of the game code. Chapters 12 and 13 deal with player pooling services for dedicated servers and the use of cloud hosting - two topics that are extremely important for modern network games.

On the pages of this book, we tried to combine theory with practice: in most chapters not only important concepts are discussed, but also examples of software code necessary for the full-fledged work of a network game are given. On the book's website you will find the complete source codes of two games. One of them is an action game, and the other is a real-time strategy game (Real-Time Strategy, RTS). In order to assist the reader in mastering the topics covered here, throughout the book we will study numerous versions of these two games.

Most of the book is based on a curriculum developed for a multiplayer gaming programming course at the University of Southern California. She, in turn, is based on well-proven methods of teaching the development of multiplayer games. However, this book should not be considered only as a tutorial - it will be useful to any developers who want to learn how to create online games.
')

Who is this book for?


Although the appendix discusses some aspects of the modern C ++ language used in the book, it is assumed that the reader is familiar with this programming language. In addition, it is assumed that the reader already has a basic knowledge of the standard data structures usually covered in the CS2 course. For those who are not familiar with C ++ or want to refresh data on data structures, we recommend Eric Roberts' excellent book “Programming Abstractions in C ++”.

It is also assumed that the reader has an idea about the technology of programming single-player games. Ideally, it is desirable that he have an idea about game cycles, methods of modeling game objects, vector mathematics and the basics of game physics. If you are not familiar with these things, you should first read some introductory book on game programming, such as Sanjay Madhav’s Game Programming Algorithms and Techniques.

As mentioned earlier, the book is equally well suited to students and game programmers who want to master the techniques of creating network games. And even those of you who have been working in the gaming industry for a long time, but have never been involved in creating online games, will find a lot of useful information in this book.

Why C ++?


The vast majority of program code examples in this book are written in C ++, because it actually remains the main programming language used in the gaming industry and programmers who develop game engines. Some engines allow you to write most of the game in other languages, for example, Unity - in C #, however, it is important to remember that the lion's share of low-level code in such engines is still written in C ++. Since the main theme of the book is the development of online multiplayer games, which is called "from scratch", it definitely makes sense to consider this topic using the language in which the game engines are written. But even if you write all the network code for your games in some other language, the basic principles will remain practically the same. And yet it is highly desirable for you to be familiar with C ++, otherwise code samples will be incomprehensible to you.

Why javascript?


Born as a hastily made scripting language to support the Netscape browser, JavaScript evolved into a standardized, fully-fledged and to some extent functional language. His popularity as a client-side scripting language helped him move to the server side, where his procedures, which take the form of objects, the simple closure syntax and dynamic typing, very effectively speed up the development of event-driven services. The code in this language is more difficult to refactor and has worse performance than C ++ code, which makes it not the best choice for developing the client-side of games. But these qualities are not a problem for the server part, when for the vertical scaling of the service it is sometimes enough just to move the slider to the right. The examples of server services in Chapter 13 are written in JavaScript, and to understand them requires a fairly close familiarity with this language. At the time of this writing, JavaScript was, according to GitHub, the most widely used language. Its share was 50% of all projects. Following trends for the sake of trends rarely leads to good results, but the ability to program in the most popular language in the world provides certain benefits.

Book website


A supporting website has been created for this book, and you will find links to sample code from the book. It also contains a list of errors and typos, links to PowerPoint slides, and a course plan for university studies.

About the authors


Joshua Glazer is the co-founder and technical director of Naked Sky Entertainment, an independent studio that develops games for consoles and personal computers, such as RoboBlitz, MicroBot, Twister Mania, and in addition, fashionable hits for mobile devices: "Max Ax" and "Scrap Force". As head of Naked Sky, he has advised several external projects, including the Unreal Engine at Epic Games, League of Legends at Riot Games, Destroy All Humans at THQ, and many other projects for Electronic Arts, Midway, Microsoft and Paramount Pictures.

Concurrently, Joshua lectures at the University of Southern California, where he became interested in courses on programming multiplayer games and game engine development.

Sanjay Madhav - Senior Lecturer at the University of Southern California, teaches several programming and video game development courses. The main one is the programming of games for senior students, which he has been reading since 2008. He also leads several other courses on topics such as game engines, data structures, and compiler development. He is the author of the book Game Programming Algorithms and Techniques.

Prior to joining the University of Southern California, Sanjay worked as a programmer at several video game development companies, including Electronic Arts, Neversoft, and Pandemic Studios. Participated in the creation of many games, including “Medal of Honor: Pacific Assault”, “Tony Hawk's Project 8”, “Lord of the Rings: Conquest” and “The Saboteur” - most of which can be called multi-user network games.

»More information about the book can be found on the publisher's website.
» Table of Contents
» Excerpt

For Habrozhiteley 25% discount coupon - Game

Source: https://habr.com/ru/post/310680/


All Articles