Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

Small bug report. The +-20% on the Duration in edge mode is really -80% to +20%. Replacing "(Math.random() + 0.2)" With "((Math.random() - 0.5) * 2 * 0.2 + 1)" on line 482 (file: Heat Control v1.2.5 win\resources\app\files\main.js) will make it +-20%.

(1 edit)

I think someone mentioned it felt off, thanks a lot for figuring it out!
I'll change now and it'll be included whenever the next update comes.

No idea how I got it that wrong, it's nonsense but it happens.
Your formula works, but I prefer making something more generic instead:

function getRandInInterval(min, max)
{
    return Math.random() * (max - min) + min;
}

getRandInInterval(1.0 - 0.2, 1.0 + 0.2);


I like showing intention clearly when possible!