No description
  • GDScript 100%
Find a file
2026-07-16 08:27:44 +02:00
Materials Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
Scenes Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
.editorconfig Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
.gitattributes Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
.gitignore Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
Game.gd Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
Game.gd.uid Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
grid.gd Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
grid.gd.uid Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
icon.svg Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
icon.svg.import Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
project.godot Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00
README.md Initial commit: Godot falling-sand particle simulation 2026-07-16 08:27:44 +02:00

particles

A small falling-sand particle simulation built with Godot 4.7.

⚠️ This is just an experiment — a playground for learning cellular-automata-style particle physics. Expect rough edges and incomplete features.

What it does

Materials live in a cell grid and update every frame based on simple rules. Denser materials fall through lighter ones, so sand piles up and settles while air moves out of the way.

Current materials:

  • Bedrock — immovable
  • Air — background / empty space
  • Sand — falls and spreads diagonally

The grid is rendered to an ImageTexture, one pixel per cell, scaled up by cell_size.

Structure

  • grid.gd — the cell grid and neighbour/swap helpers
  • Scenes/world.gd — simulation step + rendering
  • Materials/ — per-material behaviour (base.gd, air.gd, bedrock.gd, sand.gd)
  • Game.gd — autoload signal bus

Running

Open the project in Godot 4.7 and press Play.