Object Pooling for Construct 3
Easily optimize games
Do you have a lot of bullets in your bullet-hell or shooter? Maybe a lot of enemies in your vampire survivor-like game? If so, this plugin may save you tons of headaches and boost the performance of your project.
Pool is a behavior, that extends Construct's functions with the Object Pooling Pattern.
What is Object Pooling?
It's a pattern where instead of destroying objects, we store them. Instead of creating objects, we reuse the objects we stored.
From Wikipedia:
The object pool pattern is a pattern that uses a set of initialized objects kept ready to use – a "pool" – rather than allocating and destroying them on demand.
From Unity:
Object Pooling is a great way to optimize your projects and lower the burden that is placed on the CPU when having to rapidly create and destroy GameObjects. It is a good practice and design pattern to keep in mind to help relieve the processing power of the CPU to handle more important tasks and not become inundated by repetitive create and destroy calls.
A practice old as time
Object pooling is a common practice in game development. In other engines, tutorials about and around this pattern are constantly emerging and implementations exist set and ready to go.
It was time Construct has its own.
How it works?
You add the behavior to the object type you want a pool from and done! Quick and easy, drag & drop!
Internally, the behavior will override the creation and destruction functions of the object type you chose.
- It will disable and store any object in the pool instead of destroying it.
- It will retrieve & re-enable an object on the pool, if any, when creating.
Keep the control
The behavior includes ACEs to manually manage the pool if needed.
Check my other plugins
Support, ideas and feedback
If you have questions, ideas or bug reports, you can get in touch directly in the Master Pose discord server.
Notice:
As any optimization tactic, this is not a "one size fits all" behavior. It won't solve magically badly optimized events, but can help you in the right circumstances to reduce memory spikes or where the cost of instantiation surpasses the cost of keeping the objects in memory.
Status | Released |
Category | Tool |
Platforms | HTML5 |
Author | Master Pose |
Made with | Construct |
Tags | coding, construct, construct-3, cpu, extension, optimization, plugin, programming, ram, script |
Purchase
In order to download this plugin you must purchase it at or above the minimum price of $5 USD. You will get access to the following files:
Download demo
Development log
- Version 1.2 - Reestructure & fixesMay 27, 2024
- Performance & BenchmarkingFeb 05, 2024
Comments
Log in with itch.io to leave a comment.
I just spent 1 year sweating and toiling while making a bullet heaven game: https://samuelbromley.itch.io/1114
and you decide to release this today, the day AFTER I finished! :-)
This is torture!
I will look to use this on my next project though, so great work!