Group project for the Software engineering (pol. Inżynieria oprogramowania) course taken in the 2021/2022 summer semester that i participated in.
The game is a variation of the classic Pacman for 2-4 players. The game is played on one computer. The first player to win the specified number of rounds wins the whole game. A single round is won by the first player to score the expected number of points (by collecting coins, killing ghosts and enemies) or the last one alive. Various buffs spawn randomly during the game.
There are many different maps that are randomly selected for each round. Every map can appear only once during the game. Some of the maps resemble these from classic Pacman while other maps are a bit crazier.
At the beginning of each round there is a coin on every tile that is not a wall. Collecting a coin gives 1 point. Coins do not spawn after beginning of the round.
Every player controls a pacman of a chosen color. He can be controlled by a keyboard or a controller. Players can also chose their nicknames and controls.
Pacman dies when he touches a ghost unless he is shielded or in a devouring mode. Ghost spawn at the beginning of the round and do not respawn later. Currently there are 3 types of ghosts:
pink
- a ghost that walks randomlyyellow
- a ghost that walks left/rigth or up/down until he hits the wall and turns backgreen
- a ghost that walks the same cycle all the time
Pacman gets a power up when he touches it. Pacman can have only one power up at the same time so if he touches a new power up before expiry of the previous one, the previous one is replaced with the new one. Slow down is the exception to this rule as it is a debuff for other players. Some power ups are passive while the others are usable. Currently there are 9 power ups:
spikes
- allows players to place 3 permanent spikes that kill charactersslow down
- slows down all other pacmansspeed up
- speeds up the pacmanbomb
- allows player to place a bomb under his pacman that explodes after 3 seconds and kills characters that are in the area of explosionshield
- saves pacman from everything that could kill him oncebullet
- allows pacman to fire a bullet in the direction of walking; the bullet disappears when it hits the wall or another bulletcoin multiplier
- increases points received for collecting a coin from 1 to 2walking through walls
- allows pacman to walk through walls and hide behind themgluttony
- sets pacman to devouring mode that allows him to eat ghosts and other pacmans unless they are devouring too
There are 3 ways to collect points:
- collecting a coin - 1 point
- killing a ghost - 5 points
- killing a player - 10 points
- The game can be played on Linux machine with installed:
- SFML 2.4.2+
- xboxdrv
- CMake 3.10.2+
-
The game displays correctly on monitors with resolution at least 1920x1080.
-
The keyboard can be used by up to 2 players. So 3 players need at least 1 controllor (e.g. PlayStation 4, Xbox One) and 4 players need at least 2 controllers. Game can handle up to 4 controllers so no one has to use the keyboard during the game but it is necessary in the main menu and game lobby.
-
Clone the repository.
-
If you don't have
SFML
library installed already, you can use this command:
sudo apt-get install libsfml-dev
- To build the game go to the
PacmanRivals
directory and execute:
mkdir build && cd build && cmake -D CMAKE_BUILD_TYPE=Release .. && make
-
If you want to use controllers, connect them to your PC. You can easily find tips how to do it on Linux.
-
Run the game:
./PacmanRivals
As it was a university project, there were many requirements apart from coding something.
We had to make these documents (in polish) during our work:
Continuous integration with unit testing and code coverage was obligatory. GitHub workflows file is here. The tests are here.
To run the tests you have to build the project in the Debug mode like this:
mkdir build && cd build && cmake -D CMAKE_BUILD_TYPE=Debug .. && make
To run tests use (in the build
directory)
make test
To check code coverage use (in the build
directory)
make ExperimentalCoverage
- C++
- CMake
- CTest
- SFML
- CLion
- GitHub
- GitHub Actions
- GitHub Issues
Project got more than max points, teached us a lot and gave us even more fun :)