This episode explores the challenges of adding multiplayer to the single-player game Domekeeper, developed with the Godot engine. Experts Chris Ridenor and Renee Haberman discuss technical hurdles like state synchronization, bandwidth optimization, and the shift to a peer-to-peer architecture, emphasizing that retrofitting multiplayer is significantly harder than designing for it from the start.
Summarized by Podsumo
Adding multiplayer to Domekeeper after its initial release required extensive refactoring of data structures and systems that were built for single-player, leading to a 60,000+ line GDscript codebase.
The team chose a peer-to-peer networking approach over dedicated servers to avoid high server costs, trusting clients for most actions to keep the game accessible and budget-friendly.
Bandwidth optimization was critical; resources (physics objects) required packing data down to individual bits (e.g., two 64-bit integers per resource) to handle up to 8 players and dozens of carried items.
Monster behavior is made deterministic using seeded random number generators, reducing the need for constant position updates and relying on event-based synchronization.
The addition of multiplayer introduced complex game design challenges, such as balancing difficulty for varying numbers of players and handling simultaneous upgrade menus without pausing the game.
"We kind of have to like break the system, break the data structures down and then rebuild the same features... build the same features back on top of these new data structures that we can have multiple keepers."
"If we do it basically immediately after release and we are thin on content, it's not super interesting as a mode. You can maybe get five hours out of this and then multiplayer is sort of starting to be slower."