Development & Deployment of Multiplayer Online Games Vol. I
Development & Deployment of Multiplayer Online Games Vol. I
$7.77
Minimum price
$8.88
Suggested price
Development & Deployment of Multiplayer Online Games Vol. I

This book is 96% complete

Last updated on 2017-02-13

About the Book

The video above is from our Kickstarter campaign; while not 100% relevant, it is pretty close

NB: currently, PDF of Vol. I is ready (the same as used for paperback and hardcover on Amazon); however, EPUB and MOBI are NOT properly formatted yet (they should be in a matter of few weeks).

ISBNs for FINAL version: PDF: 9783903213074; ISBNs for EPUB and MOBI will be listed when respective editions are finalized.

What's the Big Idea?

The idea behind this book is to summarize the body of knowledge that already exists on multiplayer games but is not available in one single place. And quite a few of the issues discussed within this series (planned as three nine volumes ~300 pages each), while known in the industry, have not been published at all (except for maybe in discussion forums). 

Programming and deploying an MOG is a daunting task, and having a frame of reference is usually quite helpful — "hey, those guys have already tried this, and it worked for them."

Vol. I-III of the series are about MOG Architecture. In Vol. I, we will discuss general issues such as GDD - as well as Communicaton flows. In Vol. II and Vol. III - we'll proceed to discussing Client-Side and Server-Side Architecture respectively; Vol. IV-VI will describe issues related to Programming, and Vol. VII-IX will be about Deployment and post-deployment tasks. 

Shameless Plug

The book has got endorsements from quite a few people known in the industry, including people from Amaya, Lloyds Bank, Lionhead Studios, BlueByte (Ubisoft Studio), Lightstreamer, Plarium, and (formerly) Zynga. For the endorsements themselves please see Kickstarter campaign.

And speaking of crowdfunding - the book has already been funded on Kickstarter and Indiegogo - with over 800 backers total (and counting). BTW, here on Leanpub there is a bundle which is exactly the same as an ongoing InDemand campaign on Indiegogo - $20 for Vol. I-III together with an early access (though on Indie there is also an option to pre-order paperback or even hardcover).

Since When Are Rabbits Programming??

I cannot speak for all of rabbitkind, but this particular hare has gone alongside my writings for quite a while now. He was born as "No MT Bugs" Hare in 2010, in an Overload article titled "Single-Threading: Back to the Future?"

Therefore, there is evidence that this particular rabbit has been programming at least since 2010. Yes, he has changed his appearance, but deep inside, he is still the very same bunny with a naïve idea of making programs less buggy. BTW, the character is created by Sergey Gordeev, a guy with many animation awards, known (among other things) for being a director of some of the Animated Mr. Bean series.

Who Is this Book For?

The book is intended for those intermediary developers who want to become senior ones, and for senior developers and up. I expect that the book will also be useful for decision-makers, from PMs all the way up to CEOs — so if you by any chance know one, please make sure to give her a link to this page ;-). 

On the other hand, if you are working on your first programming project, this book will probably be too difficult for you. There will be no explanation on what event-driven programming is all about, what's the difference is between optimistic locking and pessimistic locking, why you need a source control system, and so on. Instead, there will be discussions on how the concept of futures fits into event-driven programming, when the use of optimistic locking makes sense for games, and how to use source control in presence of unmergeable files

In the same spirit, the book is not intended to be a CD to copy-paste your sample MOG from. Instead, the book aims to help you write your own code that is tailored to your own needs, and tries to advise on the available choices at most of the junctions.

What's The Plan?

Vol. I is currently in "RC10", with all the content I'm planning, already included. No changes to the text are planned (unless something Really Stupid(tm) is found).

As I'm working with professional editors (and vast majority of them doesn't know anything but Word :-( ) - I keep and edit my manuscript as a bunch of Word .docx files (I throw myself at the mercy of the court, and assure that it is only because of dire circumstances beyond my control ). I'm using Word to export .docx to PDF, and some_VBA_scripts+Calibre to export to .MOBI and .EPUB.

Please note that current formatting is quite ugly; it will improve after being professionally formatted; it is also expected to pass all the .EPUB validity checks.

