2D snow plowing game physics challenge


I am learning Unity and currently I am working on a prototype of a 2D, true top down snow plowing game. The challenge I have run into is of course simulating the snow to be plowed where the simulation easily brings down the frame rate. I started off with very small snow game objects with circle colliders on them. That looked really good small scale when moved by the plow truck but quickly crashed my frame rate when the particles grew in numbers. Right now I have medium sized snow game objects that have colliders about one 5th of the size of the sprite. This way the snow can be “packed” together by the player driving the plow truck. I have made a script that makes all snow game objects kinematic untill they enter a trigger collider on the player. The snow game objects regrettably look more like like cotton spheres than snow, but the game sort of runs. The frame rate also drops horribly low when I pack alot of snow together and move it together.

What I am trying to get at is a satisfying experience of plowing snow with a truck in 2D where the player can move and pack snow together with the plow. Any thoughts or advice as to what I could try would be appreciated.

i’m guessing you have the area covered with these snow chunk objects, all the calculations for the collision with that would cause some severe lag. instead try to go with a dynamic bitmap and spawned in particles around the edges and infront of the plow just for visuals.

note: not sure how the execution would work on this, but it seems like it would be the most efficient way.

You could consider writing your own simulation. You could even GPU accelerate it if you wanted to.
Here’s a link to details on the implementation of a popular fluid sim. There’s also things like this GitHub project. Snow should act similar to particles with a very low viscosity and a high compression tolerance.