{"id":15023205,"url":"https://github.com/manevillef/bevy_life","last_synced_at":"2026-03-01T13:01:38.376Z","repository":{"id":42001887,"uuid":"411613661","full_name":"ManevilleF/bevy_life","owner":"ManevilleF","description":"Generic cellular automaton plugin for bevy.","archived":false,"fork":false,"pushed_at":"2026-02-02T08:10:07.000Z","size":58544,"stargazers_count":72,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-02T21:06:42.044Z","etag":null,"topics":["bevy","bevy-plugin","cellular-automata","cellular-automaton","conway","game-of-life","gamedev","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ManevilleF.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-09-29T09:39:11.000Z","updated_at":"2026-02-02T08:10:11.000Z","dependencies_parsed_at":"2024-07-09T12:48:44.471Z","dependency_job_id":"0209c162-7aee-4e87-ac01-e1b3fddf0d7c","html_url":"https://github.com/ManevilleF/bevy_life","commit_stats":{"total_commits":72,"total_committers":1,"mean_commits":72.0,"dds":0.0,"last_synced_commit":"d909f1aeb02cebc305011f02ac08003af2b38bbf"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/ManevilleF/bevy_life","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManevilleF%2Fbevy_life","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManevilleF%2Fbevy_life/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManevilleF%2Fbevy_life/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManevilleF%2Fbevy_life/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ManevilleF","download_url":"https://codeload.github.com/ManevilleF/bevy_life/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManevilleF%2Fbevy_life/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29969700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T12:56:10.327Z","status":"ssl_error","status_checked_at":"2026-03-01T12:55:24.744Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bevy","bevy-plugin","cellular-automata","cellular-automaton","conway","game-of-life","gamedev","rust"],"created_at":"2024-09-24T19:58:50.109Z","updated_at":"2026-03-01T13:01:38.370Z","avatar_url":"https://github.com/ManevilleF.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bevy Cellular Automaton\n\n [![workflow](https://github.com/ManevilleF/bevy_life/actions/workflows/rust.yml/badge.svg)](https://github.com/ManevilleF/bevy_life/actions/workflows/rust.yml)\n\n [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n [![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/)\n [![Crates.io](https://img.shields.io/crates/v/bevy_life.svg)](https://crates.io/crates/bevy_life)\n [![Docs.rs](https://docs.rs/bevy_life/badge.svg)](https://docs.rs/bevy_life)\n [![dependency status](https://deps.rs/crate/bevy_life/0.13.0/status.svg)](https://deps.rs/crate/bevy_life)\n\n\u003c!-- cargo-sync-readme start --\u003e\n\n`bevy_life` is a generic plugin for [cellular automaton](https://en.wikipedia.org/wiki/Cellular_automaton).\nFrom the classic 2D [Conway’s game of life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) to [`WireWorld`](https://en.wikipedia.org/wiki/Wireworld) and 3D rules, the plugin is completely generic and dynamic.\n\nSee:\n\n* [Game of life variations](https://cs.stanford.edu/people/eroberts/courses/soco/projects/2008-09/modeling-natural-systems/gameOfLife2.html)\n* [`Wireworld` implementation](https://www.quinapalus.com/wi-index.html) (see\n  this lib's [implementation](https://github.com/ManevilleF/wireworld-rs))\n\n## How to use\n\nAdd a `CellularAutomatonPlugin` to your bevy app:\n\nA `CellularAutomatonPlugin\u003cC, S\u003e` has two generic types:\n\n* `C` -\u003e Any type implementing `Cell`, defining the coordinate system\n* `S` -\u003e Any type implementing `CellState`, defining the simulation rules.\n\nYou may add as many generic `CellularAutomatonPlugin` as wished, the lib\nprovides some implementations like:\n\n* `GameOfLife2dPlugin`\n* `GameOfLife3dPlugin`\n* `ImmigrationGame2dPlugin`\n* `ImmigrationGame3dPlugin`\n* `RainbowGame2dPlugin`\n* `RainbowGame3dPlugin`\n* `WireWorld2dPlugin`\n* `WireWorld3dPlugin`\n* `CyclicColors2dPlugin`\n* `CyclicColors3dPlugin`\n\nThen you may use bevy as usual and add `impl Cell` and `impl CellState`\ncomponents to the entities. The lib provides some implementations like\n`MooreCell2d` or `MooreCell3d` for cells and `ConwayCellState`,\n`WireWorldCellState`, etc for states.\n\nYou may implement your own *cells* (coordinate system) and *states* (rules)\nas you want, the cellular automaton system is completely dynamic and\ngeneric.\n\nFor more information you may look at some examples:\n\n* The [Classic examples](./examples) showcase the provided implementations\n* the [Rock Paper Scissor](./examples/2d_rock_paper_scissor.rs) defines\n  custom rules.\n* the [wireworld](https://github.com/ManevilleF/wireworld-rs) repository\n\n### Pausing\n\nInserting a `SimulationPause` resource will pause the simulation, removing\nit wil resume the it.\n\n### Parallel execution and batching\n\nInserting a `SimulationBatch` resource will allow parallel computation of\ncells with custom batch sizes.\n\n## Cargo Features\n\nNo feature is required for the plugin to work and the main traits `Cell` and\n`CellState` are always available. But you may enable the following features\n\n* `2D` (enabled by default): Enables 2D types like:\n  * `MooreCell2d` (square cell with 8 neighbors)\n  * `NeumannCell2d` (square cell with 4 neighbors)\n  * `HexagonCell2d` (hexagon cell with 6 neighbors)\n  * plugin presets: `GameOfLife2dPlugin`, `ImmigrationGame2dPlugin`,\n    `RainbowGame2dPlugin`, `WireWorld2dPlugin`, `CyclicAutomaton2dPlugin`\n* `3D`: Enables 3D types like:\n  * `MooreCell3d` (cube cell with 26 neighbors)\n  * `NeumannCell3d` (cube cell with 6 neighbors)\n  * plugin presets: `GameOfLife3dPlugin`, `ImmigrationGame3dPlugin`,\n    `RainbowGame3dPlugin`, `WireWorld3dPlugin`, `CyclicAutomaton3dPlugin`\n* `auto-coloring` (Example or debug purpose):\n  * The `CellState` trait now requires a `color` method\n* `bevy_reflect` (enabled by default): Enable support for reflection for\n  common types\n\n## Disclaimer\n\nThis is probably not the fastest rust implementation of a cellular automaton\nin rust. For example, using Gosper's [`HashLife`](https://www.drdobbs.com/jvm/an-algorithm-for-compressing-space-and-t/184406478) a classic game of life could be much faster.\n\nThis library aim is to be generic and dynamic, so that you can integrate\ncellular automata to any project in bevy, with any rules, in 2D or 3D.\n\n\u003c!-- cargo-sync-readme end --\u003e\n\n## Example projects\n\n### [Wire World][wireworld]\n\nThe [wireworld-rs][wireworld] project uses `bevy_life` and wireworld rules to simulate electrical systems.\n\n![Alt](./docs/2d_wireworld_demo.gif \"wireworld demo gif\")\n\n![Alt](./docs/2d_wireworld_flip_flop_demo.gif \"wireworld flip flop gate gif\")\n\n## Internal Examples\n\nFor every example pressing space reloads the board.\n\n\u003e Note: adding the release flag increases performance for examples\n\n### 2D Game of life\n\nRun `cargo run --example 2d_game_of_life --features auto-coloring`\n\n![Alt](./docs/2d_classic_demo.gif \"classic demo gif\")\n\n### 2D Immigration game\n\nRun `cargo run --example 2d_immigration_game --features auto-coloring`\n\n![Alt](./docs/2d_immigration_demo.gif \"immigration demo gif\")\n\n### 2D Rainbow game\n\nRun `cargo run --example 2d_rainbow_game --features auto-coloring`\n\n![Alt](./docs/2d_rainbow_demo.gif \"rainbow demo gif\")\n\n### 2D Cyclic colors\n\nRun `cargo run --example 2d_cyclic_colors --features auto-coloring`\n\n![Alt](./docs/2d_cyclic_demo.gif \"cyclic demo gif\")\n\n### 2D Rock paper scissor\n\nThis example showcases how to define custom rules\n\nRun `cargo run --example 2d_rock_paper_scissor`\n\n![Alt](./docs/2d_rock_paper_scissor_demo.gif \"rock paper scissor demo gif\")\n\n### 3D Game of life (4555 rule)\n\nRun `cargo run --example 3d_game_of_life --features \"3D auto-coloring\" --no-default-features`\n\n![Alt](./docs/3d_classic_demo.gif \"3D classic demo gif\")\n\n[wireworld]: https://github.com/ManevilleF/wireworld-rs \"Wire world project\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanevillef%2Fbevy_life","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanevillef%2Fbevy_life","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanevillef%2Fbevy_life/lists"}