This repository has been archived on 2022-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
space-war/ReadMe.md

1.4 KiB
Raw Permalink Blame History

SpaceWar

为1MGames游戏开发比赛制作的游戏。采用C++17开发。
编译好的参赛作品在这里

编译方法

编译平台为MacOS在MacOS Big Sur 11.6中编译成功且结果在1M以下也可以在其他平台编译但编译结果不保证在1M以下,仅仅是为了方便不同平台进行编译。

使用CMake 3.20及以上进行编译。需要拉取glfw作为子工程:

git submodule update --init --recursive

然后编译:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

如果想要使用glew可以通过以下命令默认用glad:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DUSE_GLEW=ON
cmake --build build

cmake会在你的电脑上寻找glew

如果想要压缩文件至1M以下你需要有strip程序和upx程序,并执行:

cmake --build build --target CompressExe

编译好后执行pack命令打包

cmake --build build --target Pack

最终的结果在output文件夹下:

  • game包含了游戏本体
  • snapshot包含了游戏的截图
  • HowToPlay.md游戏说明

游戏截图

welcome

select

gaming

gaming2

游戏操作

游戏操作