Building Multiplayer Games in Unity : Using Mirror Networking
معرفی کتاب «Building Multiplayer Games in Unity : Using Mirror Networking» نوشتهٔ Polly Barton، Mieko Kanai، Kate Zambreno و Dylan Engelbrecht; Safari, an O'Reilly Media Company، منتشرشده توسط نشر Apress Apress در سال 2021. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
Take a deep dive into creating large-scale, multiplayer games with Unity 3D, using Mirror Networking and a variety of powerful transports. You will learn the fundamentals of RPC/Command multiplayer architecture and dig deeper into networking and data persistence to achieve scalable, highly performant, large-scale, multiplayer games in Unity. This book explains how to develop multiplayer games using Unity within a commercial or enterprise environment. You will take a look at the networking fundamentals behind multiplayer games, including packets and the importance of keeping packets small. Next, you will look into Mirror Networking and see how to leverage a variety of transport layers to achieve large-scale, multiplayer games. Using Unity 3D as the core focus, you will get an understanding of the RPC/Command architecture and how you can utilize different authoritative structures to best suit your needs. You will also learn how to scale your architecture and explore industry-leading methods of deploying your game to the masses. You will also get a solid understanding of networking principles. The book wraps up with advice from leading experts who shed light on past mistakes and provide valuable insights for your next project. This book breaks down daunting concepts into easy-to-understand pieces of knowledge to help you create your first multiplayer game. It is a must-read for any developer looking to understand multiplayer games and networking. What You Will Learn ● Learn advanced multiplayer concepts and how to use them ● Understand the key concepts for creating multiplayer virtual experiences ● Know the basics of computer networking and how to employ them ● Deploy large, scalable multiplayer infrastructures for your games ● Gain insights from other industry professionals Who Is This Book For Intermediate to advanced Unity 3D developers looking to understand multiplayer networking and deploying large-scale products. Having a solid understanding of C# and Unity is required, and having an understanding or prior experience with networking principles such as IPv4 would be advantageous. Table of Contents About the Author About the Technical Reviewer Chapter 1: A Brief Introduction Why Multiplayer? Benefits of Multiplayer Caveats of Multiplayer The Options of Multiplayer in Unity Why Mirror? Prerequisites and Resources Summary Chapter 2: The Messenger Pigeon, Packets, and a Trip Around the World Introduction to Networking A Brief History of Networking Understanding Packets A Look at TCP Packets A Look at UDP packets How Packets of Data Get Transported Around the World TCP/IP Model IPv4 – Internet Protocol Version 4 Addressing ARP – Address Resolution Protocol DNS – Domain Name System How a Headshot Travels Around the World The Importance of Keeping Your Packets Small Network Topologies Star Topology Bus Topology Ring Topology Mesh Topology Hybrid Topology Tree Topology Gateways DHCP – Dynamic Host Configuration Protocol NAT – Network Address Translation Port Forwarding Ports Security The Firewall Kinds of Attacks and How to Mitigate Them Networking Diagnostic Tools of the Trade Wireshark Nmap and Zenmap FileZilla Windows Remote Desktop Event Viewer Mirror Network Profiler Summary Exercises Chapter 3: A Hall of Mirrors Architecture Transport Layers Comparing Transport Layers Additional Transport Component Logic Fallback Transport Component Multiplex Transport Component Using Encryption, NAT Layers, and Relays Encryption Using Monke NAT Punch-Through Using Epic Online Transport Relay Using Light-Reflective Mirror Layers of Choice The Client, the Server, and the Host The Client The Server The Host The Network Manager Configuration Scene Management Network Info Authentication – Network Authenticator Custom Network Authentication Creating Our Custom Network Authenticator Player Object Registered Spawnable Prefabs Network Identities Summary Chapter 4: The Chain of Command Authority Game Server Architecture Input vs. State-Based Architecture Input-Based Replication – Pros and Cons State-Based Replication – Pros and Cons Deterministic vs. Indeterministic Architecture Peer-to-Peer Lockstep Client-Server Architecture Understanding the Chain of Command Remote Procedure Calls RPC Attribute TargetRPC Attribute Commands Command Attribute Synchronization – Properties SyncVars SyncList SyncDictionary SyncHashSet Batching SyncVar Hooks Synchronization – Components Network Transform Network Transform Child Network Animator Network Lerp Rigidbody Network Rigidbody (2D and 3D Variants) Network Messages Client-Side Prediction Spawning Registering Prefabs During Runtime Mirror’s Order of Events Interest Management A Note About Hosts Creating Our First Multiplayer Game What If I Get Stuck? Chapter 5: The Memory of a Goldfish What Is Data Persistence, and Why Is It Important? Data Persistence Using Player Prefs Data Persistence for Large-Scale Multiplayer Games What Are Database Engines? Relational vs. Non-relational Databases Using DynamoDB Installing the AWS DotNet API Configuring AWS DotNet API Creating and Assigning a Developer User to IAM Configuring the Local Credentials File Connecting to the Database from Your Game Server Designing the Database Storing Information Retrieving Information LoadAsync QueryAsync ScanAsync Updating Information Serving Content to Your Players Some Closing Notes for AWS API Chapter 6: Scaling Up, A Lot Viral Game Studies How Among Us Became a Part of Us “Halo Meets Portal” Hosting Servers Shared/Virtual Hosting Dedicated Hosting/Bare-Metal So, What Is the Best Option for Hosting Then? Using Cloud Services to Host Your Game Servers AWS – Amazon Web Services On-Demand Spot Instances Savings Plans Dedicated Hosting Getting Started with EC2 Google Cloud Azure Unity Multiplay Stress Testing, Stress Clients, and Market Research Chapter 7: Insights from the Masters Michael “vis2k” W. – Mirror Networking Tell Me a Bit About Yourself and Where You Come From What Are Some of the Biggest Networking-Related Challenges That You and Your Team, or Clients, Have Faced While Shipping Multiplayer Games? How Did You Overcome These Challenges? What Would You Say Is Important? How Much Value Per Player in USD Is a Good Target? What Is Your Preferred Cloud Infrastructure Provider for Server Hosting? What Is the Most Crucial Piece of Advice You Could Give to Someone Learning Multiplayer Game Development? Do You Have Any Other Advice That You’d Like to Include for My Readers? Do You Want to Thank Anyone? Curt – Senior Solutions Architect Tell Me a Bit About Yourself and Where You Come From What Are Some of the Biggest Networking-Related Challenges That You and Your Team, or Clients, Have Faced While Shipping Multiplayer Games? How Did You Overcome These Challenges? What Would You Say Is Important? What Is More Important in Multiplayer-Level Design? Balance or Map Fun Factor? How Much Value Per Player in USD Is a Good Target? How Much Should You Be Spending on Cloud Infrastructure as a Percentage of Your Budget? What Is Your Preferred Cloud Infrastructure Provider for Databases? What Is Your Preferred Cloud Infrastructure Provider for Server Hosting? What Is the Most Crucial Piece of Advice You Could Give to Someone Learning Multiplayer Game Development? Chapter 8: Challenge What You Know Beginner Challenges – Core Multiplayer Functionality Challenge #1 – Multiplayer 2D Table Tennis Challenge #2 – Top-Down Shooter Prototype Intermediate Challenges – User Data Persistence Challenge #3 – Chat Room App with a User Message History Advanced Challenges – World Persistence Challenge #4 – Farming Mechanics with World Persistence Challenge #5 – Box-Hoarder Chapter 9: Where To Now? Conclusion A Special Thank You Index
دانلود کتاب Building Multiplayer Games in Unity : Using Mirror Networking