{"id":30791886,"url":"https://github.com/sidojain/tetris-v2","last_synced_at":"2026-04-11T08:02:48.868Z","repository":{"id":312307000,"uuid":"1046823987","full_name":"SidoJain/Tetris-V2","owner":"SidoJain","description":"Tetris game in PyGame using a Flask server for the high score.","archived":false,"fork":false,"pushed_at":"2025-08-31T09:53:43.000Z","size":257,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-05T22:46:49.491Z","etag":null,"topics":["flask","pygame","python","redis","tetris"],"latest_commit_sha":null,"homepage":"https://tetris-v2-backend.vercel.app","language":"Python","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/SidoJain.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-29T09:30:41.000Z","updated_at":"2025-08-31T09:53:46.000Z","dependencies_parsed_at":"2025-08-29T19:53:30.340Z","dependency_job_id":"b28e0b8f-afc4-4c3a-a034-97df85b229b1","html_url":"https://github.com/SidoJain/Tetris-V2","commit_stats":null,"previous_names":["sidojain/tetris-v2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SidoJain/Tetris-V2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SidoJain%2FTetris-V2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SidoJain%2FTetris-V2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SidoJain%2FTetris-V2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SidoJain%2FTetris-V2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SidoJain","download_url":"https://codeload.github.com/SidoJain/Tetris-V2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SidoJain%2FTetris-V2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31673068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"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":["flask","pygame","python","redis","tetris"],"created_at":"2025-09-05T15:08:01.379Z","updated_at":"2026-04-11T08:02:48.823Z","avatar_url":"https://github.com/SidoJain.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tetris\n\nA classic Tetris game implemented in Python using the Pygame library. The game features smooth piece movement, rotation, line clearing, scoring, and a highscore server integration using a Flask backend and Redis storage.\n\n## Features\n\n- Seven classic Tetris pieces (I, O, T, S, Z, J, L) with rotation and spawning positions.\n- Smooth piece falling with adjustable fall speed and fast drop.\n- Line clearing with scoring based on the number of lines cleared simultaneously (1 to 4).\n- Score and highscore tracking with server integration for storing and fetching highscores using Flask.\n- Sidebar displaying next piece preview, current score, highscore, FPS, drop speed, and controls.\n- Adjustable FPS for performance tuning.\n- Game over screen with options to restart or quit.\n- Robust piece and board collision detection for valid moves.\n- Responsive keyboard controls for move, rotate, soft drop, and hard drop.\n- Music and animations for moves.\n\n## Requirements\n\n- Python 3.7+\n- Pygame\n- Requests\n- Python-dotenv\n- numpy\n\nAll requirements will be installed through requirements.txt\n\n## Installation\n\n1. Clone the repository or download the source code.\n\n    ```bash\n    git clone https://github.com/SidoJain/Tetris-V2.git\n    ```\n\n2. Install the required Python packages using pip:\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n3. Create a `.env` file in the project root with the following content:\n\n    ```.env\n    TETRIS_SERVER_URL=https://tetris-v2-backend.vercel.app\n    ```\n\n    If you do not provide a server URL, the game won't connect to the highscore server and any highscore operation will not be completed.\n\n## Usage\n\nRun the game with:\n\n```bash\ncd scripts/\npython tetris.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidojain%2Ftetris-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidojain%2Ftetris-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidojain%2Ftetris-v2/lists"}