وبلاگ بلیان

Unity Networking Fundamentals : Creating Multiplayer Games with Unity

جلد کتاب Unity Networking Fundamentals : Creating Multiplayer Games with Unity

معرفی کتاب «Unity Networking Fundamentals : Creating Multiplayer Games with Unity» نوشتهٔ Randall Munroe و Sloan Kelly, Khagendra Kumar، منتشرشده توسط نشر Apress : Imprint: Apress در سال 2022. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

Learn the fundamentals of networking with Unity and C#. This book covers a variety of topics, including accessing data using RESTful APIs, local networked games, and creating multiplayer online games using client-server architecture. The book provides the basics of networking, sockets, TCP vs. UDP, client-server architecture, serialization, RESTful APIs, network latency, and client-side prediction. Projects are presented to illustrate the concepts, including a chat client/server overlay for your game, and a 3D maze game that allows up to four players to connect over the network. By the end of the book, you will be familiar with low-level networking concepts such as protocols and architecture as well as high-level knowledge on how to create applications that use a client/server architecture for multiplayer games. What You Will Learn Know the difference between TCP and UDP, and the pros and cons of these protocols Create client-server multiplayer games in Unity using C# Receive and process data from a remote server using RESTful APIs Understand latency and how to mitigate its impact Who This Book Is For Readers familiar with Unity and C# development who want to create multiplayer games Table of Contents About the Authors About the Technical Reviewer Introduction Chapter 1: Networking Concepts Client-Server Model Connected vs. Connectionless Services Packets Connection-Oriented Service Connectionless-Oriented Service Physical Network Devices Network Addressing Media Access Control (MAC) Address IP Address Static IP Addresses Dynamic IP Addresses IP Address Format Address Classification Domain Name System Sockets and Ports What Is a Port Number? What Is a Socket? Open Systems Interconnection (OSI) Model Command-Line Tools Opening a Command Prompt Hostname Ping IP Configuration Address Resolution Protocol Cache Network Status Tracing the Route to the Server Summary Chapter 2: Serialization Serialization Basics JSON Simple JSON Serialization/Deserialization Binary Representation of a String Binary Simple Binary Serialization/Deserialization Creating a Byte Array from a Struct Re-Create an Object from a Byte Array The Network Library NetLib Summary Chapter 3: RESTful APIs What Is a RESTful API? RESTful Requests The Endpoint A Method The Headers The Data RESTful Responses Authentication and Restrictions The UnityWebRequest Class Fetching Text Fetching Images Creating the Project Fetching the Image Fetching Other Types The Weather Application Registering and Getting an API Key The User Interface Creating the Project Importing the weather-application.unitypackage The OpenWeather Daily Forecast Endpoint Fetching the Data Serialization Classes Calling the API The Controller: Final Wiring Running the Weather Application Generic RESTful API Client Summary Chapter 4: TCP Connections The TCP Three-Way Handshake TCP Client-Server Connections Socket Connections Establishing a Socket Connection Accepting a Socket Connection Sending Data Synchronous Send Asynchronous Send Receiving Data Synchronous Receive Asynchronous Receive Hello World Using TCP Sockets Simple Network Copier TcpClient Connections Sockets vs. TcpClient and TcpListener Connecting to a Server Using TcpClient Sending Data Using TcpClient Reading Data Using a TcpClient TcpListener: Accepting a TcpClient Connection Hello World Example Using TcpClient and TcpListener Tic-Tac-Toe Starter Files Getting Started The Game Architecture The Client The Client Events The TicTacToeClient NetworkClient The Message Queue The Server Serialization NetLib Classes MessageBuffer Class NetworkClient Class NetworkServer Client and Server Classes Messages Client Classes Server Classes AppController Running the Game Summary Chapter 5: Networking Issues Authoritative Servers Synchronous or Asynchronous Planning Multiplayer Games Game Lag Bandwidth How Bandwidth Works Bandwidth vs. Speed Why Bandwidth Is Important How to Measure Bandwidth Performance Factors Demand on Demand Latency What Causes Network Latency? Distribution Delay Delivery Delay Processing Delay Line Delay Speed of Light and Latency Last Mile Latency Client-Side Prediction and Server Reconciliation Client-Side Predictions Synchronization Issues Server Reconciliation Further Steps Getting Ping from Unity Summary Chapter 6: Develop a Maze Shooter Lobby Matchmaking Spawn/Respawn Spawn Point Introducing the RPG Game The Game’s Story Game Prerequisites Section 1: Creating the Project and Setting Up Unity Section 2: Downloading and Installing MLAPI Section 3: Programming with MLAPI Section 3.1 Adding a Network Manager Section 3.2 Player Movement Section 3.3 Section 3.4 Joining the Game MLAPI Event Messaging Using Remote Procedural Calls (RPCs) Working with Bullets in Multiplayer Games Summary Chapter 7: LAN Networking How VPN Works What Is Hamachi? Using Hamachi LAN Party in Games Summary Chapter 8: Servers What Is a Server? Dedicated Servers Who Should Get a Dedicated Server? Dedicated Servers in Gaming Headless Server, AKA Listen Server Why a Headless Server? Headless Servers in Games Peer-to-Peer Networks Peer-to-Peer Networks in Games Benefits of a Peer-to-Peer Network Load Balancers Hardware-Based Load Balancers Software-Based Load Balancers Summary Index
دانلود کتاب Unity Networking Fundamentals : Creating Multiplayer Games with Unity