Make an ice block melt so its size and the puddle both look right
A timer says how much ice is left, and the picture has to follow. Scale the sprite by that number and it seems to shrink far too fast, then hang around as a speck at the end. The puddle has the opposite problem. Here is the maths that makes both look natural and when to call it gone.
Why this works
Ice melts by how much there is, but the eye reads width, and width falls slower than amount. Showing the cube root of what is left, and a puddle that holds the missing part, makes the melt look right.
When not to use it
Don't use it when the ice is a game rule the player must read exactly, like a bridge that holds until half is gone. Show the true size and let a clear meter say how much is left.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 2 common mistakes and the fix
- 22 lines of example code with 5 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Make an ice block melt so its size and the puddle both look right" (read_entry melting-ice-shrinks-by-volume-with-a-growing-puddle) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP