Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
The Essential Guide to Creating Multiplayer Games with Godot 4.0
The Essential Guide to Creating Multiplayer Games with Godot 4.0

The Essential Guide to Creating Multiplayer Games with Godot 4.0: Harness the power of Godot Engine's GDScript network API to connect players in multiplayer games

eBook
€20.98 €29.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

The Essential Guide to Creating Multiplayer Games with Godot 4.0

Setting up a Server

Welcome to The Essential Guide to Creating Multiplayer Games with Godot 4.0. In this hands-on book, you are going to learn the core concepts used to create online multiplayer games using the Godot Engine 4.0 Network API.

Firstly, we are going to understand some fundamental aspects of how computers communicate through a network and the main protocols, including which ones are more relevant for making online multiplayer games.

After that, we will understand how Godot Engine 4.0 uses and provides both low- and high-level implementations for networking using its network API. We’ll understand some core classes that we can use to pass data around to multiple computers on the same network. And then we’ll focus on the high-level API known as ENetMultiplayerPeer.

With the fundamentals in place, we’ll use the knowledge we just learned to turn local gameplay features into online gameplay features. To do that, we will develop five game projects:

  • An online quiz game
  • Checkers
  • Pong
  • A co-op platformer
  • A top-down adventure

Then, we’ll learn some techniques we can use to improve our players’ experience by optimizing how their game sends, receives, and processes network data. We’ll understand that we don’t need constant updates and that we can do most of the gameplay with small bits of data and let the clients’ computers fill the gaps on their own.

Throughout each chapter, you’re going to do a role play of a network engineer working for a fictional, independent game development studio. In each chapter, you will apply your recently learned knowledge to a fictional problem presented by your studio’s peers. You’ll focus on the network aspect of each project they present, so you don’t waste your precious time trying to understand unnecessary aspects.

In this chapter, you are going to learn the most important aspect of establishing a network of computers: to connect them all together. You’ll see how this process happens, the reason for doing this, what’s required to establish this connection, and how we can do that using the API that Godot Engine provides.

We will cover the following topics in this chapter:

  • Introduction to a network
  • Understanding the Godot Engine Network API
  • Setting up the client side
  • Setting up the server side
  • Making your first handshake

By the end of the chapter, you’ll have a client and server version of an application that establishes the connection of two or more computers. This is the very core of everything that we are going to see throughout the book, and with that knowledge, you’ll understand how you can start making computers communicate within a network, which is exactly what you need to do in online multiplayer games.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Ensure player synchronization and coexistence in a game world
  • Mitigate latency in your multiplayer games to design a seamless shared experience
  • Optimize and debug your games using profilers and monitors to visualize performance
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

The Essential Guide to Creating Multiplayer Games with Godot 4.0 guides you in exploring the built-in network API for online multiplayer games, offering practical knowledge through concrete use cases. Throughout the book, you'll assume the role of a network engineer in a fictional indie game studio, tackling real-world requests from your peers and gaining expertise in adding new network features to the studio's games. Following step-by-step instructions, you’ll go from making your first network handshake to optimizing online gameplay. You’ll learn how to sync players and pass data over the internet as you add online multiplayer features to a top-down shooter adventure game. This book puts you in a fictional game project team where you set up your first online server before advancing to creating an online chat system and transitioning local gameplay to go online. With a focus on implementing multiplayer features, you’ll create shared world adventures and learn optimization techniques to allow more players to join your virtual world. By the end of this book, you’ll have learned how to set up a client-server network, implement remote procedure calls (RPCs), sync node properties remotely, and optimize your games to create smooth online multiplayer experiences.

Who is this book for?

If you’re involved in game development with Godot and want to add multiplayer capabilities to enrich the shared gaming experience, then this book is for you. You’ll also find this book useful if you’re a network engineer looking to gain hands-on experience with practical projects. To get the most out of this book, a prior understanding of the Godot Engine design philosophy, the GDScript programming language, the SceneTree structure, and how nodes work is essential.

What you will learn

  • Understand the fundamentals of networking and remote data exchange between computers
  • Use the Godot game engine's built-in API to set up a network for players
  • Master remote procedure calls and learn how to make function calls on objects remotely
  • Enhance your GDScript proficiency to get the most out of this powerful language
  • Explore industry-standard solutions for common online multiplayer challenges
  • Improve your networking skills and discover how to turn single-player games into multiplayer experiences

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 22, 2023
Length: 326 pages
Edition : 1st
Language : English
ISBN-13 : 9781803238364
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Dec 22, 2023
Length: 326 pages
Edition : 1st
Language : English
ISBN-13 : 9781803238364
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 105.97
Godot 4 Game Development Projects
€33.99
The Essential Guide to Creating Multiplayer Games with Godot 4.0
€37.99
Godot 4 Game Development Cookbook
€33.99
Total 105.97 Stars icon

Table of Contents

18 Chapters
Part 1:Handshaking and Networking Chevron down icon Chevron up icon
Chapter 1: Setting up a Server Chevron down icon Chevron up icon
Chapter 2: Sending and Receiving Data Chevron down icon Chevron up icon
Chapter 3: Making a Lobby to Gather Players Together Chevron down icon Chevron up icon
Chapter 4: Creating an Online Chat Chevron down icon Chevron up icon
Part 2:Creating Online Multiplayer Mechanics Chevron down icon Chevron up icon
Chapter 5: Making an Online Quiz Game Chevron down icon Chevron up icon
Chapter 6: Building an Online Checkers Game Chevron down icon Chevron up icon
Chapter 7: Developing an Online Pong Game Chevron down icon Chevron up icon
Chapter 8: Creating an Online Co-Op Platformer Prototype Chevron down icon Chevron up icon
Chapter 9: Creating an Online Adventure Prototype Chevron down icon Chevron up icon
Part 3:Optimizing the Online Experience Chevron down icon Chevron up icon
Chapter 10: Debugging and Profiling the Network Chevron down icon Chevron up icon
Chapter 11: Optimizing Data Requests Chevron down icon Chevron up icon
Chapter 12: Implementing Lag Compensation Chevron down icon Chevron up icon
Chapter 13: Caching Data to Decrease Bandwidth Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4
(17 Ratings)
5 star 76.5%
4 star 5.9%
3 star 5.9%
2 star 5.9%
1 star 5.9%
Filter icon Filter
Top Reviews

Filter reviews by




Roman Perry Jan 03, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a very solid introduction to creating multiplayer games in Godot. It is great for devs who already have some experience with creating games and are curious about taking the first steps towards networked, multiplayer games. The five projects outlined within the book will give anyone a solid foundation for their own multiplayer games.I've been following the writer of the book, PigDev, for a very long time and he has always produced quality content. I'm excited to dive in and start these projects!
Amazon Verified review Amazon
G Money Dec 31, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a rare book that really manages to walk you through a progressive set of examples that will take you from building simple network topologies to more advanced ones while explaining the design decisions along the way. For people not familiar with the subject, I would encourage you to read the whole book and not just skip to what you might consider as the network architecture for your game, as also g the way the author will have explained many of the design concerns that led to that topology and your requirements may necessitate a different approach which the author tends to dive into. This book will serve as a strong reference for Godot4 multiplayer and I definitely recommend reading it if you are diving into multiplayer as opposed to just watching a few YouTube videos and trying to go it alone without understanding WHY things work the way they do.
Amazon Verified review Amazon
Jacob Feb 13, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As a hobbyist within the video game programming, it's sometimes a bit difficult finding good material to learn from, especially when it comes to advanced topics, such as Godot networking. However, I do think that this book stands out in the vast sea of knowledge as a primary example of how Godot networking should be taught.Right off the bat, the book does an excellent job at giving a very general understanding at basic networking concepts (client, server, packets, etc), all within a few pages. Whenever a new Godot networking concept is brought up, you receive a brief introduction to the concept before it's implemented into your project. It's great, and very efficient, to not be stuck talking about such basic concepts for too long. It allows us to focus on networking in Godot specifically, which I found very nice. Additionally, one thing this book has that you don't always find everywhere else is the discussion of certain advanced networking topics, such as network debugging within Godot or implementing lag compensation within a Godot project. These are very important topics to be learning about, especially if you want to get serious about Godot development, and you won't always find this information on other tutorials or books, which is why I find it fantastic that it's talked about with such detail in this book.Another thing I love about this book is how it introduces the example project code to you in smaller blocks, one at a time. In programming books, I often see an author drop massive amounts of code at a time, just to spend the next 10 paragraphs breaking down that code, which isn't inherently a bad thing, but in my opinion, it gets a bit hard to understand the logic and keep track of everything that's going on when a code block and the explanation are so large. In this book, it takes a slightly different approach. Instead, it will give you smaller blocks of code at a time, followed by a small paragraph explaining what is going on, which, in my opinion, is a bit more effective. It allows you to better process what the author is discussing, which helps you easily understand the bigger picture.In addition, this book does have a GitHub repository with all of the project files that you can pull onto your local computer to follow along with what's going on in the book, which is very nice. I would *highly* recommend using this, if possible, and following along with the book, as it helps you get a better insight as to what is going on. However, one thing I will mention is that there are some *very* small coding difference between what is the GitHub repository files and what is in the book examples. Do these differences actually matter? No, not at all. I only bring it up because it might confused some readers who are not as experienced with the Godot video game engine.Will this book turn you from a Godot networking beginner to a Godot networking master? No, but it's a fantastic place to start. Not only does the author make it easy to understand such important Godot networking concepts, but it also gives you the opportunity to experiment and learn just how powerful Godot networking can be, which can then be easily applied into your own projects. If you are already knowledgeable in Godot programming and need to take the first step into Godot networking, this book is the perfect place to start.
Amazon Verified review Amazon
Mason Storms Dec 28, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It's very in depth and answers all the important questions I had. I also appreciate how it is split into multiple sections for different project types and has a focus on optimization.
Amazon Verified review Amazon
ROBERTO HILSACA Jan 10, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I would recommend for new developers looking to expand their knowledge in setting up multiplayer connectivity but I would in fact also apply knowledge on how servers work and what configuration you need when handling outbound connections. Like mentioned before it sets a foundation for initial configuration and understand of cross communication using Godot.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.