Viking survival game Valheim has been all the rage since it launched a month ago – it’s attracting massive numbers of players on Steam and sold millions of copies since launch. One persistent problem players have run into, however, is the lag in the co-op game’s multiplayer. The developers have said they’re working on the issue, but that one thing it isn’t caused by is a peer-to-peer system for multiplayer.
Some Valheim players have theorised that the lag they’ve experienced in Valheim co-op is caused by P2P networking for multiplayer, but developer Iron Gate AB says that’s not the case: all data transfers while playing multiplayer Valheim are between servers and clients, never client-to-client.
In a comment on the Steam forums for Valheim, developer ‘Richard’ explains that while servers keep track of where players are in the world, some of the immediate things you’ll see around you as you play are being handled by your client – this has to be the case, since Valheim’s worlds are procedurally generated. If you’ve hosted a game, your PC will handle game logic for things like animals or falling trees or world generation. That gets complicated when you’re joined by another player who walks into your area.
When that happens, your PC will still be handling the game logic. “This system allows us to do a lot of heavy physics on the client side and without overloading the servers”, Richard explains. The problem is that the system is “pretty sensitive to one player having a bad connection.” In the example above, if you’re controlling the instance of Valheim in your co-op session and have a high ping to the server, your co-op partner will definitely experience the lag too – no matter how fast their connection to the server is.
“I have some ideas of how to improve the system, but it’s pretty complicated and not something that can be fixed easily”, Richard writes.
While Iron Gate puzzles this out, we’ll be content to keep homesteading, Viking style. Pick up some new techniques with our Valheim building guide, which will give you everything you need to know to start putting together the perfect Norse fortress.