Contents of “Development and Deployment of Multiplayer Online Games: from social games to MMOFPS, with stock exchanges in between”

 
Author:  Follow: TwitterFacebook
Job Title:Sarcastic Architect
Hobbies:Thinking Aloud, Arguing with Managers, Annoying HRs,
Calling a Spade a Spade, Keeping Tongue in Cheek
 
 

Cover for the upcoming book
[[This is a Table of Contents (and also “About” and “Scope” sections) from the upcoming book, which is currently being beta-tested. For details of this Beta Testing, please refer to the post on it. All the content published during Beta Testing, is subject to change before the book is published.]]

UPDATE: the book has grew soooo large that we decided to split it into 9 volumes (about 300 pages each) instead of three. It means that we plan to print the content which was planned as original Vol.1 as “new” Vol.I-Vol.III, the content planned for original Vol.2 – as “new” Vol. IV-Vol.VI, and the content intended for original Vol. 3 – as “new” Vol. VII-Vol.IX. If you have backed this book on Kickstarter or Indiegogo – please see relevant updates on KS and on Indie

The book is WIP

“Development and Deployment of Multiplayer Online Games” (#DDMoG for short), consists of 3 parts: ARCH(itecture), PROG(ramming), and DEPL(oyment). Each part is planned as 3 volumes.

Current status:

Table of Contents

Table of Contents

Part ARCH. Architecture


OBSOLETE (“1st beta”), available online

Chapter 1(a). Business Requirements
Chapter 1(b). Game Entities and Interactions
Chapter 2. On Cheating, P2P, and [non-]Authoritative Servers
Chapter 3(a). Protocols. RTT, Input Lag, and Mitigation
Chapter 3(b). Protocols. World States and Reducing Traffic
Chapter 3(c). Protocols. Point-to-Point Communications and Non-blocking RPCs
Chapter 3(d). Protocols. IDL: Encodings, Mappings, and Backward CompatibilityChapter 4. DIY vs Re-Use: In Search of Balance
Chapter 6(a). Client-Side. Graphics
Chapter 6(b). Client-Side. Programming Languages
Chapter 6(c). Client-Side. On Debugging Distributed Systems, Deterministic Logic, and Finite State Machines
Chapter 6(d). Client-Side. Client Architecture Diagram, Threads, and Game Loop
Chapter 7. Unity 5 vs UE4 vs Photon vs DIY
Chapter 8a. Scalability for MOGs
Chapter 8b. Scaling Stateful Objects
Chapter 9(a). Server-Side. Naïve, Web-Based, and Classical Deployment Architectures
Chapter 9(b). Server-Side. Front-End Servers and Client-Side Random Load Balancing
Chapter 9(c). Server-Side. Eternal Windows-vs-Linux Debate
Chapter 9(d). Server-Side. Asynchronous Processing for Finite State Machines/Actors: from plain event processing to Futures (with OO and Lambda Call Pyramids in between)
Chapter 9(e). Server-Side. Programming Languages
Chapter 11. Pre-Coding Checklist: Things Everybody Hates, but Everybody Needs Them Too. From Source Control to Coding Guidelines

 


#DDMoG, Vol. I

[++]Vol. I. CURRENT, available for sale on Amazon

[+]Preface

[+]Chapter 1. Game Design Document from an MOG perspective

[+]Chapter 2. On Cheating, P2P, and (non-)Authoritative Servers

[+]Chapter 3. Communications

 

 

 

 


#DDMoG, Vol. II

[++]Vol. II. CURRENT (3rd beta), available to backers as an "early draft" on Indiegogo and on Leanpub

[+]Chapter 4. DIY vs Re-Use: In Search of Balance

[+]Chapter 5. Reactor-fest Architecture. I got Event Loop. I got Event Loop. I got All Event Loop

[+]Chapter 6. Client-Side Architecture

[+]Chapter 7. Client-Driven Development: Unity, UE, Lumberyard, Urho3D, and 3rd-party Network Libraries

 

 

 

 


#DDMoG, Vol. III

[++]Vol. III. CURRENT (2nd beta), available to backers as an "early draft" on Indiegogo and on Leanpub

[+]Chapter 8. Scalability

[+]Chapter 9. Server-Side MOG Architecture

[+]Chapter 10. Fault Tolerance

[+]Chapter 11. Pre-Coding Checklist: Things Everybody Hates, but Everybody Needs Them Too. From Source Control to Coding Guidelines

Stats for CURRENT version of Vol. I-III:

  • 270’000 words (~1000 pages)
    • +~150% more content added compared to “1st beta”
    • ~half of content of “1st beta” rewritten (subjective)
    • overall, ~80% of the content in “2nd beta” is new compared to “1st beta”

Part PROG. Programming


#DDMoG, Vol. IV

[++]Vol. IV CURRENT ('1st beta', available online)

[+]Chapter 12. Things to Keep in Mind

[+]Chapter 13. Network Programming

[+]Chapter 14. Marshalling and Encodings

[+]Chapter 15. Basic Security

 

 

 

 

 


#DDMoG, Vol. V

[++]Vol. V CURRENT ('1st beta', available online)

[+]Chapter 16. C++ Programming for Games

[+]Chapter 17. Graphics 101

[+]Chapter 18. Client Updates

 

 

 

 

 

 

 



#DDMoG, Vol. VI

[++]Vol. VI CURRENT ('1st beta', available online)

[+]Chapter 19. Random Number Generation

[+]Chapter 20. Databases

[+]Chapter 21. Payment Processing

[+]Chapter 22. Testing, Debugging, and Logging

 

 

 

 

 

Part DEPL. Deployment

#DDMoG, Vol. VII

[++]Vol. VII. '1st beta' IN PROGRESS

[+]Chapter 23. Preparing for Launch

[+]Chapter 24. Launch!

[+]Chapter 25. DevOps for MOG

[+]Chapter 26. Back-End Tools and Help Desk

[+]Chapter 27. DB Optimizations, Take 1

 

 

 

 

 

 

 


#DDMoG, Vol. VIII

[++]Vol. VIII. PLANNED

[+]Chapter 28. Bot Fighting

[+]Chapter 29. Other Player Abuses

[+]Chapter 30. Protecting from Internal Abuses

 

 

 

 

 

 

 

 


#DDMoG, Vol. IX

[++]Vol. IX. PLANNED

[+]Chapter 31. i18n & Multi-Currency

[+]Chapter 32. Optimizations and Scaling

[+]Chapter 33. Deployment, Take 2

[+]Chapter 34. Security, Take 2

[+]Chapter 35. Themes, Modding and 3rd-Party Tools

[+]Conclusion

 

 

 

 

 

 

 

 

 


[[Now, we will interrupt our beta book, and will ask you a question:

How do you want this book to be posted on this site during Beta-Testing?

  • Start from the very beginning (Chapter I) (67%, 43 Votes)
  • Skip all the preliminaries in Part A, start right from coding (Part B, Chapter IX) (20%, 13 Votes)
  • I don't care about Business Requirements! Skip Chapter I, start from Chapter II (11%, 7 Votes)
  • Forget it, I won't read it anyway (2%, 1 Votes)

Total Voters: 64

Loading ... Loading ...

EDIT: POLL IS CLOSED NOW

Back to the book…]]


About

'No Bugs' HareAbout the Author. The author of this book is a ‘No Bugs’ Hare from the warren of Bunnylore. He is known for being a columnist for Overload journal (ISSN 1354-3172) and for his significant contributions to software development blog ithare.com. As ‘No Bugs’ is a rabbit with his mother tongue being Lapine, he needed somebody to translate the book into some human language. And of course, as the book is highly technical, to translate technical details with the highest possible fidelity, he needed a translator with substantial development experience.

'No Bugs' HareAbout the Translator. This book has been translated from Lapine language by Sergey Ignatchenko, a software architect since 1996. He is known for writing for industry journals since 1998, with his articles appearing in CUJ, Overload, C++ Report, and (IN)SECURE Magazine. His knowledge of Lapine is quite extensive, and he is routinely translating the column which ‘No Bugs’ writes for Overload. During Sergey’s software architecting career, he has been leading quite a few projects, including being a co-architect of a G20 stock exchange (the same software has been used by stock exchanges of several other countries too), and a sole original architect of a major gaming site (with hundreds of millions user transactions per day, and processing hundreds of millions of dollars per year). As a kind of paid hobby, he’s also inventing things: he’s an author and co-author of about a dozen of patents (unfortunately, owned by his respective employers 🙁 ).

'No Bugs' HareAbout the Illustrator. Illustrations for this book are made by Sergey Gordeev from gagltd.eu. He is a professional animator with 10+ awards from various animation festivals, and is known for being a director of some of Animated Mr. Bean series.

Scope

Whenever you open a book for the very first time, you naturally have two questions: “Is this book for me?” and “What is this book about?”. First, let’s see whether this book is for you if you want to use a 3rd-party game engine.

Whether Writing Your Own Engine or Choosing an Existing One, You Do Need This Book

Assertive hare:One thing you should never do, is blindly believing that the engine will be a perfect fit to your specific gameIn many cases it may be very tempting to use an existing (usually 3rd-party) game engine rather than to develop your own one. And quite often it may be a Really Good Idea to do so. However, one thing you should never do when developing anything-more-complicated-than-two-player-tic-tac-toe, is blindly believing that the engine will be a perfect fit to your specific game. Even when the game engine is used by dozens of highly successful games – there is no guarantee that it will work for your specific requirements (unless, of course, you’re making a 100% clone of one of these games).

Instead of assuming “The Engine Will Do Everything Exactly As We Want”, you should try to understand all the relevant implications of the engine-you’re-about-to-choose, and see if its limitations and peculiarities will affect you badly down the road. This is where this book will be useful. It won’t compare existing engines, but it will describe (and explain) principles which are necessary to build a technically successful multi-player game. It means that you will be able to make an informed decision about the game engine (and maybe will decide to write your own parts to complement the existing engine).

So, if you’re going to choose an existing game engine – you need to understand how game engines work (so you can choose the game engine which is suitable for your needs even when you grow to millions of players). And if you’re going to write your own game engine – you certainly need to understand how game engines work. It means that

Whatever you do while developing your own Massively Multi-player Game,
You DO Need This Book
🙂

That’s all what matters for now; we’ll discuss pro- and contra- arguments for DIY over reusing 3rd-party stuff in Chapter [[TODO]].

Focused on Massively Multi-Player Games, but Applies to LAN-based Games Too

Hare pointing out:If you're about to write a LAN-based game – most of the this book still applies, but make sure to read AppendixNow let’s try to answer the question “What is this book about?” As the title suggests, this particular book is all about massively multi-player games working over the Internet. It means that single-player games are certainly not our focus; however, for LAN-based multi-player games with only a few players this book is relevant (to a certain extent). While you certainly can build a LAN-based game along the lines described in this book, and it will work, doing it in a way-optimized-for-massively-multiplayer-environments may involve quite a few overkills, which in turn may lead to unnecessary delays with releasing your game. If you’re about to write a LAN-based game – most of the this book still applies, but make sure to read Appendix “Applicability to LAN-based games” for discussion of potential simplifications which you may apply. [[Beta notice: at this point Appendix is tentative and not guaranteed]]

Whenever saying “massively multi-player” game, I mean that the game should be able to reach really massive numbers; if following the advice in this book (including that of in Part D), millions of the players should be perfectly doable; I’ve personally architected a site which has hundreds of thousands of simultaneous players and handled hundreds of millions of user transactions per day.1


1 for our purposes, “user transaction” is an interaction of a user with the server, which causes server-side changes, where these changes are visible to at least some other players

 

Genres: From Social Games to MMOFPS, with Stock Exchanges in Between

When it comes to the game genres, this book aims to cover all of them (as long as multiple players are involved). While these games vary in terms of requirements imposed on the engine, these requirements are still interrelated; moreover, these requirements represent a more-or-less continuous spectrum, so breaking it at any given point would be quite arbitrary. Let’s take a look at the Latency Tolerance a.k.a. Acceptable Input Lag (which is one of the most important requirements from the multiplayer game engine perspective):2

  • Social Games (usually Facebook/Phone). Typical Latency Tolerance: usually minutes are ok
  • MMO Turn-Based Strategies. Typical Latency Tolerance: seconds
  • Multi-Player Casino Games (bingo, blackjack, poker). Typical Latency Tolerance: single-digit seconds
  • Stock Exchanges and Sports Betting. Typical Latency Tolerance: as fast as possible, though most important is “being fair” requirement.
  • Massively Multiplayer Online Real-Time Strategies (MMORTSs). Typical Latency Tolerance: low triple-digit milliseconds
  • Massively Multiplayer Online Role-Playing Games (MMORPGs). Typical Latency Tolerance: < 200-300 milliseconds
  • Massively Multiplayer Online First-Person Shooters (MMOFPSs). Typical Latency Tolerance: high double-digit milliseconds

As you can see, there is a whole spectrum of latency requirements, from minutes for social games to high double-digit milliseconds for MMOFPS, with pretty much everything in between. However, we will see that as soon we take latencies into account, further differences between genres become much less pronounced from the multiplayer engine perspective.


2 only typical values are provided, your mileage may vary, batteries not included. Also note that here we’re speaking about end-to-end latency/input lag (from controller button pressed, to player seeing results on screen); lots of different factors will eat milliseconds out of this allocation even before we have a chance to look at the data, see further discussion in Chapter [[TODO]]

 

Topics: All But Gameplay/AI/Monetization

Inquisitive hare:While we're not about to answer the question “WHAT do you want to do?”, we will try to answer the question of “HOW to do whatever-you-want-to-do”Game development and deployment is a huge task, so it is important to realize what exactly we want to cover. This book is very ambitious in this regard: it aims to cover all the aspects of game development and deployment, with one (though all-important) exception. In this book, we won’t try to answer questions such as “What should your game be about?”, “How should your game look?”, and “How to make money out of your game” ; these are all-important business questions which you need to answer yourself. When starting development you should know exactly how you want your game to be played, how you want it to look, how your AI (if applicable) will work, and how you’re going to monetize it.3 These questions are completely out of scope of this book.4

On the other hand, as soon as you have answers to these questions – this book has got you covered. We’ll discuss pretty much everything you will need to release your game and keep it running, from overall architecture to deployment and post-deployment issues.

In other words: while we’re not about to answer the question “WHAT do you want to do?”, we will try to answer the question of “HOW to do whatever-you-want-to-do” in as much detail as we can fit into one single book.

Too Large to Fit and Therefore Sketchy: 3D and Physics

While we’re aiming to answer all the questions related to “HOW to do whatever-you-want-to-do”, there are a few issues which are very large on their own, and just wouldn’t fit into one single book. As a result, these issues are admittedly sketchy in this book; while we will have a chapter on 3D graphics and sound (and will discuss physics engines too), please don’t expect this to be as detailed on these topics as those books which are dedicated to 3D engine design.

What is included, should be sufficient to choose your 3D engine (which can often work as a physics engine too). However, if you want to write your own 3D/physics engine, you will need to go beyond this book (I will provide necessary pointers within appropriate chapter).


3 of course, your vision will change as development goes on, but at any point you should have a clear vision of “What you want to achieve”
4 Note that while business question of monetization is not covered, a technical question of payment methods is covered to some extent

Prerequisites

Surprised hare:If your game project is your very first programming project – you're likely to have difficulties understanding this bookThis book is targeted towards at least somewhat experienced developers (in other words, it is NOT “how to develop your first program” book with IDE screenshots and copy-paste examples). If your game project is your very first programming project – you’re likely to have difficulties understanding this book5. For example, I am not going to explain what the “function” (“database” etc.) is; also I expect you to know what “source control” is and why it is necessary, and why encapsulation is a Good Thing(tm).

On the other hand, this book doesn’t rely on in-depth knowledge in any specific area. You don’t need to be a network guru who knows every tiny detail of RFC 793 by heart, neither you need to have hand-on experience with shaders and/or CUDA; even less I expect you to be a C++ guru who is capable of writing boost-like templates (to be honest, at the moment this last one is beyond my own capabilities too). Of course, 3D graphics experience may be helpful for 3D games, and knowledge of network basics and sockets won’t hurt in any case, but whenever discussing the issues which go beyond “things which every developer out there should know anyway”, I will try to provide pointers “where to read about this specific stuff if you happen to have no idea about it”.


5 Feel free to read the book even in this case, but don’t complain too much if it turns out to be too difficult

 

CD NOT included

The book is not going to have an associated CD. First, any attempt to provide CD-with-sample-code almost inevitably ends up in a very platform-specific code, and as one of the main points of the book is that your platform depends on your needs, providing heavily platform-specific code to illustrate this point will be a kind of oxymoron. Second, as mentioned above, this book is not intended as a book-where-you-can-copy-paste-your-very-first-game-from. The reason behind this approach is that in the Internet Age it is easy to find specific information such as “how to write your first Direct3D program”; such tutorials are abundant and can be found (if necessary) elsewhere.

On the other hand, 50’000-feet view with architectural concepts and practical observations such as “what are the advantages of TCP over UDP and vice versa depending on your particular game” or “why exposing multithreading to game logic level is harmful” are relatively difficult to find; this is what this book intends to cover.

BYOS (Bring Your Own Salt)

Judging hare:In the practical world (especially in game development), for each and every “Do THIS_THING this way” statement there exists a counter-exampleOne last thing I would like to mention before we proceed to more practical matters. There is no one single sentence in this book (or any other book for that matter) which is to be taken as an “absolute truth”. In the practical world (especially in game development), for each and every “Do THIS_THING this way” statement there exists a counter-example, illustrating that sometimes THIS_THING can (or even should) be done in a different manner.

Every advice out there has its own applicability limits, and so does any advice within this book. When I know certain game-related scenarios when these limits are likely to be exceeded (and the advice will become inapplicable) – I will try to mention it. However, it is extremely difficult to predict all the usage scenarios in such a huge industry as game development, so you should be prepared that some of the advice in this book (or any other book) is inapplicable to your game without warning.

Therefore, take everything you read (here or elsewhere) with a good pinch of salt. And as salt is not included with the book, you’ll need to bring your own one. In more practical terms –

For each and every decision you make based on advice in this book, ask yourself:
Does This Advice Really Apply to My Specific Case?

[[To be Continued…

Tired hare:

First (actually, first, second, or ninth – depending on the poll above) chapter from the book coming soon… Stay tuned!

EDIT: beta Chapter I, Business Requirements, has been published. All the beta chapters will be shown on this page in ToC as they are published.]]

Don't like this post? Comment↯ below. You do?! Please share: ...on LinkedIn...on Reddit...on Twitter...on Facebook

Acknowledgement

Cartoons by Sergey GordeevIRL from Gordeev Animation Graphics, Prague.

Join our mailing list:

Comments

  1. says

    Something I didn’t see mentioned in your TOC is latency simulators. For doing online development with UDP, it is the easiest tool I’ve used for finding bugs. Take what you’ve made, crank the latency up to 1000ms or so and see if it still works. Then set it to reorder and/or drop packets, you’ll find even more bugs. The one I used was a regular Linux box bridging two subnets, I can’t remember the name of the program it used.

    Really interested in the book BTW. New Riders “Developing Online Games” is also an excellent resource for MMO development.

  2. Ian Smith says

    Put i18n somewhat sooner than Volume 3. It is part of UI planning.

    Don’t forget my favorite bot fighting technique, Game Design. I played WoW back shortly after beta. My attack sequence was: tab, 122322422 90 repeat. ( 9 and 0 to replenish health and mana.) By contrast, the game I had played just before that involved too much aiming and risk to effectively bot. The game was too complex to reduce to easily reproducible behaviors regardless of area. A context sensitive game is inherently bot resistant, and more fun to play. The game I played before the fun one? Matrix Online, where I was essentially forced to bot for crafting. Because I was the only player with a decent crafting supply, I ended up making a few hundred dollars selling the crafting supplies.

    If fishing is boring, it will be botted almost immediately. Context, player feedback, and in some cases, less clues. Trove fishing is botted by looking for the sound playback function call. If the line just twitched and it was an obvious message or giant function call, it would be harder to bot. Including memory addresses, fishing bots were released 2 days after fishing was released.

  3. Herman says

    Hello,

    Is it still possible to get access to beta two of the book now that the funding campaign has stopped? Would love to get my hands on it.

  4. Alex says

    Hello!

    First of all I want to tell thank you for this content (or project or articles, don`t know how to say correct)! Strange but I really couldn’t find anything like this despite so many teams now make games…

    But, as I see, many post/comments here end in 2017. Is this project still alive and u still plan to write all 9 books?

    • "No Bugs" Hare says

      Yes, I know I am behind (got quite a few things happening on a personal front), but am still planning to proceed.

  5. Michael Matias says

    Hello there.
    I bought your first volume on multiplayer online games.
    I was wondering if there are printed versions of the remaining volumes?
    Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.