1 option
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 ; foreword by Nathan Lovato.
- Format:
- Book
- Author/Creator:
- Campos, Henrique, author.
- Language:
- English
- Subjects (All):
- Video games--Programming.
- Video games.
- Video games--Design.
- Open source software.
- Physical Description:
- 1 online resource
- Edition:
- 1st edition.
- Place of Publication:
- Birmingham, UK : Packt Publishing Ltd., 2023.
- Summary:
- Level up your Godot 4 networking skills with this comprehensive guide featuring dedicated servers and persistent worlds, illustrated with key images in color Key Features 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 Book 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. 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 Who this book is 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.
- Contents:
- Cover
- Title Page
- Copyright and Credits
- Dedications
- Foreword
- Contributors
- Table of Contents
- Preface
- Part 1: Handshaking and Networking
- Chapter 1: Setting up a Server
- Technical requirements
- Introduction to a network
- Understanding the ENetMultiplayerPeer class
- What is the ENet library?
- What is the UDP protocol?
- How does this connection happen?
- Creating the server
- Creating the client
- Testing our handshake
- Summary
- Chapter 2: Sending and Receiving Data
- Understanding packets
- Introduction to the JSON format
- Serialization
- Sending packets with PacketPeerUDP
- Creating an AuthenticationCredentials Autoload
- Sending players' credentials
- Listening to packets with UDPServer
- Authenticating the player
- Loading a fake database
- Replying to the authentication request
- Maintaining the player's session
- Loading the player's avatar
- Chapter 3: Making a Lobby to Gather Players Together
- Calling functions remotely with RPCs
- Introducing the @rpc annotation
- What's necessary for an RPC?
- Understanding the multiplayer authority
- Comparing UDP and ENet approaches
- Remaking the login screen with RPCs
- Establishing an ENetMultiplayerPeer connection
- Creating the RPC functions template
- Adding the player's avatar
- Cleaning AvatarCards
- Retrieving players' avatars
- Testing the lobby
- Chapter 4: Creating an Online Chat
- Understanding data exchange and channels
- Reliable and unreliable packets
- Understanding channels
- Sending chat messages
- Updating peer's data remotely
- Part 2: Creating Online Multiplayer Mechanics
- Chapter 5: Making an Online Quiz Game
- Introducing the online quiz game.
- Setting up a lobby for the quiz game
- Displaying new players
- Starting the match
- Implementing online turns
- Updating players about the round
- Turning local mechanics into remote gameplay
- Understanding the questions database
- Loading and updating questions
- Sending players' answers to the server
- Chapter 6: Building an Online Checkers Game
- Introducing the Checkers project
- Understanding the Checkers Piece scene
- Comprehending the FreeCell scene
- Introducing the CheckerBoard scene
- Serializing players' turns
- Working with MultiplayerSynchronizer
- Updating and syncing the CheckerBoard
- Handling remote turn shifts
- Setting up players' teams
- Enabling and disabling team pieces
- Managing win and lose conditions
- Chapter 7: Developing an Online Pong Game
- Introducing the Pong project
- How the player paddles work
- Understanding the Ball scene
- Managing players' scores
- Tying everything together
- Setting up online multiplayer paddles
- Changing the paddle's owner
- Assigning the players' paddles
- Syncing remote objects
- Updating the ball's position
- Coordinating the paddle's position
- Chapter 8: Creating an Online Co-op Platformer Prototype
- Introducing the platformer project
- Understanding the Player class
- Unveiling the Crate class
- How the InteractiveArea2D class works
- Understanding the PlayerSpawner class
- Spawning players in the match
- Giving players control in PlayerSpawner
- Setting up the Player multiplayer controls
- Syncing physical objects
- Synchronizing the player's position and animations
- Updating the crate's position remotely
- Chapter 9: Creating an Online Adventure Prototype
- Introducing the prototype.
- Understanding the Player scene
- Gauging the Asteroid scene
- Unraveling the quest system
- Breaking down the World scene
- Logging the player in to the server
- Authenticating players
- Syncing the World scenes
- Separating server and client responsibilities
- Shooting bullets on all instances
- Calculating an asteroid's damage
- Storing and retrieving data on the server
- Implementing the quest system's client side
- Implementing the quest system's server side
- Part 3: Optimizing the Online Experience
- Chapter 10: Debugging and Profiling the Network
- Introducing Godot's Debugger
- Mastering the Stack Trace tab
- Debugging with the Errors tab
- Exploring the Profiler tab
- Exploring the Visual Profiler tab
- Exploring the Monitors tab
- Getting to know the Video RAM tab
- Grasping the Misc tab
- Understanding the Network Profiler
- Identifying the project's bottlenecks
- Using the Network Profiler
- Using the Monitors tab
- Chapter 11: Optimizing Data Requests
- Understanding network resources
- Decreasing the requests count
- Reducing the weapon fire count
- Decreasing Asteroid's syncing count
- Compressing data with the ENetConnection class
- Chapter 12: Implementing Lag Compensation
- Introducing lag issues
- Dealing with unreliable packets
- Common compensation techniques
- Implementing server-side motion
- Bridging the gaps with interpolation
- Playing ahead with prediction
- Gazing into the future with extrapolation
- Chapter 13: Caching Data to Decrease Bandwidth
- Understanding caching
- Setting up the HTTPRequest node
- Understanding the HTTP protocol
- Setting up the scenes and database
- Implementing texture caching.
- Implementing database caching
- Going further with caching
- Index
- Other Books You May Enjoy.
- Notes:
- OCLC-licensed vendor bibliographic record.
- ISBN:
- 9781803238364
- 1803238364
- OCLC:
- 1411278058
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.