This is a multithreaded collect objects game implemented in C++ using pthread library. The game allows two players to collect objects on a game board using different controls. The objective of the game is to collect the maximum number of objects to win.
- The game board is a grid-based canvas with a specified width and height.
- Players control their characters using specific keys (arrow keys and shift key for Player 1, and ASDW keys and spacebar for Player 2).
- Players can move their characters in four directions: up, down, left, and right.
- Objects are randomly distributed on the game board and can be collected by moving the character over them.
- Each collected object increases the player's score.
- The game displays the scores of both players on the screen.
- The game ends when a certain condition is met (e.g., a time limit or a specific number of objects collected).
- The player with the highest score at the end of the game wins.
- Clone the repository to your local machine.
- Compile the source code using a C++ compiler.
- Run the executable file to start the game.
-
Player 1 controls:
- Arrow keys: Move the character up, down, left, or right.
- Shift key: Collect objects.
-
Player 2 controls:
- ASDW keys: Move the character up, down, left, or right.
- Spacebar: Collect objects.
- OpenGL library
- pthread library
Make sure to have the necessary libraries installed before compiling and running the game.
This project is licensed under the MIT License.
- The game is inspired by classic collect objects games.