Valheim

GasBandit

Staff member
Ok, so last night Emrys and I still experienced the lag phenomenon. So since nobody else was on the server, I shut it down and bumped its upload limit up to 1 MB/s (that's eight megabit, should be more than any game ever needs).

Still had the problem.

So as an experiment, Emrys hosted a game herself and I joined it.

At first it was fine... but we barely got our first hut built before she started experiencing the problem again, shortly followed by me.

Something's just up with this game.
 
We sailed in to the Mistlands today while looking around. Snuffles immediately panicked and made me turn around.
 
So, what are the building mechanics like in Valheim? Like, can I build ridiculous things à la Minecraft or is it more structured?
 
Ok, so last night Emrys and I still experienced the lag phenomenon. So since nobody else was on the server, I shut it down and bumped its upload limit up to 1 MB/s (that's eight megabit, should be more than any game ever needs).

Still had the problem.

So as an experiment, Emrys hosted a game herself and I joined it.

At first it was fine... but we barely got our first hut built before she started experiencing the problem again, shortly followed by me.

Something's just up with this game.
Sounds like a memory leak to me. But that is pure, unbridled speculation.
 

GasBandit

Staff member
So, what are the building mechanics like in Valheim? Like, can I build ridiculous things à la Minecraft or is it more structured?
It uses the same "structural integrity" mechanic as Empyrion - that is, the more "blocks" away from touching ground a building block is, the lower its "integrity." Eventually, if you don't find a way to anchor to the ground (or find a way to use longer supports, which require higher level materials to make), blocks you place will just break off after a couple seconds.
 

GasBandit

Staff member
Sounds like a memory leak to me. But that is pure, unbridled speculation.
To me, it feels like there's some kind of TCP-esque (as opposed to UDP, which these games usually use) validation checking going on between all the clients and the server. The server gets info from a client, sends it to all the other clients, then waits for verification from all the other clients before it agrees that "something has happened" and then sends updates to all the clients to that effect.

This becomes a problem when one of those clients is on low bandwidth, high latency, wireless Canadian internet.

Also just unbridled speculation on my part, but it's all I can think of that fits.
 
I will say that MalwareBytes has given me trojan warnings on two seperate occasions when connecting to your server and blocked something that I didn't unblock. I assume it's giving me the IP to your server when it does that, but I don't need to allow it to connect to your server.

I have also never had a lag problem.
 
It uses the same "structural integrity" mechanic as Empyrion - that is, the more "blocks" away from touching ground a building block is, the lower its "integrity." Eventually, if you don't find a way to anchor to the ground (or find a way to use longer supports, which require higher level materials to make), blocks you place will just break off after a couple seconds.
Hmm, think it'd be doable to build the Bathhouse from Spirited Away?
 

GasBandit

Staff member
If this was indeed the cause, the local connection would've been flawless.

--Patrick
Not if her game was waiting for my game to parse, verify, and return the data before it allowed the game to continue. Kind of like a CRC of all parties involved before it allows time to progress to maintain game sync.

I will say that, no matter how bad the lag gets, there's almost never any rubberbanding. So it's refusing to "skip" data to do positional updates and that sort of thing.
 

GasBandit

Staff member
Mods are now a thing for valheim, most of them client side.

Here's what I'm trying first - a mod for a first person view mode.



 

GasBandit

Staff member
Did a little more testing. The structure of this game's network chatter is definitely closer to peer-to-peer instead of server/client. And it's definitely waiting for verification from other clients within a certain radius.

Which means, if ONE person within a given radius is lagging... EVERYBODY in that given radius lags. Even if your ping to the server is single digit milliseconds.
 

GasBandit

Staff member
The Valheim mods I recommend -

Quick stack: push one button, and stuff in your inventory gets put into nearby chests that already have that in it. Makes unloading after a day of hunting/gathering much nicer


Craft and build from containers: just what it says in the tin. Do you have a chest full of tin, copper, bronze, etc next to your forge? Now you don't need to fish out the materials to do your crafting. Plus, if you are doing a lot of building, just load up a chest with wood, and whenever you're near that chest, you'll use the wood from the chest.


First Person View: Lets you zoom all the way into your head, and play in first person view. Surprisingly not jank, I'm very happy with it. I do still recommend mining and farming in third person, and fortunately switching between the modes is easy and seamless. Also, for some reason, comes with the FOV set to 85, but after the first time running it, there will be a config file you can use to tone that down to a less fisheye-like setting, like 70.


Remember IP Dammit: Makes your game remember the last IP you typed in to connect to, so that you don't have to jump through stupid hoops to reconnect to your favorite server every time.


Show My Position By Default: Makes it so that "show my position on map to other players" is on by default instead of off, so that you don't have to remember to turn it on every time you play.



All of these mods require the plugin injector Bepinex for Valheim:


It's easy to install, though. You just go into the zip, and install the contents of the "BepInExPack_Valheim" folder into the root folder of your Valheim install. Then go into the bepinex folder, then the plugins folder, and that's where you drop the DLLs for the other mods. Everything then happens automatically the next time you start Valheim. Any mods with configuration files will create those files the first time you run after installing them, so you'll then have to exit out, edit the config files (they live in bepinex/config), and then start the game again.
 

Dave

Staff member
I would be averse to using Valheim mods. The game updates so often that the mods are going to break constantly.
 

GasBandit

Staff member
I would be averse to using Valheim mods. The game updates so often that the mods are going to break constantly.
The method of injection for these mods is different from how, say, minecraft did. It's closer to how Stardew Valley handles mod injection.

Minecraft method: direct memory address injection due to obfuscated code in bespoke engine
Valheim/Stardew method: engine function call injection due to unobfuscated/industry standard engine (Unity)

So, unlike Minecraft, which meant that every single update literally broke every single mod, mods in Valheim and Stardew Valley only break if the engine changes, or something REALLY fundamentally changes about the game.

I've run outdated mods on Stardew Valley for several, several, SEVERAL version updates of Stardew, and while it complains, it is a lot more fault tolerant.
 

GasBandit

Staff member
However, I WILL tell you the down side of Valheim mods -

Client side mods affect the server.

That means cheat mods can't be stopped. So public Valheim servers will never be viable, because there's no way to stop/catch cheaters/griefers other than banning them by name, one by one.
 

GasBandit

Staff member
I feel attacked.
You think you feel attacked now, just wait til you learn that terraforming/flattening terrain is the number one cause of degraded game performance (low fps)

~TLDR

Until they change the way the game is being saved, I suggest that you guys don't terraform the terrain unless absolutely necessary. Do not build large trenches around your base and do not flatten the mountains like I did. Luckily I keep saving up to 20 latest backups with a simple PowerShell script, and I'm able to rollback to a state where I didn't create additional 10,000 instances.
 
Top