3 ms·
Correctness isn't always the right thing to do. Games, in particular, are full of code that approximates the right thing and falls back to less and less correct
by Pfhreak 7y ago
Correctness isn't always the right thing to do. Games, in particular, are full of code that approximates the right thing and falls back to less and less correct solutions. It's more important to be fast than right in a lot of cases. Dropping frames can have a significant negative experience for players. Dropping an AI pathing algorithm, particle physics computation, or other background task can often be fine or even unnoticed.
- AstralStorm 7y agoApproximations, including temporal ones, are also science. Ever seen a texture pop in instead of a stutter? If a lock would be taken on that load without timeout (very short) it'd either not load on time or load when it's no longer needed.
- smaddox 7y agoNo need for a lock for such synchronization between a loading thread and a rendering thread, though, when you can use an atomic pointer or ready flag. Maybe a lazy GUI framework could use a mutex timout, though.