Multiplayer 2D Games with Unity

In development! Planned release: 4th Quarter, 2022.

ISBN: 978-1-937336-21-9
Copyright: 2023
Author: Brian G. Burton, Ed.D.

Multiplayer 2D Games with Unity walks through the full process of creating an authoritative Client/Server 2D game.
Using open-source and free tools you will learn the process of communicating with a server and handling game events.

With the open-source server tool Colyseus, this textbook walks through the entire process of creating a multiplayer game for virtual reality or desktop play with the Unity Game Engine.

Free Email Updates on Multiplayer Game Dev book
We respect your privacy.

Table of Contents:

Preface
Chapter 0: Before We Begin
Our Goal
How We Will Reach Our Goal
A Few Resources
Chapter 1: Saying Hello
An Introduction to Multiplayer Games
What is a server or a host?
What is a client?
Types of Game Servers
Colyseus Hello World
Things you will need:
Creating a Game Environment
Adding a Player
Adding Movement to the Player
Adding a Spawn Point
Adding the Multiplayer Client
Adding the Colyseus Network Manager
Colyseus State
Entity.cs
State.cs
The Colyseus Client
Sending information to the server
Receiving Information from the server
Colyseus APIs Used

Chapter 2: Understanding Client/Server
Client/Server Architecture
Simplified Client/Server
Full-scale Client/Server
Local vs. Remote Servers
TypeScript
Configuring a local server
Launching your local server
Index.ts
Arena.config.ts
TankRoom1.ts
Debugging in Localhost
Adding an Enemy
Colyseus APIs Used

Chapter 3: Configuring an Arena Server
Learning Objectives
Terminology
First Things First
Compiling TypeScript
Arena
Managing your server
Uploading your script
Updating your client for Arena

Chapter 4: Building A Better Game
Adding the player’s name
Client Implementation of player’s name
Health and Scoring
Combat

Chapter 5: Publishing
Chapter 6: Next Steps