Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF)
# Only macOS links SFML as Frameworks, not static
# On macOS using Frameworks, NOT static (dylib)
if(NOT APPLE)
set(SFML_STATIC_LIBRARIES TRUE)
endif()
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Offline & Online Multiplayer Checkers game in C++ built with SFML 2.6, imGui, Protobuf and ixWebsockets. With very minimal dependencies
and a simple build process. All dependencies are auto-downloaded (as `.tar.gz`) and configured for you using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake). The only dependency you need pre-installed on your OS is SFML 2.6.x (or newer).

This game can connect to both Private and Public game servers. The backend server for this game is written in Golang, and is [available on GitHub](https://github.com/Longwater1234/checkers-backend) which you can self-host! You can download pre-built game (Windows x64 exe) from Actions tab (on GitHub Web). For other platforms, use the itch.io link above.
This game can connect to both Private and Public game servers. The backend server for this game is written in Golang, and is [available on GitHub](https://github.com/Longwater1234/checkers-backend) which you can self-host! Download and Play the game from the itch.io link above.

### Main Libraries Used

Expand All @@ -22,7 +22,6 @@ This game can connect to both Private and Public game servers. The backend serve

### For Windows

- At least Windows 10 / Server 2016
- MS Visual Studio 2022 or newer (NOT vscode), with "**Desktop C++ Development**" bundle.
- Please download "Visual C++ 64bit" edition of SFML; ignore others.
- Move your unzipped `SFML-2.6.x` folder to its own home, example: `C:/SFML/SFML-2.6.1`.
Expand Down
2 changes: 0 additions & 2 deletions dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ include(protobuf.cmake)
CPMAddPackage(
NAME imgui
URL "https://github.com/ocornut/imgui/archive/refs/tags/v1.90.8.tar.gz"
VERSION 1.90.8
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)

Expand All @@ -35,7 +34,6 @@ endif()
CPMAddPackage(
NAME imgui-sfml
URL "https://github.com/SFML/imgui-sfml/archive/refs/tags/v2.6.tar.gz"
VERSION 2.6
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
OPTIONS "IMGUI_SFML_FIND_SFML OFF" "IMGUI_DIR ${imgui_SOURCE_DIR}"
)
3 changes: 1 addition & 2 deletions dependencies/ixwebsocket.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# IXWebSocket 11.4.2 (BSD-3-Clause License)
# IXWebSocket 11.4.5 (BSD-3-Clause License)

CPMAddPackage(
NAME ixwebsocket
URL "https://github.com/machinezone/IXWebSocket/archive/refs/tags/v11.4.5.tar.gz"
VERSION 11.4.5
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
DOWNLOAD_ONLY ON
OPTIONS "USE_TLS TRUE" "USE_MBED_TLS TRUE" "USE_ZLIB TRUE"
Expand Down
8 changes: 3 additions & 5 deletions dependencies/libcpr.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# add libcpr (HTTP Client) v1.11.1
# add libcpr (simpler CURL) v1.11.3

SET(SSL_OPTION "CPR_FORCE_OPENSSL_BACKEND TRUE")
if(WIN32)
SET(SSL_OPTION "CPR_FORCE_WINSSL_BACKEND TRUE")
# elseif(APPLE)
# SET(SSL_OPTION "CPR_FORCE_DARWINSSL_BACKEND TRUE")
endif()

# dont upgrade, will require MESON to build!
CPMAddPackage(
NAME cpr
URL "https://github.com/libcpr/cpr/archive/refs/tags/1.11.1.tar.gz"
VERSION 1.11.1
URL "https://github.com/libcpr/cpr/archive/refs/tags/1.11.3.tar.gz"
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
OPTIONS "BUILD_SHARED_LIBS FALSE" "CURL_USE_LIBPSL OFF" "USE_LIBIDN2 OFF" ${SSL_OPTION}
)
5 changes: 2 additions & 3 deletions dependencies/mbedtls.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# mbedtls v2.25.0 (Apache-2.0 License)
# mbedtls v2.28 (Apache-2.0 License)

CPMAddPackage(
NAME mbedtls
URL "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v2.25.0.tar.gz"
VERSION 2.25.0
URL "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-2.28.10.tar.gz"
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
DOWNLOAD_ONLY ON
)
Expand Down
2 changes: 0 additions & 2 deletions dependencies/protobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
CPMAddPackage(
NAME abseil
URL "https://github.com/abseil/abseil-cpp/archive/refs/tags/20250127.0.tar.gz"
VERSION 220250127
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
OPTIONS "ABSL_ENABLE_INSTALL ON" "ABSL_PROPAGATE_CXX_STD ON"
)
Expand All @@ -11,7 +10,6 @@ CPMAddPackage(
CPMAddPackage(
NAME protobuf
URL "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v30.1.tar.gz"
VERSION 30.1
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
OPTIONS "protobuf_BUILD_TESTS OFF" "protobuf_INSTALL OFF" "protobuf_BUILD_PROTOBUF_BINARIES ON"
"protobuf_BUILD_LIBUPB OFF" "protobuf_BUILD_PROTOC_BINARIES OFF" "protobuf_MSVC_STATIC_RUNTIME OFF"
Expand Down
3 changes: 1 addition & 2 deletions dependencies/simdjson.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Get simdjson 3.10.0
CPMAddPackage(
NAME simdjson
URL "https://github.com/simdjson/simdjson/archive/refs/tags/v3.10.0.tar.gz"
VERSION 3.10.0
URL "https://github.com/simdjson/simdjson/archive/refs/tags/v3.13.0.tar.gz"
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
5 changes: 2 additions & 3 deletions dependencies/spdlog.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# GET spdlog v1.14
# GET spdlog v1.15
CPMAddPackage(
NAME spdlog
URL "https://github.com/gabime/spdlog/archive/refs/tags/v1.14.0.tar.gz"
VERSION 1.14.0
URL "https://github.com/gabime/spdlog/archive/refs/tags/v1.15.3.tar.gz"
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
1 change: 0 additions & 1 deletion dependencies/zlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
CPMAddPackage(
NAME zlib
URL "https://github.com/madler/zlib/archive/refs/tags/v1.3.1.tar.gz"
VERSION 1.3.1
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
DOWNLOAD_ONLY ON
)
Expand Down
2 changes: 1 addition & 1 deletion lint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Define the source directory
# source directory
SRC_DIR="src"

clang-format $(find $SRC_DIR -type f -name "*.cpp" -o -name "*.hpp") -i --verbose
Expand Down
2 changes: 1 addition & 1 deletion src/WsClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void WsClient::showPublicServerWindow(bool &showPublic)
}

/**
* Fetch updated public servers from central cloud storage (Timeout 5000ms)
* Fetch updated public servers from CDN (Timeout 5000ms)
* @see libcpr official docs: https://docs.libcpr.org/advanced-usage.html
*/
void WsClient::asyncFetchPublicServers()
Expand Down