Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Pools
Phaser 4.1.0
Phaser 4 examples
Pools
6
examples
Examples
6
Bullet Pool
Efficiently manage a limited number of firing bullets using a Group as an object pool with a custom class and automatic child updates.
Create Object Pool
Demonstrates how to create a simple object pool using a Phaser Group with a maxSize property to limit and recycle game objects.
Group Max Size
Demonstrates how to limit the number of active objects in a Group pool using the maxSize property. Once the limit is reached, no further objects are created until existing ones are recycled.
Group Object Pooling
Demonstrates how to use a Group as a pool for a custom Bullet class, including recycling inactive objects and using runChildUpdate to automate child logic.
Pool with Custom Class
Demonstrates how to create an object pool using a custom class in a Phaser Group. It shows how to define a class type, set a maximum pool size, and use the runChildUpdate property to automatically execute the update logic of pooled objects.
Seeded Object Pool
Demonstrates how to create a pre-populated object pool using a Group with a fixed maximum size and a custom class to recycle game objects efficiently.