Satttoshi / idle-boss

An idle-game for educational purposes and beyond
https://idle-boss.vercel.app
25 stars 2 forks source link

US31 - user inactivity #66

Closed Satttoshi closed 1 year ago

Satttoshi commented 1 year ago

Value Proposition

As a developer I want to avoid server pausing so that my players earnings are not freezing

Description

There is an issue with vercel and how browsers handles apps. Usually on vercel if you're inactive for more than 15 minutes on a vercel deployment, the code runtime pauses, so all my set intervals and timeouts are frozen aswell. The same thing happens if you are on mobile and turn off your screen.

So what happens, my user goes away for a day or something and if he comes back he picks up the gamestate of a day ago, he only get his Idle money applied if he manually refreshes the site.

This is the moment where we have to track user inactivity and fire hard reload events when a certain timeout is reached.

Acceptance Critera

Tasks

Complexity Weight

3