Browse Source

Merge pull request #508 from shangfengh/new

feat:  add the optional feature for the map
tags/v0.1.0
shangfengh GitHub 2 years ago
parent
commit
35f6124be9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 24 additions and 8 deletions
  1. +2
    -0
      .github/workflows/upload_COS.yml
  2. +1
    -1
      CAPI/cmd/RunServer.cmd
  3. +1
    -1
      CAPI/cmd/RunServerForDebug.cmd
  4. +1
    -1
      CAPI/shell/RunServer.sh
  5. +1
    -1
      CAPI/shell/RunServerForDebug.sh
  6. +3
    -1
      docs/CAPI接口(cpp).md
  7. +2
    -0
      docs/CAPI接口(python).md
  8. +3
    -1
      docs/使用文档.md
  9. +10
    -2
      docs/版本更新说明.md

+ 2
- 0
.github/workflows/upload_COS.yml View File

@@ -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/


+ 1
- 1
CAPI/cmd/RunServer.cmd View File

@@ -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

+ 1
- 1
CAPI/cmd/RunServerForDebug.cmd View File

@@ -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

+ 1
- 1
CAPI/shell/RunServer.sh View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash

./linux64/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600
./linux64/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --fileName video --mapResource "..\map\map1_final.txt"

+ 1
- 1
CAPI/shell/RunServerForDebug.sh View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash

./linux64/Debug/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600
./linux64/Debug/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --fileName video --mapResource "..\map\map1_final.txt"

+ 3
- 1
docs/CAPI接口(cpp).md View File

@@ -4,6 +4,9 @@
## 接口解释

### 主动指令
- 每帧最多发送50条主动指令
- EndAllAction() 及 Move 指令调用数总和一帧内不超过 10 次

#### 移动
- `std::future<bool> Move(int64_t timeInMilliseconds, double angleInRadian)`:移动,`timeInMilliseconds` 为移动时间,单位毫秒;`angleInRadian` 表示移动方向,单位弧度,使用极坐标,**竖直向下方向为x轴,水平向右方向为y轴**。因为移动过程中你会受到多种干扰使得移动结果不符合你的预期;因此建议小步移动,边移动边考虑之后的行为。
- `std::future<bool> MoveRight(uint32_t timeInMilliseconds)`即向右移动,`MoveLeft`、`MoveDown`、`MoveUp`同理
@@ -15,7 +18,6 @@
- `std::future<bool> EndAllAction()`:可以使不处在不可行动状态中的玩家终止当前行动
- 在指令仍在进行时,重复发出同一类型的交互指令和移动指令是无效的,你需要先发出 Stop 指令终止进行的指令
- 实际上唤醒或勉励不同的人是有效的
- EndAllAction() 及 Move 指令调用数总和一帧内不超过 10 次

#### 攻击
- `std::future<bool> Attack(double angleInRadian)`:`angleInRadian`为攻击方向


+ 2
- 0
docs/CAPI接口(python).md View File

@@ -5,6 +5,8 @@
## 接口解释

### 主动指令
- 每帧最多发送50条主动指令
- EndAllAction() 及 Move 指令调用数总和一帧内不超过 10 次

#### 移动



+ 3
- 1
docs/使用文档.md View File

@@ -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`的脚本参数格式如下:


+ 10
- 2
docs/版本更新说明.md View File

@@ -3,8 +3,16 @@
# 说明
- 只说明对于选手较为重要的修改

# 5月6日更新
# 5月6日3点更新
- docs:添加了 游戏机制与平衡性调整更新草案.pdf
- docs:添加了 版本更新说明.pdf
- docs&hotfix: 修正了GameRules.pdf中学生翻窗速度的错误
- remove: 删除了Place属性
- remove: 删除了Place属性

# 5月6日12点更新
- hotfix: 修复了突然的bug(物件锁的相关问题)
- rule:增加了每帧最多50条主动指令的限制

# 最新更新
- feat:增加了可选地图功能
**注意:脚本RunServer(ForDebug).cmd/sh发生了更改,选手需要自行参照使用文档修改或在云盘下载脚本**

Loading…
Cancel
Save