Particle Pool for JavaScript Game Engines

August 3, 2018 comments 92 Reads

Learn how to implement a very simple object pool to reduce the number of object instantiations and deletions in your simulation. Watch this video tutorial and find out how you can save memory. Object pools come in handy any time a simulation requires many objects to consistently be removed and added to the scene. Rather than letting old objects get garbage collected and instantiating new ones, objects can be stored for reuse to avoid using valuable processing time to clear and reallocate memory. Particle systems are an excellent use case for object pooling.
Source Code: https://github.com/frankarendpoth/frankarendpoth.github.io/blob/master/content/pop-vlog/javascript/2018/021-particle-pool/particle-pool.html
Working Example: https://frankarendpoth.github.io/content/pop-vlog/javascript/2018/021-particle-pool/particle-pool.html
See more: https://frankpoth.info/html/pop-vlog.html