Open terminal and run the following commands to install the dependencies:
sudo apt install g++sudo apt-get install -libsdl2-devsudo apt-get install -libsdl2-ttf-devsudo apt-get install -libsdl2-net-devsudo apt-get install -libsdl2-mixer-devsudo apt-get install npm
brew install sdl2 sdl2_ttf sdl2_net sdl2_mixer npm
After installing the dependencies. Do the following steps (Only one server needs to be created in a multiplayer game):
- We need one server to coordinate between the clients.
- Change to server folder:
cd server/ - Make the executable:
make - Run the executable:
./server - Enter the total players playing (this can be upto 4)
- Keep the server open in a seperate terminal window.
All the players should do the following steps:
- Change to client folder:
cd client/ - Make the executable;
make - Run the executable:
./game - Enjoy!
Refer to LaserTank.pdf to know about the various rules and features of the game. (Although its quite simple: shoot and kill)
- A very comprehensive and easy-to-use tutorial for SDL: Lazy Foo' Productions
- Maze generation algorithm and implementation: Dllu/Maze
- A tutorial on networking with SDL, a bit long but explains from scratch: thecplusplusguy