Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Making Multiplayer Online Games: A Game Development Workbook for any Phaser JavaScript Gaming Framework.
Making Multiplayer Online Games: A Game Development Workbook for any Phaser JavaScript Gaming Framework.
Making Multiplayer Online Games: A Game Development Workbook for any Phaser JavaScript Gaming Framework.
Ebook438 pages5 hours

Making Multiplayer Online Games: A Game Development Workbook for any Phaser JavaScript Gaming Framework.

Rating: 0 out of 5 stars

()

Read preview

About this ebook

This book includes game design and implementation chapters using either Phaser JavaScript Gaming Frameworks v2.6.2, CE, v3.16+, AND any other JS Gaming Frameworks for the front- and back-end development. It is a Book of 5 Rings Game Design - "HTML5, CSS, JavaScript, PHP, and SQL". It further analyzes several freely available back-end servers and supporting middleware (such as PHP, Python, and several CMS). This game design workbook takes you step-by-step into the creation of Massively Multiplayer Online Game as a profitable business adventure - none of this theoretical, local workstation proof of concept! It uses any popular JavaScript Gaming Framework – not just limited to Phaser.JS!! – on the client-side browser interfacing into a unique, server-side, application using WebSockets. It is the only book of its kind since January 2017 for the Phaser MMO Gaming Framework!

  • Part I leads you through the world of networks, business consideration, MMoG analysis and setting up your studio workshop. I have 40 years of networking career experience in highly sensitive (i.e., Government Embassies) data communications. I am a certified Cisco Academy Instructor and have taught networking, networking security, game design/development, and software engineering for the past 14 years at the college level.
  • Part II Guides you into Multi-player Online Game architecture contrasted to normal single-player games. This lays the foundation for Multi-Player Game Prototypes and reviews a missing aspect in current MMoG development not seen in many online tutorials and example code.
  • Part III contains 3 chapters focused on production and development for the client-side code, client-proxy, server-side code, and MMoG app. This content sets the foundation for what many Phaser tutorials and Phaser Starter-Kits on the market today overlook and never tell you! Upon completion of Part III, you will have your bespoke MMoG with integrated micro-service, and if you choose, web workers and block-chain.
  • Part IV (Bonus Content) This section includes proprietary Game Rule Books and EULA source code included as a part of your book purchase. It features four (4) Game Recipes – step-by-step instructions – listed by complexity "1" = easiest (elementary skills) to "4" = most complex (requiring advanced skills across several IT technology disciplines). Each external “Walk-Through Tutorial” guides you in different aspects of MMoG development.
  • How to migrate single-player games into a 2-player online delivery mode (not using "hot-seat")!
  • How to use dynamic client-side proxy servers and migrate this game from its current single-player mode (with AI Bot) into an online 2-player mode (not using "hot-seat")!
  • How to include "Asynchronous Availability" during gameplay and migrate this gameplay mode (with AI Bot) into an online "Asynchronous Availability" 3-player mode using postal mail or email game turns! The FREE game rule book will help "deconstruct" this game mechanics.

LanguageEnglish
PublisherScribl
Release dateNov 7, 2016
ISBN9781952635007
Making Multiplayer Online Games: A Game Development Workbook for any Phaser JavaScript Gaming Framework.
Author

"Stephen" "Gose"

* Career (Retired): Stephen Gose, Ph.D. Information Systems (honorary), MBA International Management and a "second-generation German", is a retired Professor Emeritus with a 40-year career as a certified network engineer, and a "Certified Cisco Academy Instructor" (CCAI) since 2002. He is listed in the Who's Who for Information Technology for his directly-related work for the Internet backbones found in the Caribbean, Netherlands, Israel, and Russia. He was awarded "Letters of Appreciation" from AT&T, and the German, Israeli, Dutch, and Russian Governments. Steve has nearly three decades of international "teaching and conference lecturing" in both Local-Area and Wide-Area Networks, network security, Internet backbones, software engineering, and program/project management. He is a retired US Army Signal Corps Officer. He earned, in 2014, the ITT Technical Institute's "Instructor of the Year" out of 144 campuses and 8,000 instructors. In his spare (?) time, Steve enjoys creating online casual games and managing his online gaming business. * His personal website: http://www.stephen-gose.com/ * His game showcase: http://www.renown-games.com/ * His theology website: http://kingdomofgodprinciples.com./ * as a Licensed Minister since 1972: Stephen Gose graduated from Grand Canyon University with a B.A. in Religions and Music Education. He has served as a licensed minister since 1972 and as a missionary to Japan. He earned the US Army Chaplains Outstanding service award in 1983.

