svader0 / sandbox

Falling Sand Game Built in Rust
0 stars 2 forks source link

Make elements scalable #11

Closed svader0 closed 5 months ago

svader0 commented 6 months ago

Currently "element" is just an enum with assiociated functions. I feel like a better approach would be to have each cell reference a generic "element" with different properties depending on which type of element it is. Not really sure how this would work, but I am certain that the current way is not the best one.

svader0 commented 6 months ago

This will include the ability to give certain properties to certain element types. For example, a movable solid might have a weight that affects its fall speed. Or a density that affects its corrosion rate with acid. Or, liquids might have a viscosity that affects (in a simple way) the speed that it moves.