{"id":27777826,"url":"https://github.com/mwja/rust-galaxies","last_synced_at":"2026-03-04T01:15:25.321Z","repository":{"id":136001056,"uuid":"364351298","full_name":"mwja/rust-galaxies","owner":"mwja","description":"Simple galaxy/star simulation engine in Rust","archived":false,"fork":false,"pushed_at":"2021-05-14T20:16:38.000Z","size":20,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-11T08:36:05.352Z","etag":null,"topics":["galaxies","planets","rust","rust-lang","simulation","star","velocity"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mwja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-05-04T18:33:53.000Z","updated_at":"2024-04-25T09:37:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b121017-c0ad-4d36-b57b-912e24b28f45","html_url":"https://github.com/mwja/rust-galaxies","commit_stats":null,"previous_names":["jacobmacweb/rust-galaxies","raclettes/rust-galaxies","mwja/rust-galaxies"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mwja/rust-galaxies","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwja%2Frust-galaxies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwja%2Frust-galaxies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwja%2Frust-galaxies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwja%2Frust-galaxies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mwja","download_url":"https://codeload.github.com/mwja/rust-galaxies/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwja%2Frust-galaxies/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30067971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T01:03:42.280Z","status":"ssl_error","status_checked_at":"2026-03-04T01:03:23.410Z","response_time":61,"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":["galaxies","planets","rust","rust-lang","simulation","star","velocity"],"created_at":"2025-04-30T07:50:11.770Z","updated_at":"2026-03-04T01:15:25.288Z","avatar_url":"https://github.com/mwja.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Galaxies\nSimple galaxy simulation in Rust\n\n## Features\n- Attempts to handle collisions by checking their relative velocities\n- Traces future paths *by simulating seperately* (as shown below)\n\n  ![Path tracing](https://i.discord.fr/Aj6.png)\n  ![Zoomed in](https://i.discord.fr/HBh.png)\n\n## Config\nThe default configuration file looks like:\n```yaml\ngalaxies:\n  - star:\n      mass: 2000000.0\n      color: [1.0, 1.0, 0.0, 1.0]\n    planets:\n      distance:\n        min: 10\n        max: 30\n      mass:\n        min: 1\n        max: 50\n      number: 250\n    position: [60.0, 60.0]\n    direction: 1.0\n  - star:\n      mass: 1000000.0\n      color: [1.0, 1.0, 0.0, 1.0]\n    planets:\n      distance:\n        min: 10\n        max: 30\n      mass:\n        min: 1\n        max: 50\n      number: 250\n    position: [-60.0, -60.0]\n    direction: -1.0\nscale: 1.0\ntime_scale: 1.0\n```\n\nThis has 3 components:\n- `galaxies`, which refers to the structures that will be generated. Each contains information about the central star, planets' distances and masses, the position in the world and the direction of the planets' orbits. Planets will then be generated randomly about the star with the given velocity `v = sqrt((M_star+m_planet)/distance)`.\n- `scale` refers to the screen:real ratio when drawing. Bigger numbers are more zoomed in, smaller numbers are more zoomed out.\u003csup\u003e1\u003c/sup\u003e\n- `time_scale` refers to the passing of time. This, alongside the frame rate, affects the simulation's speed. All forces and velocities are multiplied by `dt * time_scale`\u003csup\u003e2\u003c/sup\u003e\n\n**1**: Use \u003ckbd\u003eZ\u003c/kbd\u003e to zoom out, \u003ckbd\u003eX\u003c/kbd\u003e to zoom in\n\n**2**: Use \u003ckbd\u003eA\u003c/kbd\u003e to slow down time, \u003ckbd\u003eS\u003c/kbd\u003e to speed up time.\n\nYou can also use the arrow keys to move around.\n\n## Running\nAs always, use\n\n```bash\ncargo run\n```\n\nTo build and run.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwja%2Frust-galaxies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwja%2Frust-galaxies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwja%2Frust-galaxies/lists"}