From 49aee2e8af8a24657214150b8a9d5a2caa110cb4 Mon Sep 17 00:00:00 2001 From: shangfengh <3495281661@qq.com> Date: Sun, 7 May 2023 00:30:40 +0800 Subject: [PATCH] feat: :sparkles: add the optional feature for the map --- .github/workflows/upload_COS.yml | 2 ++ CAPI/cmd/RunServer.cmd | 2 +- CAPI/cmd/RunServerForDebug.cmd | 2 +- CAPI/shell/RunServer.sh | 2 +- CAPI/shell/RunServerForDebug.sh | 2 +- docs/CAPI接口(cpp).md | 4 +++- docs/CAPI接口(python).md | 2 ++ docs/使用文档.md | 4 +++- docs/版本更新说明.md | 12 ++++++++++-- 9 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/upload_COS.yml b/.github/workflows/upload_COS.yml index a1be1f8..e6cfb34 100644 --- a/.github/workflows/upload_COS.yml +++ b/.github/workflows/upload_COS.yml @@ -78,6 +78,8 @@ jobs: cp -r ./THUAI6/win/CAPI ./THUAI6/linux/ cp -r ./THUAI6/win/CAPI ./THUAI6/osx/ + cp -r ./logic/cmd/map ./THUAI6/ + - name: Copy shell run: | cp -r ./CAPI/cmd/* ./THUAI6/win/ diff --git a/CAPI/cmd/RunServer.cmd b/CAPI/cmd/RunServer.cmd index 93b8129..06444d6 100644 --- a/CAPI/cmd/RunServer.cmd +++ b/CAPI/cmd/RunServer.cmd @@ -1,5 +1,5 @@ @echo off -.\win64\Server.exe --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --fileName video +.\win64\Server.exe --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --fileName video --mapResource "..\map\map1_final.txt" pause diff --git a/CAPI/cmd/RunServerForDebug.cmd b/CAPI/cmd/RunServerForDebug.cmd index fa188c9..3e67e4f 100644 --- a/CAPI/cmd/RunServerForDebug.cmd +++ b/CAPI/cmd/RunServerForDebug.cmd @@ -1,5 +1,5 @@ @echo off -.\win64\Debug\Server.exe --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 +.\win64\Debug\Server.exe --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --fileName video --mapResource "..\map\map1_final.txt" pause diff --git a/CAPI/shell/RunServer.sh b/CAPI/shell/RunServer.sh index b15dad0..a980736 100644 --- a/CAPI/shell/RunServer.sh +++ b/CAPI/shell/RunServer.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -./linux64/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 \ No newline at end of file +./linux64/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --fileName video --mapResource "..\map\map1_final.txt" \ No newline at end of file diff --git a/CAPI/shell/RunServerForDebug.sh b/CAPI/shell/RunServerForDebug.sh index 5d044ef..3081824 100644 --- a/CAPI/shell/RunServerForDebug.sh +++ b/CAPI/shell/RunServerForDebug.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -./linux64/Debug/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 \ No newline at end of file +./linux64/Debug/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --fileName video --mapResource "..\map\map1_final.txt" \ No newline at end of file diff --git a/docs/CAPI接口(cpp).md b/docs/CAPI接口(cpp).md index 4f31cca..a9311cf 100644 --- a/docs/CAPI接口(cpp).md +++ b/docs/CAPI接口(cpp).md @@ -4,6 +4,9 @@ ## 接口解释 ### 主动指令 +- 每帧最多发送50条主动指令 +- EndAllAction() 及 Move 指令调用数总和一帧内不超过 10 次 + #### 移动 - `std::future Move(int64_t timeInMilliseconds, double angleInRadian)`:移动,`timeInMilliseconds` 为移动时间,单位毫秒;`angleInRadian` 表示移动方向,单位弧度,使用极坐标,**竖直向下方向为x轴,水平向右方向为y轴**。因为移动过程中你会受到多种干扰使得移动结果不符合你的预期;因此建议小步移动,边移动边考虑之后的行为。 - `std::future MoveRight(uint32_t timeInMilliseconds)`即向右移动,`MoveLeft`、`MoveDown`、`MoveUp`同理 @@ -15,7 +18,6 @@ - `std::future EndAllAction()`:可以使不处在不可行动状态中的玩家终止当前行动 - 在指令仍在进行时,重复发出同一类型的交互指令和移动指令是无效的,你需要先发出 Stop 指令终止进行的指令 - 实际上唤醒或勉励不同的人是有效的 -- EndAllAction() 及 Move 指令调用数总和一帧内不超过 10 次 #### 攻击 - `std::future Attack(double angleInRadian)`:`angleInRadian`为攻击方向 diff --git a/docs/CAPI接口(python).md b/docs/CAPI接口(python).md index 851e055..104c83f 100644 --- a/docs/CAPI接口(python).md +++ b/docs/CAPI接口(python).md @@ -5,6 +5,8 @@ ## 接口解释 ### 主动指令 +- 每帧最多发送50条主动指令 +- EndAllAction() 及 Move 指令调用数总和一帧内不超过 10 次 #### 移动 diff --git a/docs/使用文档.md b/docs/使用文档.md index 50d250c..a97676a 100644 --- a/docs/使用文档.md +++ b/docs/使用文档.md @@ -49,7 +49,7 @@ Server脚本中参数格式一般如下: ```shell ---ip 0.0.0.0 --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --fileName video +--ip 0.0.0.0 --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --fileName video --mapResource "..\map\map1_final.txt" ``` `--ip`是服务器ipv4地址 @@ -75,6 +75,8 @@ Server脚本中参数格式一般如下: `--fileName`为回放文件的保存名称 +`--mapResource`为地图文件存放的相对(该脚本)路径 + ### 启动Client(RunPython或RunCpp) `RunCpp.cmd`或`RunPython.cmd`的脚本参数格式如下: diff --git a/docs/版本更新说明.md b/docs/版本更新说明.md index bc59a20..89734e4 100644 --- a/docs/版本更新说明.md +++ b/docs/版本更新说明.md @@ -3,8 +3,16 @@ # 说明 - 只说明对于选手较为重要的修改 -# 5月6日更新 +# 5月6日3点更新 - docs:添加了 游戏机制与平衡性调整更新草案.pdf - docs:添加了 版本更新说明.pdf - docs&hotfix: 修正了GameRules.pdf中学生翻窗速度的错误 -- remove: 删除了Place属性 \ No newline at end of file +- remove: 删除了Place属性 + +# 5月6日12点更新 +- hotfix: 修复了突然的bug(物件锁的相关问题) +- rule:增加了每帧最多50条主动指令的限制 + +# 最新更新 +- feat:增加了可选地图功能 + **注意:脚本RunServer(ForDebug).cmd/sh发生了更改,选手需要自行参照使用文档修改或在云盘下载脚本** \ No newline at end of file