{"id":24955126,"url":"https://github.com/jrie/cgol","last_synced_at":"2025-03-28T20:14:25.196Z","repository":{"id":83346220,"uuid":"112086701","full_name":"jrie/cgol","owner":"jrie","description":"An advanced conway game of life simulator in C","archived":false,"fork":false,"pushed_at":"2020-06-19T18:04:15.000Z","size":15424,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T05:28:36.721Z","etag":null,"topics":["animations","conway","conway-game","conway-s-game-of-life","graphics","histogram","history","image-processing"],"latest_commit_sha":null,"homepage":"","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/jrie.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}},"created_at":"2017-11-26T13:55:04.000Z","updated_at":"2024-09-03T05:30:42.000Z","dependencies_parsed_at":"2023-03-12T18:00:03.158Z","dependency_job_id":null,"html_url":"https://github.com/jrie/cgol","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrie%2Fcgol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrie%2Fcgol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrie%2Fcgol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrie%2Fcgol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrie","download_url":"https://codeload.github.com/jrie/cgol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093184,"owners_count":20722402,"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","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":["animations","conway","conway-game","conway-s-game-of-life","graphics","histogram","history","image-processing"],"created_at":"2025-02-03T05:24:13.232Z","updated_at":"2025-03-28T20:14:25.189Z","avatar_url":"https://github.com/jrie.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cgol\nA Conway game of life simulator\n\nVideo demo: [cgol - feature video demo](https://dwrox.net/conway_preview.webm)\n\n## Compilation\nRequirements for compilation are `gcc`, `make` and `pkg-config` and the following libraries:\n* libpng\n* libcairo2\n* libsdl2\n* libsdl2-image2\n\nCompile using `make` under Linux. For Windows, you can use `Msys2` and `make -f Makefile_win` but this version seemed to have some drawbacks while in \"painting mode\".\n\nOn \"Ubuntu 16.04\" - you have to change the line number 650:\n\n`sprintf(gameOptions-\u003emessage, message);`\n\nto\n\n`sprintf(gameOptions-\u003emessage, \"%63s\", message);`\n\nThis might be in reason of the gcc version on Ubuntu 16.04 LTS.\n\n\n## Welcome to Conway's Game of life ##\n\nThis is a competition entry for the IT-Talents.de coding competition.\nBy Jan R. - Version date: September 25th 2017.\n\nEnter `cgol -h` to show the help which is much recommended\n\n\n### GENERAL HELP\n\nThis is Conway's Game of life.\nYou can either paint living cells, using the mouse in paint mode\nor drag and drop a 32 bit png with alpha channel into the game window,\nthis will generate a cell map varying from the image.\n\nImages should be equal in there dimensions in order to reach the best effect.\nFor example a one by one ratio, divisble by the cells in x and y to the image pixel dimensions.\nFor generation you could use TheGimp or save out images from the game using `s` key.\nExample images are incuded which are all consisting of 32bit PNG images with alpha.\n\n### SAVING IMAGES AND DRAG AND DROP\n\nIf you want to save an image, you can do so by pressing `s` key.\nIt is then saved to the folder `saved_images/TIMESTAMP.png`.\nThe routine saves everything except the grid and the message displayed inside the game window.\nThose images can be reimported into the application, like other images, by drag and drop.\n\nNote that CAIRO backend png's, switch `-cb`, cannot directly be imported as they are missing the alpha channel.\nYou have to use TheGimp or similiar to add an alpha channel, then import is working!\n\n### INFO PANEL USAGE\n\nIf the history is enabled (\"h\" key) - and the info panel enabled,\nthree bars are shown at the bottom of the screen. When the mouse is moved on\ntop of those bars, either:\n\t- Stable cells are shown, which didnt change in this turn or survived\n\t- Born cells. cells which did become born during a turn\n\t- Dead cells, which died during this turn\n\nIf you hover over the corresponding bar, you see the exact cells highlighted.\nAnd there counts are always displayed on the bars.\n\n### AVAILABLE COMMANDS\n`-h`: This help\n\n`-c5 ... 250`: Amount of cells in x and y by one number from 5 to 250 (default: 50)\n\n`-ct0.0 ... 1.0`: Floating point value 0.5 for 50 percent color threshold (default: 0.85) (rgb added together and averaged) for living cell image generation, below the set value\n\n`-mfc0.0 ... 1.0`: Maximum fit cells for random number generator (default 0.4)\n\nStart options of boolean type either 0/1 or t/f AND (also in game options/keybindings):\n\n`-gBOOL` or [KEY]: Grid enabled (t)rue or 1 or disabled (f)alse or 0 - (`g key` in game)\n\n`-aBOOL` or [KEY]: Animations enabled or disabled (`a key` in game to toggle)\n\n`-htBOOL` or [KEY]: History enabled or disabled (Toggled using `h key` in game)\n\n`-iBOOL` or [KEY]: Draw infopanel when history is enabled and one turn is processed (Toggled with `i key`)\n\n`-r` or [KEY]: Should the game start with a random playboard, be regenerated with a random playboard (`r key` in game)\n\n`-cb`: Should cairo's png functions be used instead of libpng to save images Cairo backend images cannot be imported directly! Please read the help for more information.\n\n[KEY] `s`: Saves the actual scene, including the info panel if displayed (\"s\" key in game)\n\n[KEY] `+` (not numpad): Decrease game ticks and increase game speed (`+ key` in game)\n\n[KEY] `,`: Go back in history, if enabled (`, key` in game)\n\n[KEY] `.`: Go forward in history, if enabled (`. key` in game)\n\n[KEY] `c`: Clear game board (`c key` in game)\n\n[KEY] `p`: Paint mode (`p key` in game)\n\n[KEY] `Space` :Play/Pause the game (`space key` in game)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrie%2Fcgol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrie%2Fcgol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrie%2Fcgol/lists"}