Re:Unreal Engine 5 is meant to ridicule web developers
by _bxg1 on Sunday May 17, 2020 @12:49PM
(#23213216)
In the web the performance bottleneck is not figuring out what changed, it's doing any rendering at all. Rendering health bars in games is cheap because they happen on the GPU and because they don't have the sprawling layout ramifications ("reflow") that UI changes in the DOM do.
This is not true or at least only deceptively so. If you think about "global state" in a game or more specifically in a rendering scene as "all of the objects in the scene" then the main difference is the lack of acceleration structures for the web. Most of the objects in a scene are never touched because AABB or some other structure allows you to cull large number of objects without ever actually touching them. If objects in the scene change, you definitely need to update those acceleration structures. Fortunately for games, those updates are quick and there are typically not that many of them.