You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: BUILDING.md
+17-20Lines changed: 17 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,16 @@
2
2
3
3
## On Windows
4
4
5
-
1. Just open this project folder in Visual Studio 2019 (or newer), with CMake extension installed.
6
-
2.From top toolbar, change mode to **Release**, and click **Build** > **Build All**.
7
-
3.Done. That's it. Your game .EXE will be in `{project_dir}/out/Release/bin`
8
-
4.If the game fails to start, make sure `openal32.dll` is present in **same folder** with your .EXE. If not, copy it from SFML directory `${SFML_HOME}/bin/openal32.dll`
5
+
1. Just open this project directly in Visual Studio 2022 (or newer), with native CMake extension installed.
6
+
2.Wait as Visual Studio auto-configures this project for you.
7
+
3.Next, from top toolbar, change mode to **'Release'**, and click **Build** > **Build All**.
8
+
4.Done. That's it! Your game `.exe` will be inside `{project_dir}/out/Release/bin/`. Enjoy!
9
9
10
10
## On MacOS & Linux
11
11
12
-
1. Open this project directory in your terminal.
12
+
1. Open this project directory in your Terminal.
13
13
2. Ensure CMake 3.20 or higher is installed. Verify with `cmake --version`
- Set "Source Folder" (1) to this project root. Then set "Build Folder" (2) to a NEW _relative_ folder `/build` or `/out`. See image above. Then (3) click "**Configure**",
37
-
-In the next screen, Choose **Unix Makefiles**if on Linux; choose **XCode** if on Mac. Choose **Visual Studio** if on Windows. Then click OK to save.
38
-
-Make sure CMAKE_BUILD_TYPE is **Release**.
39
-
- Click Configure once again, then **Generate**.
40
-
- Finally, on Windows and MacOS, click **Open Project** for building in respective IDE. On Linux desktop, open build folder, then run `make all` in Terminal.
33
+
- Set "Source Folder" (1) to this project root dir. Then, set "Build Folder" (2) to a NEW _relative_ folder `/build` or `/out`.
34
+
-Ensure "CMAKE_BUILD_TYPE" is **Release**(see image above, blue highlight). Ignore other settings. Then (3) click "**Configure**".
35
+
-In the popup window, choose generator **'Unix Makefiles'** if on Linux; choose **'XCode'** if on MacOS. Choose **'Visual Studio'** if on Windows. Then click OK to save.
36
+
- Click **'Configure'** once again, then **'Generate'**.
37
+
- Finally, on Windows or MacOS, click **Open Project** for building in respective IDE. On Linux desktop, open build folder, then run `make all` in Terminal.
Offline & Online Multiplayer Checkers game in C++ built with SFML 2.6, imGui, Protobuf and ixWebsockets. With very minimal dependencies
4
-
and a simple build process. All dependencies are auto-downloaded (as `.tar.gz`) and built for you using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake).
4
+
and a simple build process. All dependencies are auto-downloaded (compressed as `.tar.gz`) and built for you using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake).
5
5
6
-
This game can connect to both Private and Public game servers. The Server project for this game is on a separate git repo, [available here](#).
7
-
The only dependency you need pre-installed on your OS is SFML 2.6.x (or newer).
6
+
This game can connect to both Private and Public game servers. The Server project for this game is on a separate Git repo, [available here](https://github.com/Longwater1234/checkers-backend) which you can self-host! The only dependency you need pre-installed on your OS is SFML 2.6.x (or newer).
8
7
9
8
### Main Libraries Used
10
9
11
10
- SFML 2.6
12
11
- imGui-SFML
13
12
- ixWebsockets
14
13
- spdlog
15
-
- Google Protobuf 27.2 (Used entirely during gameplay)
14
+
- Google Protobuf v30.1 (Used entirely during gameplay)
16
15
- simdjson (Used once, for parsing list of public servers)
17
16
18
17
## Requirements for Building
@@ -27,20 +26,25 @@ The only dependency you need pre-installed on your OS is SFML 2.6.x (or newer).
27
26
- MS Visual Studio 2022 or newer (NOT vscode), with "**Desktop C++ Development**" bundle.
28
27
- Please download "Visual C++ 64bit" edition of SFML; ignore others.
29
28
- Move your unzipped `SFML-2.6.x` folder to its own home, example: `C:/SFML/SFML-2.6.1`.
30
-
- Edit **line 16** in [CMakeLists.txt](CMakeLists.txt), to set value `SFML_HOME` to folder path you moved SFML into (see
31
-
previous step)
29
+
- Edit **line 16** in [CMakeLists.txt](CMakeLists.txt), to set value `SFML_HOME` to folder path you moved SFML into (seeprevious step)
32
30
33
-
### For MacOS
31
+
### For macOS (x64 & arm64)
34
32
35
-
- Please install SFML 2.6 as **Frameworks**, not as "dylibs", as shown in [official macOS guide](https://www.sfml-dev.org/tutorials/2.6/start-osx.php).
33
+
- Please install SFML 2.6 as **Frameworks**, not as "dylibs", as shown in [official SFML guide](https://www.sfml-dev.org/tutorials/2.6/start-osx.php).
36
34
- XCode 14 or newer from AppStore (with MacOS SDK)
37
35
- Apple Developer tools. After Xcode is installed, run this in your Terminal:
38
36
39
37
```bash
40
38
sudo xcode-select --install
41
39
```
42
40
43
-
### For Linux Destkop
41
+
- After installing the CMake GUI, add its accompanying CLI to PATH by simply run the following command:
This contains CMake script to build MacOS GUI `.app` bundle. It embeds the icon to the app bundle. It also copies all static assets into the bundle at build time.
3
+
This contains CMake script to build MacOS GUI `.app` bundle. It embeds the icon to the app bundle. It also copies all static assets (resources) into the bundle at build time.
4
4
5
-
If you installed SFML as "Frameworks", you will need to tell XCode to copy them into the bundle before Building. Follow these steps:
5
+
**IMPORTANT**: If you installed SFML as "Frameworks" (recommended), you will need to manually instruct XCode to embed them into the bundle at Build time. Otherwise, the game won't work on other similar MacOS devices!
6
6
7
-
- From top toolbar inside Xcode, click **Product** > **Add New Build Phase** > choose **Copy Files**. See official [Apple guide](https://developer.apple.com/documentation/xcode/customizing-the-build-phases-of-a-target)
8
-
- Click the `+` (add button). A new window will pop up.
9
-
- Now select all SFML frameworks listed: `sfml-graphics.framework``sflml-window.framework` etc. You should also add `Foundation` framework.
10
-
- Finally, you will need to find `freetype.framework`. Click **Other Locations**, find it inside `/Library/Frameworks`.
7
+
Kindly follow these steps:
11
8
12
-
Now you can build your project. Choose **Product** from top toolbar, click **Build**.
9
+
- Use CMake to generate "XCode Project". Refer to [BUILDING.md](../BUILDING.md). Open the project.
10
+
- From top toolbar inside Xcode, click **Product** > **Add New Build Phase** > choose **Copy Files**. See official [Apple guide](https://developer.apple.com/documentation/xcode/customizing-the-build-phases-of-a-target)
11
+
- Click the `+` (add button) to begin. A new window will pop up.
12
+
- Now select all SFML frameworks listed: `sfml-graphics.framework`, `sflml-window.framework` etc.
13
+
- Finally, you will need to add `freetype.framework`. Click **Other Locations**, find it inside `/Library/Frameworks`. Click "Copy as reference folder". Click OK
14
+
- Now you can build your project. From top toolbar, Click **Product** > **Build**.
0 commit comments