# 牛P闪闪坦克大战 **Repository Path**: kryxus/SparkleTank ## Basic Information - **Project Name**: 牛P闪闪坦克大战 - **Description**: FC游戏《坦克大战》还原项目,新增一些变色特效。 - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: https://space.bilibili.com/30594233 - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 9 - **Created**: 2023-09-15 - **Last Updated**: 2023-09-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 牛P闪闪坦克大战 ## 简介 依赖于[SFML](https://www.sfml-dev.org/index.php)游戏库、参照FC坦克大战而创建的“牛P闪闪坦克大战”游戏。 两种构建方式: 1. CMake构建方式可应用于Windows、Linux和MacOS平台,切换到`cmake`分支获取项目; 2. MSBuild构建方式仅用于Windows环境下的Visual Studio,切换到`master`分支获取项目。 另外:旧版项目依赖于[easyX](https://easyx.cn/)图形库,切换到`easyx`分支即可查看旧版代码。 ## 使用说明 本项目使用的第三方库均由[vcpkg](https://vcpkg.io/en/index.html)进行管理。有关vcpkg,可以参考以下文档: - vcpkg安装方法:《[Get started with vcpkg](https://vcpkg.io/en/getting-started.html)》 - vcpkg官方文档:《[vcpkg 文档](https://learn.microsoft.com/zh-cn/vcpkg/)》。 ### MSBuild配置 确保你参照《[Get started with vcpkg](https://vcpkg.io/en/getting-started.html)》安装vcpkg时,进入到vcpkg目录中并执行过以下命令: ```cmd vcpkg integrate install ``` 该命令可以使Windows环境下的Visual Studio对所有MSBuild项目开启vcpkg包管理功能。 MSBuild项目可以直接在Windows系统中使用VS生成,无需再做其它配置。 其它参考文档:《[MSBuild(Visual Studio)集成](https://learn.microsoft.com/zh-cn/vcpkg/users/buildsystems/msbuild-integration)》 ### CMake配置 需要先安装以下软件: - ninja-build 以Windows构建为例,先复制`CMakeUserPresets.template.json`为`CMakeUserPresets.json`到同一目录,并修改`CMakeUserPresets.json`中的`win-tools`预设,为其`environment`属性添加`VCPKG_ROOT`为你的vcpkg所在目录。示例如下: ```json { "description": "配置Windows生成工具。", "name": "win-tools", "inherits": [ "vcpkg-base" ], "hidden": true, "cacheVariables": { }, "environment": { "VCPKG_ROOT": "D:/dev/vcpkg" } } ``` 如果使用Linux或MacOS构建,只需在`linux-tools`或`macos-tools`中修改`VCPKG_ROOT`即可。 其它参考文档:《[CMake 集成](https://learn.microsoft.com/zh-cn/vcpkg/users/buildsystems/cmake-integration)》