daanheskes / OSRS-Idle-Clicker

An Idle Clicker game built with ReactJS and based on the game Old School Runescape.
https://osrs-idle-clicker.netlify.com/
MIT License
34 stars 19 forks source link

Game doesn't run without tab focus #11

Open daanheskes opened 5 years ago

daanheskes commented 5 years ago

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.

Shoopdafloop commented 5 years ago

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.

daanheskes commented 5 years ago

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.