showcase

command module
v1.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 5 Imported by: 0

README ยถ

Particle Symphony ๐ŸŽตโœจ

Go Report Card Go Reference codecov Deploy to GitHub Pages

An interactive particle simulation showcasing the power and elegance of andygeiss/ecs โ€“ a lightweight, high-performance Entity Component System framework for Go.

๐ŸŽฏ This project exists to demonstrate how simple yet powerful ECS architecture can be. Watch thousands of particles dance, interact, and create emergent beauty โ€“ all powered by clean, modular ECS patterns.

๐ŸŒ Live Demo

๐ŸŽ† Try it in your Browser โ†’

No installation required! The web version runs entirely in WebAssembly.

โšก Powered By

Technology Purpose
andygeiss/ecs ๐Ÿ† The star of the show! Lightweight ECS framework with bitmask-based entity filtering
raylib-go Native desktop rendering (high performance)
Ebitengine WebAssembly rendering (cross-platform)
Go Because simplicity and performance matter

๐Ÿš€ Quick Start

Native Version (raylib)

For the best performance, run the native version:

# Clone the repository
git clone https://github.com/deltatree/showcase.git
cd showcase

# Build and run
go build -o particle-symphony . && ./particle-symphony
WebAssembly Version (Ebitengine)

Build the WASM version locally:

./build-wasm.sh
cd web && python3 -m http.server 8080
# Open http://localhost:8080

๐ŸŽฎ Controls

Key Action
1 Galaxy Preset
2 Firework Preset
3 Swarm Preset
4 Fountain Preset
5 Chaos Preset
LMB Attract Particles
RMB Repel Particles
2ร— Click Lock Attract/Repel
F3 Toggle Debug Overlay
ESC Exit (Native only)

โœจ Features

  • Entity Component System - Clean, modular architecture
  • Multiple Presets - Fountain, Firework, Galaxy, Swarm, and Chaos effects
  • Real-time Physics - Gravity, damping, and velocity simulation
  • Color Transitions - Smooth gradient color animations
  • Lifetime Management - Particle birth, aging, and death cycles

๐Ÿ—๏ธ Architecture

The project follows a pure ECS architecture using andygeiss/ecs:

  • Components - Pure data containers (Position, Velocity, Color, Mass, etc.)
  • Systems - Logic processors (Physics, Render, Emitter, Gravity, etc.)
  • Entities - Unique identifiers linking components together
  • Bitmask Filtering - Blazingly fast entity queries using component masks
Why andygeiss/ecs?

โœ… Zero Dependencies - Pure Go, no external requirements
โœ… Bitmask-based Filtering - O(1) component lookups
โœ… Clean API - Simple, intuitive, Go-idiomatic
โœ… Battle-tested - Used in production game projects
โœ… Minimal Footprint - Small codebase, easy to understand

// Example: How simple ECS can be!
particles := em.FilterByMask(MaskPosition | MaskVelocity | MaskColor)
for _, entity := range particles {
    pos := entity.Get(MaskPosition).(*Position)
    vel := entity.Get(MaskVelocity).(*Velocity)
    pos.X += vel.X * deltaTime
    pos.Y += vel.Y * deltaTime
}

๐Ÿ“ Project Structure

โ”œโ”€โ”€ components/     # ECS component definitions
โ”œโ”€โ”€ systems/        # ECS system implementations
โ”œโ”€โ”€ presets/        # Particle effect presets
โ”œโ”€โ”€ internal/       # Internal packages (config)
โ”œโ”€โ”€ web/            # Web showcase page
โ”œโ”€โ”€ cmd/wasm/       # WebAssembly version (Ebitengine)
โ””โ”€โ”€ docs/           # Project documentation

๐Ÿ™ Credits & Acknowledgments

This project wouldn't exist without these amazing open-source projects:

๐Ÿ“ License

MIT License - see LICENSE for details.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Built with โค๏ธ and mass quantities of โ˜•

If you found this useful, consider starring the repo and checking out andygeiss/ecs!

Documentation ยถ

Overview ยถ

Particle Symphony - Native Desktop Application

This is the main entry point for the native desktop version of Particle Symphony. It uses raylib-go for rendering and provides interactive particle effects driven by the andygeiss/ecs Entity-Component-System framework.

Controls:

  • Mouse: Move to guide particles
  • Left Click: Attract particles
  • Right Click: Repel particles
  • Double-Click: Lock attract/repel mode
  • 1-5: Switch between presets
  • F3: Toggle debug overlay

Run: go run main.go

Directories ยถ

Path Synopsis
Package components provides all ECS component definitions for the Particle Symphony simulation.
Package components provides all ECS component definitions for the Particle Symphony simulation.
internal
config
Package config provides configuration loading and management for Particle Symphony.
Package config provides configuration loading and management for Particle Symphony.
Package premium provides premium visual and audio enhancements for Particle Symphony.
Package premium provides premium visual and audio enhancements for Particle Symphony.
Package presets provides predefined particle configurations for Particle Symphony.
Package presets provides predefined particle configurations for Particle Symphony.
Package systems provides all ECS system implementations for Particle Symphony.
Package systems provides all ECS system implementations for Particle Symphony.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL