Project 1: Object Pooling

In the below gifs, you will see a lot of enemies on screen at one time. Each of these is spawned in a random location and uses object pooling to maintain high performance. Very minimal FPS drop as enemies come and go from the play area. This project shows my ability to solve performance problems as well as code clean and efficiently. Object pooling isn't a new idea, but to do it well it takes patience and a good understanding of the engine. It also requires a well thought out execution plan to ensure that each object is reset and replaced as needed. This is an advanced programming task that I tackled in less than a few days. This project also shows my ability to add elements to a project that enhance it's playability. This includes the minimap, weapons, and particle effects. This entire project was created in Unreal Engine 5.
Large amount of enemies, no performance loss during pooling
Different weapon, large amount of enemies and particle effects, still no loss to performance
About

Creating this project required several steps that I took in stride. My first attempt at object pooling did not go well and required some pretty extensive code overhaul to get it right. My basic approach was to setup an AI enemy that behaved as it should but had a function that would "revive" him as needed. Once I had that in place I started figuring out how I wanted to handle the pool, the easiest most effecient way was to spawn 50 enemies and place them off screen and invisible. They were also "deactivated" when the level started. When the object pooler needed an enemy it would attempt to pull one from our pool and if none were available it would then create a new one and add it to the pool for future use. When the enemies were destroyed. I moved them off screen again and then would run the "revive" function when they were pulled out to use again. • I learned a lot about C++ in general doing this project, seeing how object pooling is a bit of an advanced topic, it was a challenge for me to get it right with my existing knowledge of C++. Although, it turned out great and I feel far more confident in my C++ abilities now and have turned to using it exclusively for Unreal Engine projects. • Some of the challenges I faced were getting the enmies to reset properly when they spawned back in. There were some animation problems that would cause the enemy to be pulled from the pool and it was stuck in the T-Pose. It took some time to figure out what was happening but I managed to solve the problem by initializing the animation again once it was a re-activated prefabrication. • Improvements from my original system I had when I first made this project include the pooling system. I didn't have one and there were obvious performance hits when enemies would spawn into the level.
Object Pooling UE5
Published:

Owner

Object Pooling UE5

Published: