Pixelgaffer / MineFluence

2 stars 0 forks source link

rebalance heat generation/ cooling/ maxheat #7

Open CodeCrafter47 opened 9 years ago

CodeCrafter47 commented 9 years ago

My machines always explode instantly.

Maybe instead of heat += logic.heatGeneration * Math.pow(getWorkers(), 0.95); we can use something like heat += logic.heatGeneration / getProcessTime();. This would also scale with the amount of workers, as the processtime depends on the amount of workers. Another benefit is, that the heatGeneration member has a real meaning (the total amount of heat generated during that transformation) instead of being a random number.

Also the heat should be prevented from being < 0. Otherwise water in the watercooler freezes :D

For the balance I think the amount of heat generated by a transformation shouldn't be higher then the maximum heat of the machine. The goal shouldn't be an instant explosion if the player has not enough cooling, but a slowly increasing temperature, making the player aware that he should add more cooling, if he doesn't finally leading to an explosion after some time (should be at least some seconds to give the player time to react).

It might also be logical to increase the maximum heat the bigger a machine.

CherryWorm commented 9 years ago

I think we can implement some fancy Thermodynamics, so every part has it's heatcapacity and every cooler has it's temperature, so the cooling would be a bit smoother. Maybe we can even calculate the transition of the heat to the surrounding blocks/air, with realistic temperatures (lower at night/during rain) and heat-capacities. Then we would be able to just assign a temperature to a process, at which the core and the workers run, which should balance everything just fine. The redistribution of heat to other blocks and the radiation of heat to the environment should have the same effect as increasing the maximum temperature.