W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2014

Re: [whatwg] Proposal: requestBackgroundProcessing()

From: Ashley Gullen <ashley@scirra.com>
Date: Thu, 20 Feb 2014 18:02:09 +0000
Message-ID: <CAABs73iwKGJX3VhSYLOsD1qjuFHz94k1d70b7n4X=m79ekivsA@mail.gmail.com>
To: James Robinson <jamesr@google.com>
Cc: "whatwg@whatwg.org" <whatwg@whatwg.org>
The host needs to keep simulating the world even when no network events are
occurring. That can't happen if rAF isn't firing and timers only run at 1
Hz.


On 20 February 2014 17:56, James Robinson <jamesr@google.com> wrote:

> On Thu, Feb 20, 2014 at 7:25 AM, Ashley Gullen <ashley@scirra.com> wrote:
>
>> The host is effectively acting as the
>> game server, and this basically hangs the server. If there were 20 peers
>> connected to the host, the game hangs for all 20 players.
>>
>
> That's a bug in your application design.  If one web page is performing
> operations necessary for things orthogonal to that page's visual display,
> those operations should not be tied to a requestAnimationFrame loop.  If
> the host is responding to network updates from other clients, for instance,
> then it could perform that work in response to the network events coming
> in.  The page may also be performing the normal game updates for that one
> client in a rAF loop concurrently.
>
> - James
>
Received on Thursday, 20 February 2014 18:08:37 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:16 UTC