Do you have lots of instances being created and destroyed? Tired of long instantiation times? Look no further than Instance Pooling Made Easy, a drop in system for basic instance pooling.
Includes the following core functions:
called once at the beginning of your game or room
called once at the end of your room or game to free up resources
instance_create_layer_pooled(x, y, layer, object)
called instead of instance_create_layer(x, y, layer, object)
instance_create_depth_pooled(x, y, depth, object)
called instead of instance_create_depth(x, y, depth, object)
called instead of instance_destroy(instance), note the argument requirement
As well as these utility functions:
call when you want to clear out the pool for some reason
call if you want to know the current size of the instance pool
returns the id of an instance if its found in the pool, otherwise returns noone
v1.0.0 - initial release
v1.0.1 - fixed a memory leak
v1.0.2 - changes to allow this asset to work with non-physics objects as well as physics objects
v1.0.3 - bug fixes, more utility scripts
Version 1.0.3. Published March 21, 2019
This asset hasn't received enough reviews yet.
You can only review assets you've bought.
No reviews have been left for this asset - be the first!