A multiplayer version of the classic game Pacman, built using SDL2 for graphics and asyncio for networking. Please see our slides here for a description of how the game works.
- Type
make
in the terminal to compile the files and generate two executables namelygame
andserver
. - Run the server executable using command
./server
in the terminal. - Open a new terminal and run the game executable using
./game
, this is the terminal for player 1. - Repeat step 3 to get a player 2 terminal.
- Once game is over, make sure you close the server and restart it (using
./server
) before running your game again.
- Download asio from the link https://think-async.com/Asio/ based on your OS. Extract it in a folder of your choice.
- Change the path
~/software/asio/asio-1.18.1/include
in makefile according to your asio location. Make sure you enter the path correctly.
- Use the command
sudo apt-get install libsdl2-dev
to install SDL 2. - In order to run the game successfully, the following extra libraries are needed: SDL_image, SDL_ttf and SDL_mixer.
- To install SDL_image, use
sudo apt-get install libsdl2-image-dev
. - Install SDL_ttf using
sudo apt-get install libsdl2-ttf-dev
. - Use
sudo apt-get install libsdl2-mixer-dev
to install SDL_mixer.
The instructions mentioned above for various installations were used on Ubuntu 20.04 and are meant only for such an OS.