Abstract
Granular materials are very common in the everyday world. Media such as sand, soil, gravel, food stuffs, pharmaceuticals, etc. all have similar irregular flow since they are composed of numerous small solid particles. In video games, simulating these materials increases immersion and can be used for various game mechanics. Computationally, full scale simulation is not typically feasible except on the most powerful hardware and tends to be reduced in priority to favor other, more integral, gameplay features. Here we study the computational and qualitative aspects of side profile flow of sand-like particles using cellular automata (CA). Our CA uses a standard square lattice that updates via a custom, modified Margolus neighborhood. Each update occurs using a set of probabilistic transitions that can be tuned to simulate friction between particles. We focus on the look of the sandpile structure created from an hourglass shape over time using different transition probabilities and the computational impact of such a simulation. The toppling behavior and final structure of the sandpiles are largely dependent on the chosen probabilities. As the probability to topple decreases, representing greater friction, elongated sandpiles begin to form, leading to longer settling times.
Similar content being viewed by others
Code availability
Upon Request
References
Bak, P., & Paczuski, M. (1995). Complexity, contingency, and criticality. Proceedings of the National Academy of Sciences, 92(15), 6689–6696.
Bak, P., Tang, C., & Wiesenfeld, K. (1987). Self-organized criticality: An explanation of the 1/f noise. Physical Review Letters, 59(4), 381–384.
Bay 12 Games. (2006). Slaves to Armok: God of Blood Chapter II: Dwarf Fortress.
Biskup, T. (1994). Ancient domains of mystery.
Boen, N., (2016). Simulating Large Volumes of Granular Matter, MS Thesis, Kansas State University, Manhattan.
Cervelle, J., Formenti, E., & Masson, B. (2007). From sandpiles to sand automata. Theoretical Computer Science, 381(1–3), 1–28.
Chopard, B. (2012). Cellular Automata Modeling of Physical Systems. In R. Meyers (Ed.), Computational Complexity. New York: Springer.
Dennunzio, A., Guillon, P., & Masson, B. (2009). Sand automata as cellular automata. Theoretical Computer Science, 410(38–40), 3962–3974.
Fersula, J., Noûs, C. and Perrot, K., 2020. Sandpile toppling on Penrose tilings: identity and isotropic dynamics. arXiv:2006.06254 [nlin]. [online] Available at: https://arxiv.org/abs/2006.06254
Formenti, E., Perrot, K., & Remila, E. (2016). Computational complexity of the avalanche problem for one dimensional decreasing sandpiles. Journal of Cellular Automata, 13(3), 215–228.
Frisch, U., Hasslacher, B., & Pomeau, Y. (1986). Lattice-Gas Automata for the Navier-Stokes Equation. Physical Review Letters, 56(14), 1505–1508.
Gálvez, G., & Muñoz, A. (2017). Three-dimensional cellular automata as a model of a seismic fault. Journal of Physics: Conference Series, 792, 012087.
Gardner, M. (1970). Mathematical games. Scientific American, 223(4), 120–123.
Gasior, J. and Seredynski, F., 2016. A Sandpile Cellular Automata-Based Approach to Dynamic Job Scheduling in Cloud Environment. In Parallel Processing and Applied Mathematics, pp.497–506.
Goles, E., & Kiwi, M. (1993). Games on line graphs and sand piles. Theoretical Computer Science, 115(2), 321–349.
Greenberg, J., & Hastings, S. (1978). Spatial patterns for discrete models of diffusion in excitable media. SIAM Journal on Applied Mathematics, 34(3), 515–523.
Hardy, J., de Pazzis, O., & Pomeau, Y. (1976). Molecular dynamics of a classical lattice gas: Transport properties and time correlation functions. Physical Review A, 13(5), 1949–1961.
Klei Entertainment. (2017). Oxygen Not Included.
Lang, M. and Shkolnikov, M., 2019. Harmonic dynamics of the abelian sandpile. In Proceedings of the National Academy of Sciences, [online] 116(8), pp.2821–2830.
Louis, P.-Y., & Nardi, F. R. (Eds.). (2018). Probabilistic cellular automata. emergence, complexity and computation. Cham: Springer International Publishing.
Ludeon Studios. (2018). Rimworld.
Maxis. (1989). Sim City.
Mojang Studios. (2011). Minecraft.
Mythos Games. (1994). UFO: Enemy Unknown.
Nolla Games. (2019). Noita.
Perrot, K. & Rémila, E., (2017). Strong emergence of wave patterns on kadanoff sandpiles. The Electronic Journal of Combinatorics, 24(2), 5–12.
Purho, P.,(2019). Noita: A Game Based On Falling Sand Simulation. Retrieved February, 10, 2020 from https://80.lv/articles/noita-a-game-based-on-falling-sand-simulation/
Re-Logic. (2011). Terraria.
Toffoli, T., & Margolus, N. (1987). Cellular Automata Machines: A New Environment For Modeling. Cambridge: The MIT Press.
Treglia, D. (2002). Game programming gems 3. Hingham, Mass.: Charles River Media.
Volition. (2001). Red Faction.
von Neumann, J. (1966). Theory Of Self-Reproducing Automata. Urbana, IL: University of Illinois Press.
Wolf-Gladrow, D., Dold, A., Takens, F., & Teissier, B. (2004). Lattice-gas cellular automata and lattice boltzmann models. Berlin, Heidelberg: Springer, Berlin / Heidelberg.
Wolfram, S. (1984a). Cellular automata as models of complexity. Nature, 311(5985), 419–424.
Wolfram, S. (1984b). Universality and complexity in cellular automata. Physica D: Nonlinear Phenomena, 10(1–2), 1–35.
Wolfram, S. (1985a). Origins of randomness in physical systems. Physical Review Letters, 55(5), 449–452.
Wolfram, S. (1985b). Undecidability and intractability in theoretical physics. Physical Review Letters, 54(8), 735–738.
Wolfram, S. (1986a). Cellular automata and complexity. Singapore: World Scientific Publishing.
Wolfram, S. (1986b). Cellular automaton fluids 1: Basic theory. Journal of Statistical Physics, 45(3–4), 471–526.
Wolfram, S. (2002). A new kind of science. Champaign, IL: Wolfram Media.
Zhabotinskii, A. M. (1964). Periodicheski i khod okisleniia malonovo i kisloty v rastvore (Issledovanie kinetiki reaktsii Belousova) [Periodic course of the oxidation of malonic acid in a solution (studies on the kinetics of Beolusov’s reaction)]. Biofizika, 9, 306–311.
Acknowledgements
This work was performed with the support of the School of Computing and Data Science at Wentworth Institute of Technology.
Funding
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Availability of data and material
Upon request.
Conflicts of interest
The authors declare that they have no conflict of interest.
About this article
Cite this article
Devlin, J., Schuster, M.D. Probabilistic Cellular Automata for Granular Media in Video Games. Comput Game J 10, 111–120 (2021). https://doi.org/10.1007/s40869-020-00122-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s40869-020-00122-4