StickMayhem/
|
|-src/
|-core/ <- All player/weapon/logic not related to Rendering goes here
|-client/ <- All rendering logic goes here
|-assets/ <- All textures, sound effects and resources go here
If you are using CLion, the setup is straightforward because it comes with built-in vcpkg support.
- Open the project folder in CLion.
- CLion will detect the CMakeLists.txt file. Open the CMake tool window.
- It will automatically detect the vcpkg.json file and handle the dependency installation for you.
- Once CMake finishes configuring, you can just select the StickMayhem executable and click the run button in the top right to build and launch the game.
If you are using Visual Studio Code, you will need to add a few extensions to get the game running.
- Click on the Extensions tab on the left panel and install the "C/C++" extension and the "CMake Tools" extension.
- Since we use an external library (Raylib) to draw the game, you need a tool called
vcpkgto download it. If you don't have it, go to the officialvcpkgGitHub page, download it to your computer, and follow their quick start guide to install it. - Open this project folder in VS Code.
- We need to tell VS Code where your
vcpkgtool is located so it can find Raylib. Open your VS Code Settings (File > Preferences > Settings), search forCMake: Toolchain File, and type in the path to the vcpkg file on your computer. It should look something like:C:/path/to/your/vcpkg/scripts/buildsystems/vcpkg.cmake. - Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) to open the command palette at the top, type "CMake: Configure", and select it. This will automatically download and set up Raylib for you. - Once that finishes, look at the bottom blue bar in VS Code. Click the "Build" button, and then click the "Play" (Run) button next to it to launch the game, and have fun while playing it :D