See https://github.com/jackparse14/CI628-MultiplayerGameDevelopment-server for the server side program with this project
A simple multiplayer pong client in C++.
The project is configured to be developed on Windows, so it only includes Windows-specific SDL versions.
To build, you will need:
- CMake 3.16+
- Visual Studio 2019
- Download this repository by clicking "Code" -> Download zip.
- Extract the zip file and rename
CI628-PongClient-master
toCI628
.
Open the command line (via Git Bash):
cd CI628
mkdir build
cd build
// Note: if running on Uni machines, it's /c/Program\ Files/CMake/bin/cmake rather than just cmake
// Note: if running on Uni machines from Command Prompt, it's "C:\Program Files\CMake\bin\cmake.exe" rather than just cmake
// OR see further below how to make cmake visible globally
cmake .. -G "Visual Studio 16 2019"
After this, a ".sln" will be generated in build/
.
- Open the ".sln" file with Visual Studio 2019.
- Right click on MyGame in project explorer and select as startup project.
- Right click on MyGame again and select Properties.
- In the properties window, Linker -> System and change SubSystem to Console.
Before running the demo, ensure that the CI628-server application is running. You can now run the demo from Visual Studio via Local Windows Debugger.
- Close git bash if open.
- Go to
C:\Users\your_user_name
and open (or create) a file with exact name.bash_profile
. - Add to file:
export CMAKE_HOME=/c/Users/... <-- path to cmake directory (i.e. where you downloaded/extracted cmake to)
export PATH=$PATH:$CMAKE_HOME/bin
- Open git bash and check cmake works by typing:
cmake --version