in reply to Running a script periodically to update player statistics on a web game.
However, as kcott pointed out, you may be able to instead do this processing on-demand when players are loading pages, with something along the lines of
...but that's not really suitable if turn processing has side-effects visible to other players which would require the turns to actually be processed at the same time as the turn (nominally) occurs.for (1 .. ($time_since_last_turn / 300)) { process_turn($player); }
While I'm often fond of building back-end daemons to run my games, I don't really see the point of it for turns that are only processed once every five minutes, regardless of whether your host will allow long-running processes or not.
|
|---|