Related authors

Related to Making Multiplayer Online Games

Related ebooks

Video Games For You

View More

Related articles

Reviews for Making Multiplayer Online Games

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Making Multiplayer Online Games - "Stephen" "Gose"

    Making Massive Multiplayer Online Games

    Making Massive Multiplayer Online Games

    A Game Development Workbook for any Phaser JavaScript Gaming Framework.

    Stephen Gose

    This book is for sale at http://leanpub.com/rrgamingsystem

    This version was published on 2020-04-06

    publisher's logo

    *   *   *   *   *

    This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do.

    *   *   *   *   *

    © Copyright 1972 - 2016 Stephen Gose. All rights reserved.

    ISBN for EPUB version: 978-1-952635-00-7

    ISBN for MOBI version: 978-1-952635-00-7

    For my student@ Early Career Academy, Tempe, AZ

    and @ ITT Technical Institute, Tempe, AZ

    and more currently

    To my students @ University of Advancing Technology (UAT), Tempe, AZ

    Table of Contents

    Distribution Permission

    Viewing this e-Book

    Disclaimer

    Forwards

    About this Workbook:

    Disclosures

    Workbook Content:

    Book formatting:

    Who should use this workbook?

    Your newly obtained skills…

    Bonus Content

    Game Design System™ Recipes:

    Our References:

    Tweet This Book!

    Part I: Network Concepts and Design

    1 Business Considerations

    1.1 Formal Business Launch Required?

    1.2 Common Marketing Sense

    Building Desk-Tops or Web-apps? (Business Philosophy)

    Find Similar Games (Competitors)

    Key Features (Matching the Competition)

    Key Differentiation & Unique Features (Setting Us Apart)

    Understanding the Block-chain Business Model in Gaming

    1.3 New Dog, Old Tricks?

    1.4 Generating Game Ideas & Mechanics

    1.5 Copyrights & EULA

    1.6 Chapter Summary

    1.7 Chapter Foot Notes

    2 Building a Game Studio Workshop

    2.1 Workstation Set-up Environment

    2.2 Development Tools

    Text Editor

    IntelXDK (deprecated)

    2.3 Project File Structure

    My Project Recommendations

    2.4 Summary

    3 Networking Basics

    3.1 Network Foundation Inventory

    3.2 Deeper Dive: Testing MMoGs Locally??

    Hot-seat MMoG Demos

    3.3 Network Relationships

    3.4 Network Concerns

    3.5 Network Transport Protocols Overview

    Protocols Defined

    Layer 4 UDP vs. TCP

    The Way We Were . . .

    New Kid on the Block

    Deeper Dive: WebSocket Frame

    3.6 Chapter Summary

    3.7 Chapter Foot Notes

    Part II: MMoG Architecture

    4 MMoG Engine Analysis

    4.1 What is a Game Engine?

    4.2 To Build or not to Build, that’s the question!

    4.3 Purpose of XML and JSON

    4.4 MMoG engine Criteria:

    Here’s my list and chart: (not in order of preference)

    4.5 Server-side Research

    4.6 Vetting our candidates

    4.7 Node.js vs. WebSockets vs. Socket.io

    Socket.IO bloated overhead!

    4.8 Final Analysis

    4.9 Server-less Alternatives

    Online Development — Single Provider Option

    Deploy Using Various Cloud Microservices

    Build a Vertical

    4.10 Chapter Summary

    4.11 Chapter Foot Notes:

    5 MMoG Application Architecture

    5.1 Comparing Single- to Multi-Player Games

    Deeper Dive: Using Web Workers

    Deeper Dive: Await and Promises

    5.2 Differences in MMoG Games?

    Player Interactions

    Technology Architecture

    Deeper Dive: Ethereum Distributed App (DApp) Games

    Live testing of MMoGs!

    5.3 Technical Aspects

    Writing Source Code Differently: How vs What!

    Construction Sequence and Regimen

    5.4 Encoding Formats for Game Turns

    MMoG App API - RPC or MOM?

    5.5 Deployment Concerns

    5.6 Persistent Data structures

    Deeper Dive: 3rd Option for Real-time MMoG

    Distributed Database (sharding)

    MMoG Database Examples

    Deeper Dive: Learn from the Best — UnReal Engine

    Deeper Dive: Learn from the Best — Unity Multiplayer Networking

    Deeper Dive: Learn from the Best — IBM Microservices

    Additional Information

    Deeper Dive: Learn from the Best — Google GRITS

    Deeper Dive: Learn from the Best — Rob Hawkes

    5.7 New Tricks

    5.8 Managing Network Transports

    Skipping Rope! (Fixed Time Intervals)

    Adobe RTMP and RTMFP

    5.9 Availability

    5.10 PBM³ Technology

    Managing Time-line Models

    5.11 Too Hot, Too Cold, Just right! … where & what

    Deployment Options

    5.12 Chapter Summary

    5.13 Chapter Foot Notes

    Part III: Production & Development

    6 Client-side Foundation

    6.1 Testing Your Browser

    6.2 WebSocket Protocol Handshake

    Deeper Dive: WebSocket API

    6.3 Sample Source Code: Client-side WebSocket

    Step #1: Game index page

    Step #2: Generate Event handlers

    6.4 Security Concerns

    MMoG Protection

    Deeper Dive: WebSocket Security

    Deeper Dive: Sticky Load Balancing

    Use of

    6.5 One Last thing

    Smart (thick) vs. Dumb (thin)

    6.6 Chapter Summary

    6.7 Chapter Foot Notes

    7 Server-side Foundation

    7.1 Building a Socket Server

    Server Requirement Considerations

    Deeper Dive: Measure Network Latency

    7.2 Server Pages

    Code Review index.php

    Review demo/server.php Content

    7.3 Where’s Phaser!?

    7.4 Extending Our Operations

    Deeper Dive: The CMS Game Shell

    Deeper Dive: When to use the game shell model

    7.5 CMS — Server-side Frameworks

    Index Page (Non-Traditional Method)

    7.6 CodeIgniter / Phaser Integrated CMS

    High Score Services

    Membership Login

    7.7 Back-end Administration

    7.8 Chapter Summary

    7.9 Chapter References

    8 MMoG App API Engine

    8.1 Building a MMoG App APIs

    8.2 Game Turn Orders

    Creating MMoG API Prototypes — 4-Step method

    C2S GTOs Samples

    Deeper Dive: JSON Microdata Format

    Client-side Proxy Server

    8.3 Game Turn Responses

    Deeper Dive: Real-time MMoG Design

    S2C GTRs Samples

    8.4 Using Horizontal Micro-services

    8.5 Modeling from Others MMoG Contributors

    Lessons Learned the Hard-way

    8.6 Chapter Summary

    8.7 Chapter References

    Part IV: Step-by-Step Tutorials

    Appendix

    Appendix: Making Phaser 3D Games!

    Appendix: Phaser Plugins

    Other resources:

    Selling your Game Assets

    Distribution Permission

    Originally released edition 1.0.0 18 DEC 2013.

    All rights reserved. No part of this book may be reproduced in any form or by any electronic or mechanical means including information storage and retrieval systems, without permission in writing from the author. The only exception is by a reviewer, who may quote short excerpts in a review as defined here.

    NOTE: Book Editions Bonus Download Content is available from the book’s website: http://makingbrowsergames.com/mmog/ You will find errata information, source code and software updates. Thank you for your patronage.

    Viewing this e-Book

    This e-Book includes source code which is optimally viewed in single-column, landscape mode with the font size adjusted to a comfortable setting.

    Disclaimer

    All the information contained within is for the convenience of its reader. All information is accurate as can be reasonably verified at the time of original publication. However, content suggested may not reflect current industry recommendations after original publication date for ECMA-262 (also known as — aka — JavaScript, ES5, ES6, ES7, ES8 or ES9), Phaser Game Framework versions 2.6.2, Community Editions (CE) or Phaser III (as v3.16+ only). There are no guarantees nor warranties stated or implied by the distribution of this information. Using the information in this document is at the reader’s own risk, and no liability shall carry to the author. Any damage or loss is the sole responsibility of the reader.

    This book’s intent is not to teach basic HTML5, CSS nor JavaScript fundamentals, game design best practices nor for encoding JavaScript into Object-Oriented Programming (OOP) style. Its content provides simple-to-follow worksheets, step-by-step instructions, and a straight-forward approach to building games from common component prototypes using the Game Design System™ innovation. This system process and resulting source code are merely one approach; and hence, does not claim to be the best nor most efficient way of implementing these widget-mechanisms and game mechanics.

    Stephen Gose LLC reserves the right, at any time and without notice, to change modify or correct the information contained in this publication. All websites listed herein are accurate at the time of publication but may change in the future or cease to exist. It is best to research dead websites links on The WayBack Machine The listing of website references and resources does not imply publisher endorsement of the site’s entire contents.

    Warning: The newsletter dated 21 September, 2018 includes projected development on Phaser III. In August 2017, many features in pre-Phaser v3.16.x were removed. There were many business decisions on why they were removed based on financial support and sponsorship deadlines imposed. Phaser v3.14.0 (released OCT 2018) saw the return of these deleted features. In other words, Phaser v3.14.0 returns to the original vision of January 2017 after several (6) rewrites. Phaser v3.15+ was the next massive re-write (released OCT 2018); followed by v3.16.0 DEC 2018. My best guess is that any and all books, tutorials and how to articles — written prior to Phaser v3.16.0 (NOV 2018) — are not fully functional with Phaser III (as v3.16+) and should be re-written to the Phaser v3.16.0 minimum standard baseline. Hence the reason this book is dedicated and updated to the official Phaser III (release v3.16.x) and has removed any references to previously released versions prior to v3.16+ (See newsletter #139 dated 20190211) Breaking Changes

    Forwards

    by Terry Paton: "Copying or imitating is an awesome way to learn how to do something, traditional artists have done it for centuries. This practice was generally considered a tribute, not forgery, — If you want to get better at something, then trying to do it like those who already have mastered it. Look at the choices they have made and consider why they made those decisions, often important things are hidden in subtlety and the only way we learn those subtleties is by creating the same thing. The balance here is stealing versus inspiration. Ripping off ideas from someone else in a way that harms their hard work compared to producing something which is inspired by their work. If you plan on publicly releasing something, I recommend you should inject some of your own vision into any game you make, take a concept but then extend or change it to create something of your own."

    by Christer Kaitila: The McFunky-pants Method "Challenge yourself to create a code-base that compiles and runs in the first few hours. Make it so that you can accept inputs, move around, animate something, and trigger some sounds. This prototype, lousy a game as it may be, is going to be your best friend. The sooner you can have a working early playable prototype, the more likely you are to succeed. No-art prototypes also have one other major advantage: in previous games, I would make beautiful mock-ups in PhotoShop and gather hundreds of lovely looking sprites in preparation for the game. After development was complete, the vast majority of the art had to be replaced, re-sized, or thrown out. I’ve wasted thousands of hours making game-ready artwork before coding; these days I know that the tech specs and evolving game-play mechanics will mean that much of what you make at the start won’t make it into the finished game."

    About this Workbook:

    This workbook IS NOT FOR novice developers; you will need at least one year in computer science programming and one college semester of networking computer architectures. These are the minimum baseline foundation to use this workbook.

    This 5th edition offers new development tools and production methods I call the Game Design System™ in which we’ll create MMo Game Recipes™. Expert game developers understand the Don’t Repeat Yourself (D.R.Y.) concept, yet few have taken a step back to the 10,000 foot view (i.e., Executive level thinking) on game production pipelines. We’ll do that aerial view in this book as we build prototypes, mechanics and artwork. Along with game construction, we’ll build tools to automate our pipeline. I believe you will be surprised how quickly and easily we’re able to build games using the Game Design System™ with its Game Recipes™ tools. Although this workbook is intended to be a hands-on guide to HTML5 game development with emphasis on any version of Phaser JavaScript Gaming Frameworks. Yet, our project management applies to any popular game development framework.

    Most of the content in this book is actually not inside these pages. The Internet is a living, dynamic resource of information that doubles every 35 days! I explain why this book refers to external resources in the Book Formatting Section below. You’ll find the external content in the footnotes, as reference links, and in the Bonus Content files (which are available from the supporting website or from your LeanPub.com personal library. Therefore, if you purchased this book from:

    LeanPub.com — you have a perpetual edition available in your library.

    Amazon.com — you may access the latest information from our website.

    http://makingbrowsergames.com/mmog/

    All the source code is written in pure JavaScript or either Phaser JS Framework; it doesn’t use any additional abstraction layers such as TypeScript, CoffeeScript, or JQuery. JSLinting, minification, compression, obfuscation, and security topics are discussed in the Marketing & Distribution Chapter.

    I’ve gone to great lengths to make this book skim-friendly — even for my International customers. I have provided links to English (American) Jargon phrases that will help translate this content directly into your native language. The entire new 4th edition has more screen shots, step-by-step worksheets, thoroughly annotated source code listings, illustrations, and diagrams. I use Notes, Tips, Warning and Best Practices icons to encapsulate those ancillary topics for your further education from other experts in the gaming industry.

    I assume that many readers will want to use this book as a reference (as demonstrated from the previous three editions) as well as a tutorial workbook. So, I’ve included references to other games, gaming engines, frameworks, indie developers, authors, their open source contributions, their articles, books, artwork, applications tools and their wisdom. If you’d like a link to your content included in future updates, please use my contact information on LeanPub.com or Amazon.com Author’s page; see the next section.

    Disclosures

    In this book, I am not paid to recommend any of the tools or services presented but I do use affiliate links. Here’s how it works. When I find a tool, service, author’s content, idea, or product I admire, I investigate if they have an affiliate program. If it exists, I get a special link and when you click it or confirm a purchase I receive a small percentage from that activity. In short, it’s the same methods everyone finds on any typical website; only now, those reference links are available inside ebooks.

    I think everyone, with any business savvy, should do this too; especially when you recommend books, services, and tools to your own products. Amazon and other publishers offer affiliate links. Whenever you recommend anything (hopefully this book? hint, hint!), use your Amazon affiliate link.

    By law, I must disclose that I am are using affiliate links. Amazon, in particular, requires the following.

    We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.

    Thank you for your patronage! I truly appreciate it.

    Workbook Content:

    This workbook IS NOT FOR novice developers; you will need at least one year in computer science programming and one college semester of networking computer architectures. These are the minimum baseline foundation to use this workbook.

    This workbook is a hands-on guide to HTML5 game development with an emphasis on either Phaser JavaScript Gaming Frameworks for Multi-Player networked games implementing WebSockets. By following my steps toward developing a complete massive multi-player online game (MMoG) using game prototypes, you will translate my process into your own bespoke game design product(s) in a matter of hours! I will explain my rationale behind each decision so that you can adapt my methods into your products’ pipeline in a similar manner. When you finish this workbook and all the exercises, unlike every book on the market today, you should have a working copy of your own bespoke game — not merely a duplicate copy of mine! Several well-known multi-player game servers are provided as back-end services to scaffold your game production; this provides a better than agile-software development process to bootstrap your game productions quickly into your own unique product releases. The appendices are reference guides into the necessary, free, and open-source assets. Here are the main topics we cover in the NEW 4th Edition’s content:

    MMoG network issues and troubleshooting.

    WebSockets without the processing overhead.

    Converting Single-player games with AI into MMoGs.

    Step-by-Step worksheet tutorials for several games.

    Game Generation Tools construction for Game Recipes™.

    Game Category alignment with App Stores and the gaming industry.

    Distribution and Marketing: who, where, and how to deploy finished game products with supporting data from current marketing analysis.

    Coding Style Appendix: Migration away from classical OOP to OLOO compositions (A section for interested Senior Programming Engineers and the rationale on why and how. OR you could consume the You don’t know JS series.)

    The Deeper Dive: dedicated sections for interested Software Engineers concerning various aspects of Phaser JS Gaming Frameworks.

    The Game Design System™ development methods for Software Project Management.

    Part I. Network Concepts and Design (Chapters 1 to 3): Chapter 1 is dedicated to the indie game studio start-up and those from a game hobbyist to any commercial endeavor. Appendix — US Business start-ups supports Chapter 1. If you are thoroughly comfortable with your workstation environment, you may skip Chapter 2 entirely. Chapter 2 guides you in setting-up a valid testing environment. Chapter 3 is about Data telecommunications 101. If you are thoroughly comfortable with networking aspects and recent WebSockets technology, you may skip Chapter 3 entirely.

    Part II. MMoG Application Architecture (Chapters 4 & 5): Chapter 4 is a critical path and foundation chapter in MMoG Engine Analysis and evaluation. It lays the ground work for future chapters. Chapter 5 reveals an innovative approach and reviews a missing aspect in current MMoG development tutorials. It further lays the foundation for Multi-Player Game Prototypes based on the Game Design System™.

    Part III. Production and Deployment. This content is what your Phaser tutorials and Phaser Starter-Kits on the market today overlook and never tell you! Topics include preparing a game product for various distribution or marketing channels, pricing, and international marketing efforts.

    Part IV. Walk-through Examples provides several FREE game licenses (valued at $48 each). we’ll take our crafted Part I game components and apply Part II game mechanic logic/rule systems. I demonstrate separation of concerns, and my method for rapid game generation using my unique Game Recipes™ from the Game Design System™ for three (3) different styles of MMoGs. Included are FREE Life-time EULA for each example.

    Part V. Appendices, Resources and Supporting Website available online @ http://makingbrowsergames.com/mmog/

    Bonus Content Courses: The Ultimate and Basic Game Studio Starter Kit Collection Certification Courses are available.

    Book formatting:

    Editor’s Note: Why have separate external links and files?, you say?

    Firstly, the WWW is a dynamic place with new content and methods appearing daily. In 1997, the Internet doubled its information every 7 years; by 2015, the Internet doubled its information every 35 days! What was once the cutting edge becomes deprecated and obsolete in a matter of a few years or even months! (for example, using window.onload initially mentioned in 2004 and now recanted & retracted by the original author!)

    References linking to external concepts preserve this workbook’s integrity and freshness (and thereby your investment in my research), avoids copyright infringements, and permits featured and referenced authors to recant or update their own recommendations (as in the case of using window.onload and especially in the case Phaser v3.x.x JavaScript Gaming Framework frequent updates).

    In general, this book’s narrative shows you how things work, whereas the aside call-outs, footnotes, and reference links delve into why things work as they do. It provides valuable information from other notable game industry experts. My research places the best current recommendation in this workbook, and filters out the cruft.If you follow all my reference links, you’ll have a greater store of knowledge and develop a better understanding about my concepts since we’ll share the same common knowledge foundation.

    It shortens my book by hundreds of pages and lowers my publishing costs which then lowers your purchase price. By keeping the associated source code separated into a Bonus Content areas on the supporting website, it allows you to focus on and compare this book’s content discussions side-by-side with the source code. This permits you to read this workbook without interruptions — unlike many technical books to date. Now, Admit it, Honestly! Don’t you just hate reading miles of UN-commented, UN-documented source code only to arrive, finally, dozens of pages later, at the text explaining everything you just studied? Or some authors place their pages of explanation in front of their UN-commented, UN-documented source code. Neither method is satisfactory in my opinion. I would rather have the text explanations and source code side-by-side. Wouldn’t you?

    Furthermore, it allows me to update my external online source code and supplements without republication. You are purchasing my months of research, investigations, synthesis, and experiments derived from those investigations as links within this book

    Enjoying the preview?
    Page 1 of 1