Falling sand game test

preview_player
Показать описание
It is a little falling sand game I made to work in my game engine. It has sand and water particles. It works fairly well, and runs just as fast as a version I put together before I made the game engine. Two problems are that the water spreads slowly, and I haven't figured out how to get sand to sink through the water yet.

It uses two two-dimensional arrays. One is iterated through to run particles and the other is read from and updated during the iteration. Then after the iteration is done the first array is updated to be the same as the other.
Рекомендации по теме