Modding Discussion • Temperature system for a winter survival game.
Listen, I've never created a game before. I have very basic programming experience from ROBLOX and it's certainly not enough for what I want to achieve. I'll probably abandon this as soon as I get overwhelmed, but as for now I'm motivated. So here's the idea; I'd like to create a winter survival game where temperature is the core mechanic. I don't know how Luanti's API looks like yet, but I'm willing to learn it by trial and error. So, here's what I'd need:
Every step, nodes in the world exchange their temperatures with neighbors. Nodes with high thermal resistance gain/pass temperature to other nodes more slowly. If there's no heat source (by that I mean a node with a constant temperature), the temperature should eventually equalize with the atmospheric temperature (based on attitude; the deeper you are the warmer it gets). If my reasoning is correct, this way blocks with high thermal resistance could be used to create rooms that when heated from, e.g., with a torch. will retain heat (even for some time if there's no active heat source). In addition, blocks that are difficult to heat up/cool down would additionally radiate with heat, extending the range of a heat source.
I'd like to implement such system, but I have no idea where to start. Can someone please help me? Maybe if i get an initial idea of how to approach this problem, I could push it forward myself. I don't know if it's possible, but i know that i'd need to give the built-in air block temperature and thermal_resistance properties. Additionally, I don't know how to scan the right nodes; looping through everything seems expensive and i care about optimization.
I prefer to learn from examples and hope it's not wrong to ask for code like this. If it is, I'm sorry. Thanks in advance.
Statistics: Posted by pedka — Wed Feb 11, 2026 15:03
* * *