diff --git a/README.md b/README.md index fb4e0c8..b66aad0 100644 --- a/README.md +++ b/README.md @@ -1,84 +1,131 @@

- + Tetri5 Title Screen
+ Tetri5

-

A full featured game of falling shapes using python's pygame library.

+

A modern, full-featured falling blocks game built with Python and the Pygame library.

- -

Key Features • - How To Play • - Download • - + How to Play • + Installation • + Docker SupportContributingLicense

- tetri5 demo + Tetri5 Gameplay Demo

+--- + ## Key Features -##### Single Player Mode -Play a game against yourself where the goal is to accumalate as many points as you can! As you complete more lines the pieces will start to fall faster. Try and complete multiple lines at once for a higher score. +* 🎮 **Single Player Mode** – Enjoy solo gameplay where blocks fall faster as you clear more lines. +* 🧠 **Scoring System** – Rack up points by clearing multiple lines simultaneously. +* 🎛️ **Keyboard Controls** – Use the arrow keys to play (custom key bindings not currently supported). +* 💻 **Cross-Platform Compatibility** – Runs on Windows, Linux, and macOS. +* 🐳 **Docker Support** – Containerized for easy deployment and web-based play. -##### Multiplayer Mode (Online) -Play a game against a friend online where the first one to fill up their well looses! - -##### Game Mechanics -- [x] Rotate Right - Rotate piece clockwise -- [ ] Rotate Left - Rotate piece counter-clockwise -- [x] Soft Drop - Speed up a piece's downward motion -- [x] Hard Drop - Drop a piece on the stack with no delay -- [x] Lock Delay - The grace period before a piece locks on the stack -- [x] Wall Kick - Push a piece off the wall in a rotation if space does not allow -- [x] Next Piece- Show a user the next piece to enter the well +--- ## How to Play -##### Controls -- ⬆️ Rotate -- ⬅️ Move Left -- ➡️ Move Right -- ⬇️ Soft Drop -- [Space] Hard Drop +* Move blocks using the arrow keys. +* Rotate and position blocks to complete horizontal lines. +* Clear lines to earn points and speed up gameplay. +* The game ends when the stack reaches the top. -##### Multiplayer -After selecting `2 PLAYER` at the title screen you will be prompted to enter a Game ID. This ID can be any 6 characters that both players agree on. Once both players have entered their Game ID the game will start. +> 💡 Pro Tip: Clearing four lines at once (a "Tetris") earns the most points! -## Download +--- -You can download the latest build for your system by going [here](https://github.com/gio101046/tetri5/releases). +## Game Mechanics -If you would like to run the game by cloning this repository, you'll need [Git](https://git-scm.com/) and [Python 3](https://www.python.org/) installed on your system. From your command line: +* ✅ **Rotate Right** – Rotate a piece clockwise. +* ❌ **Rotate Left** – (Not yet implemented) Rotate a piece counter-clockwise. +* ✅ **Soft Drop** – Temporarily increase the fall speed of the current piece. +* ✅ **Hard Drop** – Instantly drop the piece to the bottom of the well. +* ✅ **Lock Delay** – A short grace period before the piece locks in place. +* ✅ **Wall Kick** – Allows rotation near walls when there isn't enough space. +* ✅ **Next Piece Preview** – Shows the next piece in the queue. + +--- + +## Installation + +Clone the repository and install the local development dependencies: ```bash -# clone this repository -$ git clone https://github.com/gio101046/tetri5.git - -# move into project directory -$ cd tetri5 - -# install python dependencies using pip -$ pip install -r requirements.txt - -# run the game -$ python main.py +git clone https://gitea.redturtle.foo/crayonix/tetri5.git +cd tetri5 +pip install -r requirements.local.txt ``` +To launch the game: + +```bash +python main.py +``` + +--- + +## Docker Support + +To build the Docker image: + +```bash +docker build -t tetri5 . +``` + +To run the game in a Docker container and access it via a web browser: + +```bash +docker run -p 3010:3010 tetri5 +``` + +Then open your browser and go to: + +``` +http://localhost:3010 +``` + +--- + ## Contributing -Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. + +Contributions are welcome! Here’s how to get started: + +1. Fork the repository +2. Create a new branch: + + ```bash + git checkout -b feature/my-feature + ``` +3. Make your changes and commit: + + ```bash + git commit -m "Add my feature" + ``` +4. Push to your fork: + + ```bash + git push origin feature/my-feature + ``` +5. Open a pull request on Gitea + +--- ## License -[MIT](https://choosealicense.com/licenses/mit/) +This project is licensed under the [FUTO Source Available License 1.0](LICENSE). -```TODO -pip install --target __pypackages__/3.12/lib/ websockets==15.0.1 -pip install --target __pypackages__/3.12/lib/ PyYAML==6.0.2 -``` \ No newline at end of file +--- + +

+Made with ❤️ using Python & Pygame +

diff --git a/gameplay.gif b/gameplay.gif new file mode 100644 index 0000000..2547fb2 Binary files /dev/null and b/gameplay.gif differ diff --git a/requirements.local.txt b/requirements.local.txt new file mode 100644 index 0000000..06d9128 --- /dev/null +++ b/requirements.local.txt @@ -0,0 +1,4 @@ +pygame==2.5.2 +pygbag==0.9.2 +PyYAML==6.0.2 +websockets==15.0.1