by PrinsWes · 10mo ago · 0 comments
Display bitmap - the visible output Collision bitmap - a grayscale heightmap tracking accumulated snow Snow sprite - the particle graphic with soft/transparent edges
When a particle hit the collision bitmap (simple pixel check), I stamped its graphic onto both the display bitmap and added it to the collision bitmap. Using grayscale for collision meant soft-edged sprites contributed proportionally to the heightmap, preventing the soft/transparent edges from causing unrealistic fast accumulation. Using stamping meant that we did not have to keep all the collided particles in memory and so the user could spam away snow particles with their mouse to their hearts content (few 100's at a time).
Edit: even more fun to see all the different ways to solve the same 'problem'. From simple to quite complex!
No comments yet.