Next steps:

  • The manuscript is already with typesetters and book designers.
  • Then - it will be finalized here on Leanpub (and rewards for Kickstarter and Indiegogo backers will be sent out too)
  • And finally, it will be published on Kindle (and on Amazon via CS). At this point, price of the book may go higher here on Leanpub (to match Kindle price).

Comments

All the comments are extremely welcome - and they DO help making the book better.

About the Author

'No Bugs' Hare
'No Bugs' Hare

20 years ago (damn, I am getting old) I was a co-architect for an electronic stock exchange of a G20 country, and for all practical intents and purposes stock exchanges are just another game genre. The project was fun and, among other things, allowed for real-time trading over the cellphones of that time (those with 9600 baud connection).

A few years later, I became a chief software architect working for a start-up that quickly grew into a rather large online game with half a million simultaneous players that processed half a billion user transactions per day. The project taught me a damn lot about such different issues as scalability, DB physical layout, server farms, attackers and cheaters of all kinds, and bot fighting — just to name a few.

Since then, I have consulted and performed due diligence on several game-related projects. In addition, I've spent quite some time researching the field and discussing related problems and their respective solutions with people from the industry.

I feel that this puts me in quite a unique position of knowing not only one single game, but a bunch of them, and being able to summarize and generalize my real-world experiences. Oh, and I have been writing for industry journals (and am especially proud of articles in CUJ and C++ Report) since 1998, so the process of typing sentences is not something new for me either.

If you really want further details, you can dig them out of my LinkedIn page

Bundles that include this book

Development & Deployment of Multiplayer Online Games Vol. I
Development and Deployment of Multiplayer Online Games, Vol. II.
Development and Deployment of Multiplayer Online Games, Vol. III.
3 Books
$26.64
Suggested Price
$20.00
Bundle Price

About the Contributors

Sergey Gordeev
Sergey Gordeev

Illustrator

Sergey Gordeev (currently from gagltd.eu) is an animator with a dozen of awards from different festivals. He is most known for his work as a director of Animated Mr Bean series.

Table of Contents

Chapter 1. Game-Design Document from an MOG perspective

     Your Game As Your Baby

     3500-Word Crash Course for First-Time Game Developers

           On the GDD

                 Subject to Change, Seven Days a Week

                       Being Agile and Writing It Down

                 The Overly Generic Fallacy

           On Project Stakeholders

                 On Focus Testing and Playtesting

                 On Marketing and Monetization: Critical Mass

                 On Stakeholder Availability

                 TL;DR on Project Stakeholders

           On a Typical Non-MOG Team Structure

           Time-to-Market, MVP, and Planning

                 Dealing with Time-to-Market

           On the Importance of Holding Your Horses

           TL;DR On a Crash Course for First-Time Developers

     Three All-Important GDD Rules

           On Separating GDD and Implementation Details

           Dealing with “Difficult” Stakeholders and (Jobs Forbid) Managers

     Limited-Lifespan vs. Undefined-Lifespan Games

     Client-Driven vs Server-Driven Development Workflow

           Server-Driven Workflow

           Client-Driven Workflow

                 Dealing with Client-Driven Workflow

                       Option 1. “Continuous Conversion”

                       Option 2. “Integrate Server into Toolchain”

     On Matchmaking and the Social Aspect of Your MOG

           Matchmaking That Doesn’t Work (As a Rule of Thumb)

           Matchmaking That Works

     On Support for Smaller Groups of Players

     Technical Issues Affecting Marketing and Monetization

     Your GDD Requirements List

     On MOG-Specific Teams

           Network Team

           Server Team

           Database Team

           Back-End Team

                 Timeline for the Back-End Team

           All MOG-Specific Teams Must Be First-Class Citizens

     Running Costs Breakdown

     Common GDD Pitfall: Just Throw In a Multiplayer for Free

     Game Entities and Interactions

           Game Entities: What Are You Dealing With?

           Interactions between Game Entities

           What Should You Get? Entities-and-Interactions Diagram

           Examples of Entities and Interactions

                 Social Farming and Farming-Like Games

                 Casino Multiplayer Games

                 Stock Exchanges, Sports Betting, and Auction Sites

                 Large Virtual-World Games (MMOTBS/MMORTS/MMORPG/MMOFPS)

                 Team Competitions/eSports

           Entities and Interactions Diagram As a Starting Point to Architect Your Game

     Chapter 1 Summary

           Bibliography


