Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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
$27.98 $39.99
Paperback
$49.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Colour book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

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 : 9781803232614
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Colour book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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
$279.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 $ 139.97
Godot 4 Game Development Projects
$44.99
The Essential Guide to Creating Multiplayer Games with Godot 4.0
$49.99
Godot 4 Game Development Cookbook
$44.99
Total $ 139.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

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela