cis3296f24 / Section4-ProjectPresentation

cis3296f24-classroom-project-presentation-ProjectsFeedbackBoard-template created by GitHub Classroom
0 stars 0 forks source link

Two-Player Tetris (Pygame) #5

Open TonyGao777 opened 3 days ago

TonyGao777 commented 3 days ago

Two-Player Tetris (Pygame)

Project Abstract

Two-player Tetris allows the user to enjoy a competitive game of Tetris with the options of single-player, local PVP (player versus player), and bot. The user can select the gaming mode from the games menu. The game will populate and colored blocks called “tetrominoes” will start falling from the top of the window. While the tetrominoes fall, the user can rotate or move the pieces horizontally. The goal of the game is to create lines of horizontal blocks. Once a line of tetrominoes forms, that line disappears and all the blocks on top of that line move down by one square. A counter will record the number of lines completed by the player. Players can compete with friends on the number of lines completed. Players can also choose to play against a bot. The game ends when the blocks aren’t cleared and stacked to the top of the window.

Conceptual Design

The design will be based on the game Tetris. The project will be written using Python and Pygames. There will be a menu for selecting different game modes. A display window will display a grid of squares. There wouldn’t be any need for art assets since the game is just colored blocks. If the user chooses multiplayer, then two displays will populate. The two displays will use the same body of code. If the user chooses bot mode, then one of the two displays will be played using an algorithm. There wouldn’t be any additional APIs or frameworks. Pygame is cross-platform compatible.

Proof of Concept

https://github.com/youwayx/tetris-battle This project demonstrates how multiplayer Tetris can be created using Pygames. The game is run through an IDE and requires Python 2.7. There are clear instructions on compiling and running the code in the repository's readme. https://github.com/xzys/tetris-multiplayer?tab=readme-ov-file This project is an example of how a two-player Tetris can be created using Python. The game is run through the terminal. It uses python2 and runs on Linux and Mac. This additional project is included because of the clean user interface. There are clear instructions on compiling and running the code in the repository's readme.

Background

The project will focus on the multiplayer and bot experience. Most existing multiplayer Tetris projects like “Tetris-Battle” and “Tetris-Multiplayer” don’t include a bot mode. This project will deploy a bot. The bot will play Tetris using an algorithm-based procedure. The focus of the bot would be to fill in the gaps of the horizontal blocks. Many Tetris projects run from an IDE or terminal. Two-player Tetris will also run from an IDE. In addition, the two-player mode is inspired by “Tetris-Battle” and is played on one keyboard. The projects listed above are similar open source projects. This project will be using those projects as a guide to breaking down the design processes of creating Tetris. However, the code for this project will be written from scratch so that the code will be compatible with the bot script.

The citations for the named repositories are shown below.

Project Slide: https://docs.google.com/presentation/d/1gVC9ySkZ3cPIlEHKNJRPus3GeQOQuFMfz9LPF_s8sgg/edit?usp=sharing

Required Resources