Unity networking fundamentals : creating multiplayer games with Unity / Sloan Kelly, Khagendra Kumar
- Author:
- Kelly, Sloan
- Published:
- Berkeley, CA : Apress L. P., 2021.
- Physical Description:
- 1 online resource (276 pages)
- Additional Creators:
- Kumar, Khagendra
Access Online
- Contents:
- Intro -- 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, and 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
- Summary:
- 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.
- Subject(s):
- ISBN:
- 9781484273586 (electronic bk.)
1484273583 (electronic bk.)
1484273575
9781484273579 - Note:
- Synchronous or Asynchronous.
Includes index.
View MARC record | catkey: 37459931