daanheskes / OSRS-Idle-Clicker

An Idle Clicker game built with ReactJS and based on the game Old School Runescape.

Home Page:https://osrs-idle-clicker.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Game doesn't run without tab focus

daanheskes opened this issue · comments

If there is no focus on the tab, the game quits running. This is due to setInterval() throttling done by browsers.

Using WebWorkers should be the fix to this.

Hey, I'm not sure if this is why my game won't run but if I try to open the webpage its just blank and I have no idea why.

Hey, I'm not sure if this is why my game won't run but if I try to open the webpage its just blank and I have no idea why.

What's causing it is something with the saveGame() and loadGame() functions. And more specifically with something that has to do with the currently selected attack style.

Please post the error in your Dveloper Tools console to #13 if you want to.

Clearing your localStorage through the Developer Tools and re-opening the game should fix your issue for now.

This issue is not about the same thing though, so I opened a new Issue #13.