{"id":29345573,"url":"https://github.com/peter-l-svk/tetris-pygame","last_synced_at":"2025-07-08T15:28:46.032Z","repository":{"id":302642518,"uuid":"1013141888","full_name":"Peter-L-SVK/tetris-pygame","owner":"Peter-L-SVK","description":"Example of a Tetris game in python3 and pygame framework","archived":false,"fork":false,"pushed_at":"2025-07-03T12:49:44.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-03T13:31:05.958Z","etag":null,"topics":["pygame","pygame-games","python","python-3","python3","tertris","tetris-clone","tetris-game"],"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/Peter-L-SVK.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,"zenodo":null}},"created_at":"2025-07-03T12:26:01.000Z","updated_at":"2025-07-03T12:49:47.000Z","dependencies_parsed_at":"2025-07-03T13:32:32.302Z","dependency_job_id":"dc79ce4a-7203-46e3-89c6-3ca4079e526a","html_url":"https://github.com/Peter-L-SVK/tetris-pygame","commit_stats":null,"previous_names":["peter-l-svk/tetris-pygame"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Peter-L-SVK/tetris-pygame","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter-L-SVK%2Ftetris-pygame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter-L-SVK%2Ftetris-pygame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter-L-SVK%2Ftetris-pygame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter-L-SVK%2Ftetris-pygame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Peter-L-SVK","download_url":"https://codeload.github.com/Peter-L-SVK/tetris-pygame/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Peter-L-SVK%2Ftetris-pygame/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264295465,"owners_count":23586522,"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":["pygame","pygame-games","python","python-3","python3","tertris","tetris-clone","tetris-game"],"created_at":"2025-07-08T15:28:43.236Z","updated_at":"2025-07-08T15:28:46.022Z","avatar_url":"https://github.com/Peter-L-SVK.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tetris Game with Pygame\n\nA classic Tetris implementation built with Python and Pygame, featuring modern enhancements like high score tracking and multiple game screens.  \n![Tetris](scrshots/demo.png)   ![Tetreis](scrshots/demo2.png) \n## Features\n\n- 🎮 Classic Tetris gameplay with all 7 tetromino pieces\n- 🏆 Persistent high score tracking (top 10 scores)\n- 📛 Player name entry for high scores\n- 📊 Dedicated high score viewing screen\n- 🎨 Clean, responsive interface\n- ⚙️ Modular code structure for easy maintenance\n\n## Requirements\n\n- Python 3.6+\n- Pygame 2.0+\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/pygame-tetris.git\n   cd pygame-tetris\n   ```\n\n2. Install dependencies:\n   ```bash\n   pip install pygame\n   ```\n\n## How to Play\n\n### Controls\n- **Left/Right Arrow**: Move piece horizontally\n- **Up Arrow**: Rotate piece\n- **Down Arrow**: Accelerate piece downward\n- **ESC**: Return to previous screen (from high scores)\n\n### Game Screens\n1. **Main Menu**:  \n   '1.' - Play Game  \n   '2.' - View High Scores  \n   '3.' - Quit  \n\n2. **Game Screen**:\n   - Current score display  \n   - Next piece preview  \n   - Standard Tetris gameplay  \n\n3. **Game Over Screen**:  \n   - Enter your name for high scores  \n   - Options to play again, view scores, or quit  \n\n4. **High Scores Screen**:  \n   - Displays top 10 scores  \n   - Press ESC to return  \n\n5. **Credits Screen**:  \n   - Scrolling credits from bottom to top  \n   - Adjustable scroll speed  \n   - Press ESC to return  \n\n## File Structure\n\n```\ntetris/\n├── tetris.py         # Main game logic\n├── tetromino.py      # Tetromino class definition\n├── lib.py            # Helper functions and screens\n└── highscores.json   # Auto-generated high score storage\n```\n\n## Running the Game\n\nExecute the main script:\n```bash\npython tetris.py\n```\n\n## Customization\n\nYou can modify these game constants in `tetris.py`:\n- `BLOCK_SIZE`: Change the size of blocks\n- `GRID_WIDTH/HEIGHT`: Adjust playing field dimensions\n- `fall_speed`: Change the initial falling speed\n\n## Troubleshooting\n\nIf you encounter issues:\n1. Ensure you have the latest version of Pygame:\n   ```bash\n   pip install --upgrade pygame\n   ```\n2. Verify Python version (3.6+ required)\n3. Delete `highscores.json` if you experience score-related issues\n\n## Contributing\n\nContributions are welcome! Please open an issue or pull request for any:\n- Bug fixes\n- New features\n- Code improvements\n- Documentation updates\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-l-svk%2Ftetris-pygame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-l-svk%2Ftetris-pygame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-l-svk%2Ftetris-pygame/lists"}