One Hour One Life Forums

a multiplayer game of parenting and civilization building

You are not logged in.

#1 2018-03-06 07:28:06

Uncle Gus
Moderator
Registered: 2018-02-28
Posts: 567

The player temperature mechanic is a bit weird

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

#2 2018-03-06 12:59:39

Norgg
Member
Registered: 2018-03-02
Posts: 67

Re: The player temperature mechanic is a bit weird

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

#3 2018-03-06 17:41:29

xoomorg
Member
Registered: 2018-03-06
Posts: 73

Re: The player temperature mechanic is a bit weird

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

#4 2018-03-07 19:39:24

Uncle Gus
Moderator
Registered: 2018-02-28
Posts: 567

Re: The player temperature mechanic is a bit weird

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

#5 2018-03-07 23:55:15

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,801

Re: The player temperature mechanic is a bit weird

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

Board footer

Powered by FluxBB