{"id":18763294,"url":"https://github.com/eiberham/tetris","last_synced_at":"2025-12-06T00:30:15.702Z","repository":{"id":242403238,"uuid":"805837697","full_name":"eiberham/tetris","owner":"eiberham","description":":black_square_button: Classic tetris built with ggez + firebase","archived":false,"fork":false,"pushed_at":"2024-06-12T03:07:50.000Z","size":1486,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T05:24:26.010Z","etag":null,"topics":["firebase-realtime-database","game-development","ggez","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/eiberham.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":"2024-05-25T15:50:11.000Z","updated_at":"2024-11-07T05:49:01.000Z","dependencies_parsed_at":"2024-06-12T06:49:50.501Z","dependency_job_id":null,"html_url":"https://github.com/eiberham/tetris","commit_stats":null,"previous_names":["eiberham/tetris"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiberham%2Ftetris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiberham%2Ftetris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiberham%2Ftetris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiberham%2Ftetris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eiberham","download_url":"https://codeload.github.com/eiberham/tetris/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239661793,"owners_count":19676409,"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":["firebase-realtime-database","game-development","ggez","rust"],"created_at":"2024-11-07T18:25:38.377Z","updated_at":"2025-12-06T00:30:15.617Z","avatar_url":"https://github.com/eiberham.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tetris\nThis is a fun and challenging block puzzle game built with rust and the ggez game engine.\n\n\u003e In Tetris, players complete lines by moving differently shaped pieces (tetrominoes), which descend onto the playing field. The completed lines disappear and grant the player points, and the player can proceed to fill the vacated spaces. The game ends when the uncleared lines reach the top of the playing field. The longer the player can delay this outcome, the higher their score will be\n\n## Features \n\n- Background music.\n- Move and rotate tetrominoes with the arrow keys.\n- You can quickly drop the block by holding the down arrow key.\n- Instructions on how to create a installer for mac operating systems.\n- You can pause the game.\n- Cloud storage of record score and current score display.\n\n## :video_game: Controls \n\n- Rotate and move the tetromino around by pressing arrows.\n- `P` key to pause and resume the game.\n- Escape key to close the game.\n\n## Screenshots\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./intro.png\" alt=\"snake\" style=\"margin: 1rem;\" /\u003e\n  \u003cimg src=\"./game.png\" alt=\"snake\" style=\"margin: 1rem;\" /\u003e\n\u003c/p\u003e\n\n### How to run it locally :question:\n\nFirst make sure you create a `.env`following the format outlined in the `.env_sample`file.\nGo ahead and create a new realtime database on firebase with the `score` node. The format should be:\n\n```shell\n{\n  \"score\": {\n    \"value\": 0\n  }\n}\n```\n\nThe database rules should be defined this way:\n\n```shell\n{\n  \"rules\": {\n    \".read\": \"auth != null\",\n    \".write\": false\n  }\n}\n```\nOnce you have everything setup, update your `.env`.\nThen run the following commands on the terminal:\n\n```shell\nfoo@bar:~$ git clone https://github.com/eiberham/tetris.git\nfoo@bar:~$ cd tetris\nfoo@bar:~$ cargo run\n```\n\n### Create an installer for mac\n\nThis is the way I managed to build the app's bundle and create a `.dmg` file, following the [documentation](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/20001119-110730) you can get an idea of how the bundle folder structure is.\n\nSimply run the `build.sh` script within the `src/scripts` folder, you'll get a `.dmg` file within the macos folder:\n\n```shell\nfoo@bar:~$ cd tetris\nfoo@bar:~$ sh src/scripts/build.sh\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiberham%2Ftetris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feiberham%2Ftetris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiberham%2Ftetris/lists"}