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
makein the terminal to compile the files and generate two executables namelygameandserver. - Run the server executable using command
./serverin 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/includein makefile according to your asio location. Make sure you enter the path correctly.
- Use the command
sudo apt-get install libsdl2-devto 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-devto install SDL_mixer.
The instructions mentioned above for various installations were used on Ubuntu 20.04 and are meant only for such an OS.