Game and GC

solidstate1991 laszloszeremi at outlook.com
Mon Apr 9 00:25:21 UTC 2018


On Saturday, 24 February 2018 at 07:12:21 UTC, Guillaume Piolat 
wrote:
> From my experience a combination of the following is necessary:
> - not having the audio thread registered
> - using pools aggressively for game entities

Also you can save a lot of clockcycles if you put @nogc 
everywhere you don't allocate on the heap, the stack will be 
automatically cleaned up.

I'm currently thinking on restructuring the way my engine handles 
display lists on sprites (dynamic array contains the priority, 
multiple associative arrays for Coordinates, sprites, 
attributes), however if enabling exception handling in @nogc 
parts will enable associative array indexing, I'll just skip the 
whole procedure, otherwise probably moving the whole thing to 
rbtree.


More information about the Digitalmars-d-learn mailing list