This is great, but my first experience with it so far makes me wonder whether you wouldn't have been better off just creating a traditional game instead of using HTML5.
I really liked the aesthetic of the game, so I took a screenshot and wanted to share it with my SO over Messenger. When I opened messenger.com the game made the rest of my system start to lag significantly as Firefox started to peg my CPU. I guess handling this game and messenger.com at the same time is too much even for a fairly new MacBook Pro. It's a bit ridiculous that this is the case. Perhaps the benefit of making the demo as accessible as possible outweighs this downside.
My impression here from testing (in Chrome) is that when the tab for the game is not visible, the game stops its update and consumes ~0 CPU. That should be the normal behaviour when running on requestAnimationFrame() and it should work on Firefox as well. Of course if you opened messenger.com in a separate browser / window then the above does not apply.
Comments (141) 40 threads
Show all comments
Showing thread 8 of 40
I really liked the aesthetic of the game, so I took a screenshot and wanted to share it with my SO over Messenger. When I opened messenger.com the game made the rest of my system start to lag significantly as Firefox started to peg my CPU. I guess handling this game and messenger.com at the same time is too much even for a fairly new MacBook Pro. It's a bit ridiculous that this is the case.
Perhaps the benefit of making the demo as accessible as possible outweighs this downside.
I don't know if it's the MacBook Pro hardware, or the HTML5 bloat, but this shouldn't happen in 2018.