{"id":19901219,"url":"https://github.com/rbaltrusch/pygame_examples","last_synced_at":"2025-07-27T02:34:32.632Z","repository":{"id":45201913,"uuid":"367441344","full_name":"rbaltrusch/pygame_examples","owner":"rbaltrusch","description":"A repository for short pygame drafts, examples, tutorials and more!","archived":false,"fork":false,"pushed_at":"2023-12-16T10:55:01.000Z","size":13433,"stargazers_count":32,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-02T23:35:52.876Z","etag":null,"topics":["examples","game-development","gamedev","pygame","pygame-basics","pygame-examples","pygame2","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","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/rbaltrusch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-05-14T17:55:18.000Z","updated_at":"2025-04-20T03:44:33.000Z","dependencies_parsed_at":"2025-05-02T23:31:42.267Z","dependency_job_id":"b781ba38-76f0-4fa0-819e-36b3f6d9e314","html_url":"https://github.com/rbaltrusch/pygame_examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rbaltrusch/pygame_examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbaltrusch%2Fpygame_examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbaltrusch%2Fpygame_examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbaltrusch%2Fpygame_examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbaltrusch%2Fpygame_examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbaltrusch","download_url":"https://codeload.github.com/rbaltrusch/pygame_examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbaltrusch%2Fpygame_examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267289404,"owners_count":24064726,"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-07-27T02:00:11.917Z","response_time":82,"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":["examples","game-development","gamedev","pygame","pygame-basics","pygame-examples","pygame2","python","python3"],"created_at":"2024-11-12T20:14:24.652Z","updated_at":"2025-07-27T02:34:32.614Z","avatar_url":"https://github.com/rbaltrusch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Pylint](https://github.com/rbaltrusch/pygame_examples/actions/workflows/pylint.yml/badge.svg)](https://github.com/rbaltrusch/pygame_examples/actions/workflows/pylint.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-purple.svg)](https://opensource.org/licenses/MIT)\n\n# Pygame examples\n\nA repository for short pygame drafts, examples, tutorials and more!\n\nCurrently, this repository contains a draft lighting system, a particle system, a networked game, a hexogonal tile system, a cloth simulation and other cool pygame examples.\n\n![Gif of the particle effects](https://github.com/rbaltrusch/pygame_examples/blob/master/media/particle_effects.gif?raw=true \"Gif of the particle effects\")\n![Gif of the lighting system](https://github.com/rbaltrusch/pygame_examples/blob/master/media/lighting_system.gif?raw=true \"Gif of the lighting system\")\n![Gif of the hexagonal tile map](media/hexagons.gif?raw=true \"Gif of the hexagonal tile map\")\n![Gif of a red light source](media/red_light.gif?raw=true \"Gif of a red light source\")\n![Gif of an evolution simulation](media/evolution_sim.gif?raw=true \"Gif of an evolution simulation\")\n![Gif of the cloth simulation](media/cloth_sim2.gif?raw=true \"Gif of the cloth simulation\")\n\n## Getting started\n\nTo get a copy of this repository, simply open up git bash in an empty folder and use the command:\n\n    $ git clone https://github.com/rbaltrusch/pygame_examples\n\nDependencies can be installed using the requirements.txt as below:\n\n```\npip install -r requirements.txt\n```\n\nTo run some of the examples, navigate to the respective folder in the code folder, then run main.py.\n\n## Contents\n\nThis repository contains the following small pygame examples:\n- [Particle system](code/particle_system): contains a simple, but effective, particle system implementation.\n- [Evolution simulation](code/evolution_simulation): contains a simple simulation of evolving animals hunting for food.\n- [Cloth simulation](code/cloth_simulation): contains a cloth simulation with custom physics.\n- [Conway's game of life](code/conway_sim): contains a simulation of Conway's game of life.\n- [Game console](code/game_console): contains a minimal implementation of an in-game console.\n- [Animation testing tool](code/animator): can be used to test out animations. Contains a fully featured in-game console with a decoupled and flexible design.\n- [Networked game](code/networked_game): contains a minimal implementation of a networked game, featuring one external server and two separate clients, communicating with each other through the server.\n- [Dynamic lighting](code/simple_lighting): contains a small draft implementation for dynamic in-game lighting.\n- [Hexagonal grid](code/hexagonal_tiles): contains an implementation of a hexagonal grid, including collision handling.\n- [Tidy event queue](code/tidy_event_queue): contains an exercise in decoupling complex pygame event handling constructs into separate parts.\n- [Async events](code/async_events): contains an example implementation for an asynchronous event handler (useful for writing linear-looking code for events with execution spread out over multiple game cycles).\n- [Squish and stretch](code/squish_and_stretch): contains an example implementation of squishing and stretching an image.\n- [Timed events](code/timed_events): contains an implementation of callbacks executed after a specified delay. Not pygame-specific.\n- [Random starry sky](code/random_screen_animation): generates a random starry sky.\n\n## Contributions\n\nTo contribute to this repository, please read the [contribution guidelines](CONTRIBUTING.md).\n\n## Python\n\nWritten in Python 3.8.3.\n\n## License\n\nThis repository is open-source software available under the [MIT license](https://github.com/rbaltrusch/pygame_examples/blob/master/LICENSE).\n\n## Contact\n\nPlease raise an issue for code changes. To reach out, please send an email to richard@baltrusch.net.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbaltrusch%2Fpygame_examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbaltrusch%2Fpygame_examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbaltrusch%2Fpygame_examples/lists"}