a multiplayer game of parenting and civilization building
You are not logged in.
Jason, please help me understand it. It doesn't make sense to me at the moment.
I was doing some testing on a local server and I noticed that the temperature only updates when you click. I had build a 3x3 wooden floor and I noticed that it helps keep you warm. I was building the wall on one side, fully clothed in fur, and I noticed my temperature getting dangerously high. So then I tried some experiments.
Standing outside in full fur clothing, your temp is just short of ideal. When I click once to walk onto a wooden floor board, it goes up to just above the ideal. If I stand still indefinitely, it remains unchanged. If I click to walk to another tile, it jumps up markedly. Then click to walk back and another jump. Walking back and forth between two tiles a couple of times and your temperature hits max. The same thing happens if you stay still and picks something up and put it down several times. Each click results in a jump in temperature.
Walk outside and it goes down, but only after a couple of clicks. So then I stood on the grass on one side of the floor, and clicked on the grass on the opposite side of the floor. I walked across the floor, to the grass and ended with the temperature at just above ideal.
I don't really understand why it works this way. Would it not make more sense to recalculate the temperature periodically? Is it a performance thing?
Getting to understand this mechanic in this current state does explain why I died so suddenly in a game recently where I was inexplicably dropping hunger points rapidly and then I starved to death halfway to the carrot farm. I had been standing fully clothed next to a fire, and picking up babies. So, each click I got hotter. Then when I started running to the farm, I left the fire but because I only clicked once (and held it down) my temperature stayed at max, and I starved.
Is this mechanic going to change? Or do I just need help understanding why it is the way it is?
Offline
I agree this is weird. I had a bit of a test of this and if you run off from a fire and don't release the mouse you never get cold even when starkers. It's kind of exploitable.
Offline
It sounds like whatever event loop is tracking mouse action, blocks updates to temperature. I don't think it's a performance thing, just how event listeners often work. Mouse actions need to be tracked quickly, particularly for movement. Fixing this would likely result in movement becoming jittery, as it drops out of the event loop repeatedly to update other things. Just a guess though... haven't examined the code.
Offline
So I had a chat with Jason on the discord serve about this and he agrees it's not quite right. It's not a bug, but the design needs rethinking.
I don't think there is any other way around it other than timed updates. Problem there is that it puts more demand on the server. I think if the server updates each player's temperature based on the tile they're on, every x milliseconds where x is the amount of time it takes to walk one tile. I think it's about half a second to walk a tile. So 60 temperature calculations every half second. Maybe each player could have a slight offset so they're not all at once.
Offline
Well, the overheating is coming, I think, from the fact that the thermal model has per-player memory. So I think your "temperature grid" is already warm, and then you take another step on the floor, and it starts from that warm point to recompute.
I'll have a look and see if it makes more sense to recompute from scratch every time.... I did like that the warmth of a fire "stays with you for a while" when you walk away. Maybe the center cell should have memory only...
The thermal model is a bit weird. It's a cellular model of sources, sinks, and insulation around you. That model is run for a bunch of steps, letting heat spread, to determine your current "heat map." The temp at the middle of that map is your temp.
The "hold down the mouse" thing is a different issue, having to do with WHEN the server updates your temp and tells you about it (only when it sends you a player update, which only happens when your move is done).
Offline