Hacker News new | ask | show | jobs
by amikazmi 1118 days ago
Super cool!

One thing that looks a bit off is that part of the physics engine runs in reverse -

When a piece touch the high part of a pile, the sand is going UP from the bottom of the valley to the top, instead of from the top DOWN to the bottom

When the process finishes the end result is the same, it's just a bit strange :)

Example in https://youtu.be/Hp4nV4EjLgM?t=133

1 comments

The sand is going down. Each tick one bit of sand falls from the top left to the bottom of that valley. Over many ticks the sand from the top accumulates up the side of the valley, from over the "cliff". The strange bit is the pieces teleport in one tick one at a time. No matter how you do it you'll end up with some sort of tradeoff like that when using pixel grids instead of particles.