Fun with Unity3D: How many can it explode before it breaks?
Having fun with unity should always be at the core of any project you make, whether it is a game project or even a software project.
So I had this idea that exploded in my mind at night and woke me up: How many barrels can I explode before Unity breaks?
For quick prototyping, I downloaded the Barrels 3D prop and the Big Explosion VFX from War FX from the Unity Asset Store. Assembled a quick room and the C# script to control barrel position on start and to Instantiate the explosion with randomness. The barrel has a collider and a Rigidbody affected by gravity.
Let’s start simple with 10 barrels.
Still running smoothly and maintaining 60fps although there is a big dip in fps when the barrels explode.
Let’s increase the randomness for the explosion routine in order to space out the explosions and see the difference.
Can it hold?
This is the ultimate test….here comes the big kaboom.
Unity did not crash, my GIF recorder actually crashed. It took Unity around 10 minutes to explode all the barrels and normalize.
This was a fun experiment, just keep in min that it was done using URP and without any optimizations.