sandspiel icon indicating copy to clipboard operation
sandspiel copied to clipboard

Density error for dust

Open MarkT2019 opened this issue 5 years ago • 1 comments

Oil floats on water, dust floats on oil. But dust sinks in water. If dust is light enough to float on oil then it should float on water too.

MarkT2019 avatar Apr 08 '19 12:04 MarkT2019

This error is caused by the behavior of Dust with Water. Take a look at these lines

https://github.com/MaxBittker/sandspiel/blob/11d838bc07973cf1610dcd28107eece39b5aa178/crate/src/species.rs#L116-L128

These conditions only explicitly define dust's interaction with one other cell species: Water. The relevent conditions make it so that if there is Water underneath a Dust particle, the particle moves down. Otherwise, the dust stays where it is. This means that it sits on top of oil, but sinks in water.

Would you consider this an oversight (dust should sink in all liquids instead of just water) or should dust float on everything instead?

Spaceface16518 avatar Oct 21 '19 16:10 Spaceface16518