2024-12-26 05:02:16 -06:00

Sand C#

This repo is a C# falling-sand / falling-everything engine and app shell. The first game is a falling-sand game, but the longer-term direction is a broader simulation-heavy engine with larger worlds.

Repo layout

  • Sand.Core/, Sand.App/, Sand.Tests/: production dense backend, app shell, and regression tests
  • Sand.ChunkPrototype/, Sand.ChunkPrototype.Tests/: experimental chunk backend and its tests
  • Sand.Benchmarks/: dense/chunk benchmark runner with app-sized and snapshot modes
  • advchksys/: imported chunk-system library kept as a support/reference asset
  • docs/csharp-parity-audit.md: current content/runtime mapping audit
  • docs/chunk-engine-progress.md: chunk program log, blockers, and milestone measurements
  • ROADMAP.md: authoritative implementation order and promotion gates

Current status

The dense backend is still the production/reference path. It already supports fixed-timestep stepping, pressure, thermal, explosions, tool fields, and the current app/debug shell.

The chunk backend also exists in the main app as an experimental backend, but it is not yet faster than dense in the full game shell. Current chunk work is focused on stabilization, optimization, truthful measurement, and subsystem-by-subsystem parity growth.

Real app runs are the source of truth for chunk progress. Benchmarks support decisions, but they do not replace interactive testing.

Run

Dense app:

Remove-Item Env:SAND_BACKEND -ErrorAction SilentlyContinue
dotnet run --project .\Sand.App\Sand.App.csproj -c Release

Chunk app:

$env:SAND_BACKEND='chunk'
dotnet run --project .\Sand.App\Sand.App.csproj -c Release

Clear the override after chunk testing:

Remove-Item Env:SAND_BACKEND -ErrorAction SilentlyContinue

Benchmarks:

dotnet run --project .\Sand.Benchmarks\Sand.Benchmarks.csproj -c Release -- --mode app-sized
dotnet run --project .\Sand.Benchmarks\Sand.Benchmarks.csproj -c Release -- --mode snapshot-scenes

Validation

dotnet test Sand.sln
dotnet test .\Sand.ChunkPrototype.Tests\Sand.ChunkPrototype.Tests.csproj -c Release
Description
Project name is a place holder. Sand, sand everywhere even the water is sand!
Readme 804 KiB
Languages
Python 100%