itch.io is community of indie game creators and players

Devlogs

V2.2

Idle Gamer
A browser game made in HTML5

Finally fixed the NaN score bug! (Keep reading for more technical details)

The game saves using something called “Local Storage”. I update this local storage every time something happens. (score increasing, new upgrades, etc.) Upon reopening the game, it reads from that storage. However, if you have never played, the save will have the NaN value. This causes major issues, including making the game completely unplayable. Now I test if you have NaN points, using this line: if (isNaN(score)){ resetGame() }

Files

  • idlegamer.zip 7.7 kB
    Jun 08, 2021
Leave a comment