Vira Games · Simulation · 2025
The scatter is scripted, not simulated.


A cutting game: you slice a bar of soap and the pieces scatter. The producer had a precise reference for how that scatter should behave, and the inside of the bar carries a different texture from the outside.
The cut
The hardest part was not the scatter but the cut itself. The whole team spent a long time on how sliced soap should read on screen.
Three demands pulled against each other. The inner texture had to hold together: dozens of small cubes had to look like one continuous picture, not a mosaic. The geometry had to stay clean, with cubes even and roughly equal in size. And the number of cubes had to stay inside the frame budget.
Tuning the cutting algorithm was really the search for the point where all three agree. It was a negotiation between art, geometry and the frame, not an optimisation pass.
The scatter
Real PhysX gave an unpredictable scatter and a poor feel, and a fast knife let pieces slip straight through the blade because the collision was never detected.
I replaced the scatter with a scripted impulse that decays, aimed from where the piece sat on the bar, which put the feel fully under control and on the producer reference.
The knife-to-piece collision became plain maths instead of a collider, which removed the tunnelling without touching the fixed timestep.
On the last layer a large heap of pieces still cost frames, so I tuned the decay until pieces fall asleep almost immediately and switch to kinematic while idle, so a newly arriving piece does not wake the whole pile.
I built this one end to end — gameplay, menus, progression, shop, skins, tutorial, ads and store builds. These are the parts worth naming.