35,99 €
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.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Veröffentlichungsjahr: 2023
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
Henrique Campos
BIRMINGHAM—MUMBAI
Copyright © 2023 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Group Product Manager: Rohit Rajkumar
Publishing Product Manager: Vaideeshwari Muralikrishnan
Book Project Manager: Sonam Pandey
Content Development Editor: Debolina Acharyya
Technical Editor: Reenish Kulshrestha
Copy Editor: Safis Editing
Proofreader: Safis Editing
Indexer: Tejal Daruwale Soni
Production Designer: Prashant Ghare and Jyoti Kadam
DevRel Marketing Coordinators: Nivedita Pandey, Namita Velgekar, and Anamika Singh
First published: December 2023
Production reference: 2201223
Published by Packt Publishing Ltd.
Grosvenor House
11 St Paul’s Square
Birmingham
B3 1RB, UK
ISBN 978-1-80323-261-4
www.packtpub.com
To God, who has always been me with me, blessing me with strength, faith, and determination to take faithful steps throughout this journey. Let this book be a blessing that will allow people to make amazing creative endeavors.
– Henrique Campos
Henrique, better known as Pigdev in the Godot sphere, was one of the first content creators covering the engine back in the day. He’s always been dedicated to open source software.
We worked together for a couple of years, and I’m glad to see how Henrique has grown into one of the few old-timers who are still constantly learning and sharing with the community.
Most resources for Godot focus on helping newcomers learn the basics. With this essential guide to creating multiplayer games with Godot, we finally have a learning resource dedicated to online multiplayers. At the time of release, it is one of the areas of Godot that lacks learning resources the most.
I especially appreciated the last three chapters, as they dive into essential techniques such as lag compensation and optimizing network requests. Serious real-time multiplayer games absolutely need them, yet information on these topics can be especially hard to find.
I hope you’ll have a great time with this essential guide to multiplayer in Godot, and I can’t wait to see more multiplayer Godot games thanks to it.
Nathan Lovato
GDQuest founder
Henrique Camposis an indie game developer and game designer working in the industry since 2015. Starting as a university teacher in the Computer Graphics and Artificial Intelligence chairs and working for the GDQuest team from 2018 to 2022, he also provides consultancy for solo developers, studios, and schools.
Under the alias of Pigdev, Henrique has been creating game development content on his YouTube channel since 2016. Among his projects, he wrote the Top 7 Godot Engine Recipes and Platformer Essential Recipes e-books, where he presents design patterns that people can use to make games with the Godot Engine.
A passionate open source enthusiast, Henrique has been working and contributing to the Godot Engine project since 2016.
I want to thank God, my friends, and my family, especially my sister, Ráisa, my mother, Sheila, and my father, Claudio, for always being by my side and supporting me throughout my journey of empowering indie game developers.
I also want to thank the whole Godot Engine community for building and supporting such an amazing tool.
Yogendra Manawat is an indie maker and computer science student. While he is primarily focused on development skills, he’s also experienced in programming languages including C++, Python, C#, TypeScript, and GDScript.
His passion for games and movies led him to explore 3D animation with Blender. Yogendra has over three years of game development experience, having created several small games. Currently, he’s focused on his original story-based game, Bleak, built using the Godot Engine.
Yogendra loves learning new technologies and experimenting with development techniques to create unique games and useful software. He’s an active contributor to the Godot Engine community and has developed tools, including Coursefy and Vortexorama, using Godot. Yogendra actively engages in game development forums, collaborating and exchanging ideas with fellow developers.
Throughout this part of the book, we take our first steps into the realm of networking. We start by making a handshake using Godot Engine’s high-level EnetMultiplayerPeer class. We also learn how to use the UDP protocol to exchange data and end up by learning how to use Remote Procedure Call (RPC).
This part contains the following chapters:
Chapter 1, Setting up a ServerChapter 2, Sending and Receiving Datachapter 3,Making a Lobby to Gather Players TogetherChapter 4,Creating an Online Chat