Chapter 2. On Cheating, P2P, and


[Non-]Authoritative Servers

     If You’re Popular Enough, They Will Find Reasons to Cheat

     The Big Fat Hairy Difference from E-commerce

     Dealing with Cheaters

           Gameplay

           Architecture

           Bot Fighting

     Attacks: The Really Big Advantage of the Home Turf

           Home Game

           Road Game

     Published vs Unpublished Attacks

           Published Attacks: Higher Impact, But Home-Turf Advantage Is Regained

           Unpublished Attacks

     Attack Types

           Legal Stuff and Problems Banning

           Game Cheats

                 Game-Rule Violations

                 Information Exposure

                 Reflex Augmentation

                 Abuses of Disconnect Handling

                 Grinding Bots

                 Multiple Accounts

           Classical Attacks

                 DB Attacks

                 Stealing Your Source Code

                 Password Phishing

                 Keyloggers/Trojans/Backdoors on Another Player’s Device

                 DDoS

           MOG Attack-Type Summary

     Authoritative Client: Pretty Much Hopeless Against Cheaters (Except for Console-Only Games)

           Code Signing—Doesn’t Really Work in a Hostile Environment (Except for Consoles)

           Theoretical Protections

                 Cross-Checks—Undetectable Attacks, Taking Over the World, and Latencies

                       Consensus (Actually, Majority Vote)—Even More Latencies

                 Trusted Nodes—Who Is the One We Trust?

                 Homomorphic Encryption—Doesn’t Even Start to Fly

           Authoritative Client MOG Summary

     Deterministic Lockstep: No Game-Rules Violations, But Wide-Open to Information Leaks

     Authoritative Server: As Cheater-Proof as They Get

           Authoritative Servers: Scalability Is Imperfect But Workable

                 An Example Calculation

           Summary: Authoritative Server Is Not Ideal, But Is the Only Thing Workable

     Think Positive! Or, Maybe There’s Still Hope…

           Every Bit Counts: Multi-Layer Protection

     Bottom Line for Chapter 2: Yes, It Is Going to Be an Authoritative Server

           Bibliography


Chapter 3. Communications

     Client-2-Server and Server-2-Client Communications

     RTT, Input Lag, and How to Mitigate Them

           Data-Flow Diagram, Take 1

           Input Lag: The Worst Nightmare of an MOG Developer

                 Input Lag: User Expectations

                 Input Lag: How Much We Have Left for MOG

                 Accounting for Packet Losses and Jitter

                       Internet is Packet-Based, and Packets Can Be Lost

                       Cutting Overhead

                       Client-Side and Server-Side Buffering on Receipt

                       Time Synchronization

                             Sync-Once

                             Sync-Once with Subsequent Adjustments

                             NTP-Like Protocol

                             Phase-Locked Loop (PLL)

                             TL;DR on Time Sync

                       On TCP

                 Input Lag: Taking a Bit Back

           Data Flow Diagram, Take 2: Fast-Paced Game Specifics

           RTT

                 LAN RTT vs Internet RTT

                 On CDNs and Geo Server Distribution

                 RTT and Players

           Back to Input Lag

           Data-Flow Diagram, Take 3: Client-Side Prediction and Interpolation

                 Client-Side Interpolation

                 Client-Side Extrapolation, a.k.a. Dead Reckoning

                       Running into the Wall, and Server Reconciliation

                 Client-Side Prediction

                       Client-Side Prediction: Dealing with Discrepancies

                       On Distributed Authority

                 Take-3 Diagram

                 Lag Compensation—Potential for Cheating vs. Player Happiness

                       Server Rewind

                       Subtracting Client RTT on the Server-Side

                       Lag Compensation Is Inherently Open to Cheating…

                       …OTOH, Player Happiness Is Much More Important

                 There Are So Many Options! Which Ones Do I Need?

     Game-World States and Reducing Traffic

           Server-Side, Publishable, and Client-Side Game-World States

                 Limit on Bandwidth

                 Additional Reasons to Optimize Bandwidth

                 Triangles and Bandwidth

                 /Three Different States of MOG

                       Client-Side State

                       Server-Side State

                       Publishable State

                       Why Not Keep Them the Same?

                       Non-Sim Games and Summary

           Publishable State: Delivery, Updates, Interest Management, and Compression

                 Interest Management: Traffic Optimization and Preventing Cheating

                       Implementing Interest Management

                             Grid-Based Interest Management

                       Interest Management as a Way to Prevent Information-Leak Cheating

                       On Frustum-Based Interest Management

                 Before Compression: Minimizing Data

                 Compression

                       What Exactly Is “Compression”?

                             On “Reference Bases” for Compression

                             “Reference Base” for Unreliable Communications. Low-Latency Compressible State Sync

                                   Advantage of Low-Latency Compressible State Sync over TCP and Reliable UDP

                       Delta Compression

                             Two Flavors of Delta Compression

                             Delta Compression—Generalization to Arbitrary Trees

                             Delta Compression of Arbitrary Trees—Collecting Updates “On the Fly”

                       Dead Reckoning As Compression

                             Dead Reckoning As Compression: Variations

                       Classical Compression

                             Compressing Reliable Streams

                             Compressing Independent Packets

                             Compression Using Acknowledged Packets

                       Combining Different Compression Mechanisms and the Law of Diminishing Returns

                             On Using Doubles with Lossless Compression

                 On Adaptive Traffic Management

                       Adaptive Traffic Management—UDP

                       Adaptive Traffic Management—TCP

                       Adaptive Traffic Management in the Context of Authoritative Servers

           Traffic and Real-Time Strategies

           Traffic Optimization: TL;DR and Recommendations

     MMOG and Scalability

           On Shared-Nothing Architecture

           An Obvious One: Separate NPC/AI

           Splitting into Areas

           Seamless Worlds: Overlap!

           On Server-Side Uncertainty

                 Eliminating Uncertainty Completely: Time Sync

                       Synchronization without Rewind: CMS/LBTS. Lockstep

                       Synchronization via Server Rewind: “Value Date”

     Transient Events, Forwarded Inputs, and (Kinda-)Broadcasted Messages

           Transient Events

           Forwarded Inputs

                 Potential for Information Leaks

                 Implementation

           (Kinda-)Broadcasted Messages (Broadcast with Interest Management)

     Point-to-Point Communications and Non-Blocking RPCs

           RPCs

                 Implementing Non-Blocking RPCs

                 Void vs Non-Void Non-Blocking RPCs

                       Non-Void RPCs

           Client-to-Server and Server-to-Client Point-to-Point Communications

                 Inputs

                       Input Timestamping

                 “Macroscopic” Client Actions

                 Server-to-Client

           Server-to-Server Communications

                 Seamless Handling of Transient Disconnects

                       Option 1. Separate Caller/Callee Handling

                       Option 2. Two Guaranteed Delivery Streams

                 Going Further: Inter-DB Async Transfer with Transactional Integrity

                 Server-Side Entity Addressing

                 Server-Side: TCP Often Wins Over UDP

                 Using Message Queues for Server-to-Server Communications

                       MQs and Transactional Integrity

                             On Transactions in AMQP

                       Brokered vs Brokerless MQ

                             Broker as Directory Service

                             Brokers and Transactional Integrity

                       Using MQ on the Server-Side: Summary

     On Protocol Changes

     IDL: Encodings, Mappings, and Protocol Changes

           Intra-Language vs Standalone

           IDL Development Flow

           IDL + Encoding + Mapping

           Example: IDL

                 On Sanitizing Input Data

                       Test Case Generation

           Example: Mapping

                 Mapping to Existing Classes

           Example: Encoding

           Protocol Changes and Backward Compatibility

                 Field Identifiers

                 Growing Messages. Fences

                 Versioning

                       Versions for Replies

                       Merits of Versioning

                 Which One to Choose?

           Implementing IDL and Specific Encodings

     Summary for Chapter 3

           Bibliography


Vol. I Summary

     What’s Next

     Letter from the Author

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub