{"id":31103599,"url":"https://github.com/fyr1981/cellular-simulator","last_synced_at":"2025-09-17T02:08:48.994Z","repository":{"id":310655973,"uuid":"1040425759","full_name":"Fyr1981/Cellular-Simulator","owner":"Fyr1981","description":"A high-performance artificial life simulation in C++17 using multithreading and data-oriented design.","archived":false,"fork":false,"pushed_at":"2025-08-26T13:34:39.000Z","size":15316,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-26T15:35:38.619Z","etag":null,"topics":["artifical-life","cmake","cpp","cpp17","data-oriented-design","game-development","multithreading","performance","portfolio-project","raylib","simulation"],"latest_commit_sha":null,"homepage":"","language":"C++","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/Fyr1981.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-08-19T00:53:35.000Z","updated_at":"2025-08-26T13:34:42.000Z","dependencies_parsed_at":"2025-08-19T13:38:41.077Z","dependency_job_id":"fe5c2d82-952a-45df-b7a2-bc7f359b2310","html_url":"https://github.com/Fyr1981/Cellular-Simulator","commit_stats":null,"previous_names":["fyr1981/cellular-simulator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Fyr1981/Cellular-Simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fyr1981%2FCellular-Simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fyr1981%2FCellular-Simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fyr1981%2FCellular-Simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fyr1981%2FCellular-Simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fyr1981","download_url":"https://codeload.github.com/Fyr1981/Cellular-Simulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fyr1981%2FCellular-Simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275521497,"owners_count":25479612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["artifical-life","cmake","cpp","cpp17","data-oriented-design","game-development","multithreading","performance","portfolio-project","raylib","simulation"],"created_at":"2025-09-17T02:08:43.496Z","updated_at":"2025-09-17T02:08:48.985Z","avatar_url":"https://github.com/Fyr1981.png","language":"C++","readme":"# Cellular Simulator\n\n[![Language](https://img.shields.io/badge/Language-C%2B%2B17-blue.svg)](https://isocpp.org/)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Platform](https://img.shields.io/badge/Platform-Windows-informational.svg)]()\n[![Documentation](https://img.shields.io/badge/Documentation-View_Here-brightgreen.svg)](https://fyr1981.github.io/Cellular-Simulator/)\n\nA high-performance, multithreaded artificial life simulation built from scratch in modern C++. Watch simple rules give rise to complex, evolving ecosystems.\n\n![Simulation Showcase GIF](Showcase.gif)\n\n## Key Features\n\n- **Massively Parallel Engine:** The core simulation loop is heavily parallelized using C++17 Parallel STL, capable of handling millions of agents at hundreds of updates per second.\n- **Genetic Evolution:** Agents (cells) are driven by a genome that defines their behavior. The `Divide` command includes a mutation chance, allowing for emergent strategies and evolution.\n- **Complex Agent Behavior:** Cells can perform actions like Photosynthesis, Movement (turning, moving forward), Eating other cells, and Division.\n- **Data-Oriented High-Performance Design:** Utilizes advanced patterns like Object Pooling, String Interning, and lock-free parallel algorithms to maximize performance.\n- **Interactive Experience:**\n    - Fully interactive 2D camera with smooth panning and zooming.\n    - Simulation controls (pause/resume, speed adjustment).\n    - Cell Inspector UI to view the genome and state of any cell in real-time.\n- **Configurable:** All simulation parameters can be tweaked in an external `config.json` file.\n\n## Tech Stack\n\n- **Language:** C++17\n- **Build System:** CMake\n- **Graphics \u0026 Input:** RayLib\n- **Configuration:** nlohmann/json\n- **Concurrency:** C++17 Parallel STL, `std::thread`, `std::mutex`, `std::atomic`\n\n## Building and Running\n\n### Prerequisites\n- A C++17 compliant compiler (e.g., MSVC, GCC, Clang)\n- CMake (version 3.16 or higher)\n- Git\n\n### Build Steps\n\n```bash\n# 1. Clone the repository\ngit clone https://github.com/your-username/CellularSimulator.git\ncd CellularSimulator\n\n# 2. Configure the project using CMake (dependencies will be fetched automatically)\ncmake -S . -B build\n\n# 3. Build the project\n# For multi-config generators (like Visual Studio), specify the config\ncmake --build build --config Release\n\n# 4. Run the application\n# The executable will be in the build/Release directory\n./build/Release/CellularSimulator.exe\n```\n\n### Configuration\nThe simulation can be customized by editing the config.json file located in the root directory. This file is automatically copied to the build output directory.\n\nExample config.json:\n```json\n{\n  \"window\": {\n    \"width\": 1920,\n    \"height\": 1080,\n    \"fullscreen\": true,\n    \"fps\": 60\n  },\n  \"simulation\": {\n    \"width\": 300,\n    \"height\": 300,\n    \"density\": 0.5,\n    \"ups\": 10,\n    \"seed\": 0,\n    \"max_update_time\": 0.1\n  },\n  \"cell\": {\n    \"genome_length\": 16,\n    \"initial_energy\": 100.0\n  }\n}\n```\n\n### Controls\n- LMB + Drag: Pan Camera\n- Mouse Wheel: Zoom Camera\n- RMB Click: Select a cell to inspect\n- Spacebar: Pause / Resume simulation\n- Left/Right Arrow: Decrease / Increase simulation speed (UPS)\n- F11: Toggle Fullscreen\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffyr1981%2Fcellular-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffyr1981%2Fcellular-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffyr1981%2Fcellular-simulator/lists"}