netplayjs icon indicating copy to clipboard operation
netplayjs copied to clipboard

Demos are abysmally slow even on local

Open TheBricktop opened this issue 2 years ago • 3 comments

When testing the demos im getting like 1-2 fps on most of the demos even whem im running it on localhost, also the resolution is low and blurred, why is that? Tested on both firefox and edge.

TheBricktop avatar Feb 22 '22 15:02 TheBricktop

try different windows

johndoe-88 avatar Mar 20 '22 04:03 johndoe-88

Tried, still slow below expectations

TheBricktop avatar Mar 26 '22 09:03 TheBricktop

it is not slow here.

AngelShadow2017 avatar Jul 27 '22 01:07 AngelShadow2017

I haven't seen this issue specifically. I am aware of #76 (backgrounded tabs won't tick anymore). I suspect this is a variation of that problem where a visible but unfocused tab has timer events throttled. If that is indeed the problem, fixing #76 will also fix this.

The blurriness is due to the fact that the games use a fixed canvas size, scaled up to fit the screen. This makes life easier because mouse inputs and rendering happen in the exact same coordinate space for all players.

It's not an inherent limitation - I should add an option for enabling variable canvas size.

rameshvarun avatar Mar 24 '23 21:03 rameshvarun

There's now an indicator which tells you if the other player has hidden their window. It doesn't fundamentally solve the problem but at least provides some feedback to players, so I'll consider this resolved for now.

rameshvarun avatar Apr 05 '23 09:04 rameshvarun