From ce648b3fdfb8aad40643d0ff7de7ab7ba015b388 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Sun, 2 Mar 2025 17:13:32 +0100 Subject: [PATCH] readme --- .gitignore | 2 + LICENSE | 21 ++++++++++ README.md | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 138 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..14879d4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +tmp +DS_Store diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9a1acf4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Ruidy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9094485 --- /dev/null +++ b/README.md @@ -0,0 +1,115 @@ +# Breakout Game in Go + +A classic Breakout game implementation in Go using the Ebitengine game library. Break all the bricks to win, but don't let the ball fall below your paddle! + +## Game Features + +- Rainbow-colored bricks with depth-based scoring +- Smooth paddle and ball movement +- Score tracking +- Game over state with restart option + +## Installation Requirements + +1. Go 1.21 or later +2. Ebitengine dependencies (automatically handled by Go modules) + +### System Dependencies + +#### For macOS: + +```sh +brew install go +``` + +#### For Linux (Ubuntu/Debian): + +```sh +sudo apt-get update +sudo apt-get install golang-go +sudo apt-get install libgl1-mesa-dev xorg-dev +``` + +#### For Windows: + +1. Download and install Go from [golang.org](https://golang.org/dl/) +2. Install GCC (required for Ebitengine) via [MinGW](http://mingw-w64.org/doku.php) or [MSYS2](https://www.msys2.org/) + +## How to Run + +1. Clone the repository: + +```sh +git clone +cd breakout +``` + +2. Install dependencies: + +```sh +go mod tidy +``` + +3. Run the game: + +```sh +go run main.go +``` + +## Game Rules + +1. Control the paddle to prevent the ball from falling below +2. Break bricks by hitting them with the ball +3. Different colored bricks award different points: + - Red (top row): 50 points + - Orange: 40 points + - Yellow: 30 points + - Green: 20 points + - Blue (bottom row): 10 points +4. Game ends when the ball falls below the paddle +5. Maximum possible score: 1,500 points + +## Controls + +- **Left Arrow**: Move paddle left +- **Right Arrow**: Move paddle right +- **Space**: Restart game after game over + +## Game Mechanics + +- The ball bounces off walls, the paddle, and bricks +- Ball direction gets slightly randomized when hitting the paddle +- Breaking all bricks is a win condition +- Higher bricks are worth more points but are harder to reach + +## Development + +The game is built using: + +- Go programming language +- [Ebitengine](https://ebitengine.org/) for game development +- Standard library for core functionality + +### Project Structure + +``` +breakout/ +├── main.go # Main game code +├── go.mod # Go module file +├── go.sum # Go module checksum +└── README.md # This file +``` + +## Contributing + +Feel free to fork the repository and submit pull requests. Some ideas for improvements: + +- Add sound effects +- Implement different levels +- Add power-ups +- Add high score tracking +- Add different ball speeds or paddle sizes + +## License + +This project is open source and available under the MIT License.