Game Backend Development: With Microsoft Azure and PlayFab
- Length: 404 pages
- Edition: 1
- Language: English
- Publisher: Apress
- Publication Date: 2023-01-08
- ISBN-10: 1484289110
- ISBN-13: 9781484289112
- Sales Rank: #0 (See Top 100 Books)
Up your game developer skills by learning game backend development with Microsoft Azure and PlayFab.
Robust backend infrastructure support is essential for all modern games. Implementing game backend features became easier with the emergence of GBaaS (Game Backend-as-a-Service) providers and the advance of the cloud. Multiplayer gaming, leaderboards, game analytics, and virtual economies are all backed by cloud services.
As a game developer, understanding core game backend features and implementation techniques is an important addition to your game developer skill set. Understanding game backend development will not only give you a competitive advantage, it will also eventually allow you to create better games.
This book will help you get started. It teaches all the core concepts, using downloadable source code, so that you can experiment right away following a learning-by-doing approach.
After reading this book, you will have a solid grasp of key game backend services and know how to implement them.
What You Will Learn
- Understand core concepts around game backend development
- Use the PlayFab API to implement backend features
- Build game backend infrastructure using Microsoft Azure cloud (architecture and implementation)
- Contrast the traditional Azure cloud- and PlayFab (GBaaS)-based implementations of game backend capabilities
- Reuse source code to enable backend capability in your own games
- Discover different ways for authenticating players
- Implement a multiplayer game in Unity with the help of mirror networking
- Create a matchmaker to bring together players for an online game session
- Establish leaderboards to reinforce player competition
- Build a virtual economy and monetize your game
- Set up game analytics and gain insight into players’ behavior
- Let players communicate with each other by taking advantage of cognitive services
- Learn how to implement server-side custom game backend logic
Who This Book Is For
Game developers who may be skilled in game development, but who possess little to no skills in GBaaS and cloud computing. This book is also for professionals working in the cloud solutions space who want to learn about the specific challenges of the gaming domain.
Table of Contents About the Author About the Technical Reviewer Introduction Chapter 1: Getting Started Game Frontend and Backend Game Frontend Game Backend Cloud Computing Game Backend-as-a-Service (GBaaS) Choosing GBaaS vs. a Cloud Setting Up the Development Tools Unity Editor Visual Studio Code Terraforming Your Infrastructure Creating a Single Player Game First Steps to Building Your Game Control and Animation of the Character Creating a Menu for Your Game Creating a Local Multiplayer Game What Is a Local Multiplayer Game? Getting Started with Mirror Networking The Core Components: NetworkManager and NetworkIdentity Synchronize Moving and Animation Network Manager Heads-up Display Setting Up Unity for Multiplayer Games Starting Your First Multiplayer Game Controlling Only Your Character Getting Started with PlayFab Import PlayFab SDK in Unity Configure PlayFab in Unity Signing Up for Azure Creating Your First Online Multiplayer Server Building Your Infrastructure Creating the Game Server Instance Testing and Next Steps Summary Review Questions Chapter 2: Player Authentication Authentication Levels PlayFab Login with CustomID Implementing the Control Panel Testing and Verification Login with Username and Password Azure Authentication Flow Creating the Backend Building Your Infrastructure Configure Azure AD B2C Configure Google API Add Google IDP to Azure AD B2C Configure User Flow Test the Backend Developing the Client Create a Client Secret in Azure Get Authorization and Token Endpoints Configure Redirect URI Install NuGet for Unity Implement the Authorization Request Implement the Token Request Extract the DisplayName Testing If All This Works Summary Review Questions Chapter 3: Dedicated Game Servers Server Hosting Alternatives PlayFab Configuring PlayFab Configuring Unity Implementing the Server Shutting Down the Server Building the Server Testing Your Server Thundernetes Creating a Build in PlayFab Troubleshooting Problems Creating the Client in Unity Extending the ControlPanel Testing Azure The Problems Kubernetes and Agones Building Agones Three Steps to Build the Infrastructure Provisioning Azure Resources Create a Resource Group Build Azure Kubernetes Service Verifying the Cluster Add a Network Security Rule Build Azure Container Registry Accessing ACR from AKS Install Agones Using Helm Creating and Deploying the Server Implementing the Server Create Your Game Server Image Push the Image to ACR Agones Configuration Create a Fleet Fleet Autoscaler Game Server Allocation Extending the Control Panel Summary Review Questions Chapter 4: Matchmaking Bringing Players Together PlayFab Configuring PlayFab Matchmaking Process Developing the Client Extending the Control Panel Testing Azure Building Blocks Requirements Azure Solution Overview Building Your Infrastructure Function App Azure Database for PostgreSQL Configure Your Infrastructure Developing Matchmaking Logic Your First Azure Function Connecting to the Database Writing into the Database Deleting Tickets Finding a Match Getting a Ready Server Getting Your Server Address Deallocating Servers Developing a REST Client in Unity Extending the Control Panel Publishing Matchmaker Functions to Azure Publishing Azure Functions Deploying Azure API Management Testing Clients with API Management Putting It All Together Integrate Matchmaking with Game Servers Integrate Matchmaking with Authentication Creating Shared Resources Summary Review Questions Chapter 5: Leaderboards Components PlayFab Prerequisites Configure PlayFab Implement the Client Create a Fancy Leaderboard Updating the Leaderboard Getting the Leaderboard Extending the Control Panel Azure Prerequisites Initialize Terraform with New Resources Leaderboard Azure Functions Creating a Leaderboard API Configure and Extend the Database Implement Azure Functions Publishing Azure Functions Implement the Client in Unity Extending the Control Panel Summary Review Questions Chapter 6: Economy Components PlayFab Economy GUI Catalog and Items Virtual Currency Player Inventory Purchasing an Item Bundles, Containers, Drop Tables, Stores In-App Purchasing Azure Building the Economy Backend Creating the Economy Functions Publishing the Functions to Azure Implement Economy API Developing the Client Getting Items Getting the Player’s Inventory Purchasing Items Buying from the Store Economy GUI Summary Review Questions Chapter 7: Game Analytics Building Blocks PlayFab Automatic Events Creating Custom Events Analyzing the Events Azure Azure Solution Overview Build Your Own Game Analytics Backend Configure API Management Azure Blob Storage Event Hubs Implement Azure Function Testing Your Backend Sending Events from the Clients Getting Insights Into Your Data Summary Review Questions Chapter 8: Party, Chat, AI Introduction PlayFab Enable PlayFab Party Create a Simple Chat UI Creating a New Chatroom Joining a Chatroom Sending Messages Translate Messages Azure Building Your Chat Infrastructure Handle Messages with Azure Function App Creating Azure Web PubSub Service Testing the Core Infrastructure API Management Service Implementing the Unity Chat Client Getting the Connection URL Connecting to the WebSocket Sending Chat Messages Testing the Chat Client Azure Translator Building the Cognitive Backend Implementing the Client Summary Review Questions Chapter 9: CloudScript and Azure Functions Serverless Computing PlayFab Implementing CloudScript Implementing the Client Azure Building Infrastructure for Serverless Developing Azure Function PlayFab Integration The Core Function Publish the Code Configure PlayFab to Integrate with Azure Functions Implement the Client Summary Review Questions Index
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/Apress
2. In the Find a repository… box, search the book title: Game Backend Development: With Microsoft Azure and PlayFab
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.