Skip to content

MuchuCAT/simulation-of-life-under-constraint

Repository files navigation

LifeLab: Hypnotic Game of Life

LifeLab is a high-performance, aesthetically refined implementation of Conway's Game of Life. It transcends the typical "grid of squares" to offer a mesmerizing, product-grade experience with dynamic blooming, curated color themes, and intuitive interaction tools.

Made with ❤️ by MuchuCAT


✨ Features

🎨 Visuals & Aesthetics

  • Hypnotic Bloom: A "breathing" glow effect that reacts to simulation density and activity.
  • Curated Themes: Switch instantly between styles:
    • 🌙 Chill Night: Deep violet/indigo hues on a dark navy background.
    • 🧪 Neon Lab: High-contrast cyber-green and electric blue on black.
    • 📜 Paper Ink: A crisp, legible light mode with slate tones.
  • Dynamic LOD: The rendering engine adapts to your zoom level—showing individual cell shapes (circles/rounded rects) up close, and optimized density heatmaps when viewing the entire infinite-like grid.

🛠 Tools & Interaction

  • Pattern Stamping: Don't just place pixels. Stamp complex lifeforms like Gosper Glider Guns, Pulsars, and Spaceships directly onto the grid.
  • Smart Selection: Drag to select areas, then export them as RLE (Run Length Encoded) text to share with the community.
  • Cinematic Mode: Press H to hide the UI and immerse yourself in the simulation.
  • Time Control: Pause, step frame-by-frame, or fast-forward (up to 50x) to watch civilizations rise and fall in seconds.

💾 Sharing & Persistence

  • URL State: The entire world state—including the random seed, rules, and camera position—is encoded in the URL. Share a link, and your friend sees exactly what you see.
  • Local Saves: Three browser-local memory slots to keep your favorite experiments safe.

🚀 Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn

Installation

  1. Clone the repository

    git clone https://github.com/MuchuCAT/lifelab.git
    cd lifelab
  2. Install dependencies

    npm install
  3. Start the development server

    npm run dev

    Open http://localhost:5174 in your browser.

  4. Build for production

    npm run build

🏗 Tech Stack

  • Frontend: React 18, TypeScript, Vite
  • Rendering: PixiJS v8 (WebGL accelerated)
  • State Management: Zustand
  • Styling: TailwindCSS
  • Icons: Lucide React

🎮 Controls

Key Action
Left Click Draw / Stamp / Select
Right Click Pan Canvas
Scroll Zoom In/Out
Space Pause / Play
S Step Forward (1 Tick)
R Randomize Grid
C Clear Grid
H Toggle UI (Cinematic Mode)
F Fit Content to Screen

🤝 Contributing

Contributions are welcome! If you have ideas for new patterns, themes, or optimizations:

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

Enjoy the simulation.

About

A hypnotic , high-performance Game of Life. Features dynamic bloom, infinite-like zooming & curated visual themes. 🧬

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages