{"id":15374823,"url":"https://github.com/com8/slime_sim","last_synced_at":"2026-02-19T11:03:15.079Z","repository":{"id":108909126,"uuid":"526991918","full_name":"COM8/slime_sim","owner":"COM8","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-09T09:54:38.000Z","size":3460,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T09:54:55.843Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/COM8.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":"2022-08-20T17:16:07.000Z","updated_at":"2025-03-09T09:54:42.000Z","dependencies_parsed_at":"2024-11-06T07:10:51.358Z","dependency_job_id":"d3ab206c-3301-40bb-8033-09c705a7787a","html_url":"https://github.com/COM8/slime_sim","commit_stats":{"total_commits":36,"total_committers":2,"mean_commits":18.0,"dds":0.08333333333333337,"last_synced_commit":"0cc3b49ba49d91bd8abd9197898f2e50e1e5cfb9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/COM8/slime_sim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/COM8%2Fslime_sim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/COM8%2Fslime_sim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/COM8%2Fslime_sim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/COM8%2Fslime_sim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/COM8","download_url":"https://codeload.github.com/COM8/slime_sim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/COM8%2Fslime_sim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29611002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T10:52:55.328Z","status":"ssl_error","status_checked_at":"2026-02-19T10:52:26.323Z","response_time":117,"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":[],"created_at":"2024-10-01T13:59:50.833Z","updated_at":"2026-02-19T11:03:15.062Z","avatar_url":"https://github.com/COM8.png","language":"C++","readme":"# Slime Simulator\n\nA customizable slime simulation using OpenGL compute shaders to simulate thousands of slime spores/entities in real-time on the GPU.\n\n![Example image when executing the application](images/example.png)\n\n## GPU vs CPU Rendering\n\nTo compare performance between a GPU and CPU-based implementation we can use the `LIBGL_ALWAYS_SOFTWARE` environment variable. Setting it to `1` will force OpenGL to use software rendering on the CPU instead of the GPU.\n\n### Examples\n\nForce the usage of a software-based rendering approach. This uses the CPU to do all GPU-related tasks in software instead of directly on hardware. On Linux, this most likely will result in using [`LLVMpipe`](https://docs.mesa3d.org/drivers/llvmpipe.html).\n```\n# From inside the `build` directory\nLIBGL_ALWAYS_SOFTWARE=1 ./src/sSim\n```\n\nUse the default best renderer. In case a hardware-accelerated one like an (i)GPU is available this one will be used.\n```\n# From inside the `build` directory\nLIBGL_ALWAYS_SOFTWARE=0 ./src/sSim\n```\n\n### Power Consumption\n\nTo compare power consumption between software and hardware rendering on the CPU and its iGPU we can read the [model-specific register](https://en.wikipedia.org/wiki/Model-specific_register) to get the current CPU package power consumption.\nIn order to simplify this task we use [`turbostat`](https://www.linux.org/docs/man8/turbostat.html). It's a part of the `kernel-tools` package (`sudo dnf install kernel-tools`).\n\n```\nsudo turbostat --Summary --quiet --interval 1 --show GFXWatt --show CorWatt --show PkgWatt\n```\n\n* `GFXWatt` Watts consumed by the Graphics part of the package -- available only on client processors.\n* `CorWatt` Watts consumed by the core part of the package.\n\nWith [`ttyplot`](https://github.com/tenox7/ttyplot):\n```\nsudo turbostat --Summary --quiet --interval 1 --show GFXWatt --show CorWatt --show PkgWatt | gawk '{print $1+$2, \"\\t\", $3; fflush();}' | ttyplot -2 -s 30 -t \"CPU/iGPU Watt\" -u \"Watt\"\n```\n\n## Known Issues\n\n**Q:** Rendering fails/no new images get rendered.\u003cbr\u003e\n**A:** You are trying to run this on your integrated GPU and rendering a single frame takes too long. Try reducing the number of agents (`INITIAL_NUM_SLIMES`) in `src/sim/Simulation.hpp`. This happens since Linux or in turn, the mesa driver wants to prevent your system from hanging and therefore it kills all GPU jobs that run for more than a specific amount of time without returning. More information:\n\n* Radeon driver: https://docs.mesa3d.org/envvars.html#envvar-RADV_DEBUG\n* Intel driver: https://www.intel.com/content/www/us/en/docs/oneapi-hpc-toolkit/get-started-guide-linux/2023-0/before-you-begin.html#HPCHANGCHECK\n\n## Building\n\n### Requirements\n\n#### Fedora\n\n```\nsudo dnf install gtkmm4.0-devel libadwaita-devel libcurl-devel g++ clang cmake git\nsudo dnf install mesa-libEGL-devel glslc glslang\n```\n\n### Compiling\n\n```\ngit clone https://github.com/COM8/slime_sim.git\ncd slime_sim\nmkdir build\ncd build\ncmake ..\ncmake --build .\n```\n\n### Execution\n\n```\n# From inside the `build` directory\n./src/sSim\n```\n\n### Installing\n\n```\n# From inside the `build` directory\nsudo cmake --build . --target install\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcom8%2Fslime_sim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcom8%2Fslime_sim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcom8%2Fslime_sim/lists"}