/PyxelSand

A "falling sand" type game written in Pyxel

Primary LanguagePython

PyxelSand

PyxelSand is a "falling sand" style game written with the Python game engine Pyxel

An example of the game running

How to install

  1. Install Poetry
  2. Run poetry install in the root directory
  3. Run poetry run python -m sand_game
  4. (Optional) Run poetry run pytest to run unit tests

How to play

  • Left click places a particle at the mouses location
  • Right click removes a particle at the mouses location
  • Keys 1-3 select the implemented particles

How it works

The game has an "environment" which keeps the state of each pixel and what particle is in it. Each particle extends from a base particle class, and upon initialization provides a list of behaviours such as "Flammable", "Fall", and "Ephemeral" to define how the particle behaves.