3 ms·
Phaser 3 (and its predecessor Phaser 2) provide helper code for managing object pools[1]. I can imagine any non-toy project takes advantage of pooling for speed
by danbolt 6y ago
Phaser 3 (and its predecessor Phaser 2) provide helper code for managing object pools[1]. I can imagine any non-toy project takes advantage of pooling for speed when it can.
[1] https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Group.html https://photonstorm.github.io/phaser3-docs/Phaser.GameObject...
- vvanders 6y agoYou should do this in both GC'd and non-GC'd languages. Obviously C/C++/etc give you more options for arenas and the like. If you have a well bounded upper limit there's a while lot of good reasons to preallocate(locality of data, GC pressure, etc). Some engines I used to work with would assert() on malloc/free if it happened outside certain safe regions of execution.