|
1 | | -# **Quick Start** |
| 1 | +# **OpenRA Quick Start** |
2 | 2 |
|
3 | | -## 环境要求 |
| 3 | +# 以下内容为手动编译项目并启动 |
| 4 | +# 也可以下载[Release包](github.com/OpenCodeAlert/Hackathon2025/releases/latest)运行 |
4 | 5 |
|
5 | | ---- |
| 6 | +主办方修改后的OpenRA地址: |
| 7 | +https://github.com/OpenCodeAlert/OpenCodeAlert.git |
| 8 | + |
| 9 | +## 准备工作 |
6 | 10 |
|
7 | 11 | ### dotnet x64 6.0的安装 |
8 | 12 |
|
@@ -36,68 +40,58 @@ M 系列芯片MacOS需要安装rosetta |
36 | 40 |
|
37 | 41 | --- |
38 | 42 |
|
39 | | -### Windows系统 |
| 43 | +### Windows |
40 | 44 |
|
41 | 45 | ```bash |
42 | | -git clone https://github.com/OpenRA-CopilotTestGroup/OpenRA.git |
43 | | -cd OpenRA |
| 46 | +git clone https://github.com/OpenCodeAlert/OpenCodeAlert.git |
| 47 | +cd OpenCodeAlert |
44 | 48 | # 如果网速不佳,先用cdn store一下,也可以挂代理。无网速问题的开发者请忽略以下这一行 |
45 | 49 | dotnet restore --source https://nuget.cdn.azure.cn/v3/index.json |
46 | 50 | dotnet build |
47 | 51 | .\launch-game.cmd Game.Mod=copilot |
48 | 52 | ``` |
49 | 53 |
|
50 | | -### Linux系统 |
| 54 | +### Linux & macOS |
51 | 55 |
|
52 | | -```bash |
53 | | -git clone https://github.com/OpenRA-CopilotTestGroup/OpenRA.git |
54 | | -cd OpenRA |
55 | | -# 如果网速不佳,先用cdn store一下,也可以挂代理。无网速问题的开发者请忽略以下这一行 |
56 | | -dotnet restore --source https://nuget.cdn.azure.cn/v3/index.json |
57 | | -dotnet build |
58 | | -export PATH="/usr/local/share/dotnet/x64:$PATH" |
59 | | -./launch-game.sh Game.Mod=copilot |
60 | | -``` |
61 | 56 |
|
62 | | -### macOS系统 |
| 57 | +### |
63 | 58 |
|
64 | 59 | ```bash |
65 | | -git clone https://github.com/OpenRA-CopilotTestGroup/OpenRA.git |
66 | | -cd OpenRA |
| 60 | +git clone https://github.com/OpenCodeAlert/OpenCodeAlert.git |
| 61 | +cd OpenCodeAlert |
67 | 62 | # 如果网速不佳,先用cdn store一下,也可以挂代理。无网速问题的开发者请忽略以下这一行 |
68 | 63 | dotnet restore --source https://nuget.cdn.azure.cn/v3/index.json |
69 | 64 | dotnet build |
70 | 65 | export PATH="/usr/local/share/dotnet/x64:$PATH" |
71 | 66 | ./launch-game.sh Game.Mod=copilot |
| 67 | +# 也可使用 |
| 68 | +./start.sh |
72 | 69 | ``` |
73 | 70 |
|
| 71 | +## OpenRA 额外参数 |
| 72 | +Game.LoadSave=xxx: 启动的时候自动读取接在后面名字的存档,并自动开始游戏 |
| 73 | +Game.CopilotPort=xxx: Copilot命令服务器端口号,默认:7445 |
| 74 | +Game.CopilotDebug=xxx: 启用Copilot命令服务器调试模式,记录所有接收和发送的JSON数据,默认:False |
| 75 | + |
| 76 | +**由于OpenRA对于启动参数的记忆性,填写后,若下次不填写会自动延续上次的参数** |
74 | 77 |
|
75 | | - |
76 | | -### 游戏引擎的编译 |
77 | | - |
78 | | -## 游戏关卡 |
| 78 | +也可使用**start.sh**启动游戏,辅助清空 |
79 | 79 |
|
80 | 80 | --- |
81 | 81 |
|
82 | | -在比赛中,我们设计了一些游戏关卡,用于您测试您的AI-Agent完成任务的能力,有简单的任务比如: |
83 | | - |
84 | | - |
| 82 | +# 游戏关卡 |
85 | 83 |
|
86 | | -## 运行OpenRA游戏引擎 |
87 | 84 |
|
88 | | ---- |
89 | 85 |
|
90 | | -### Windows系统 |
91 | 86 |
|
92 | | -### Linux系统 |
| 87 | +在比赛中,我们设计了一些游戏关卡,用于您测试您的AI-Agent完成任务的能力: |
93 | 88 |
|
94 | | -### macOS系统 |
| 89 | +[missions.md](./missions.md) |
95 | 90 |
|
96 | | -## 2. **运行OpenRA游戏,开一关** |
97 | 91 |
|
98 | 92 | 我们打开OpenRA进入战斗关卡 |
99 | 93 |
|
100 | | -OpenRA在一局游戏进入世界后,会用**socket**,监听**7445**端口**TCP**协议,**UTF-8** **json**格式的报文 |
| 94 | +OpenRA在一局游戏进入世界后,会用**socket**,监听**7445**(通过启动参数可修改)端口**TCP**协议,**UTF-8** **json**格式的报文 |
101 | 95 |
|
102 | 96 | 可以通过发送和接受这些json格式的报文,查询游戏状态信息,也就是俗称的使用API |
103 | 97 |
|
@@ -131,19 +125,14 @@ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: |
131 | 125 |
|
132 | 126 | 各种各样的API就是你的操作 |
133 | 127 |
|
134 | | -可以看文章《OpenRA-API》,介绍了更多丰富的API |
| 128 | +可以看文章[socket-api](https://github.com/OpenCodeAlert/Hackathon2025/blob/main/APIs/socket-apis.md),介绍了更多丰富的API |
135 | 129 |
|
136 | 130 | 你可以使用这些API,提出疑问,缺失 |
137 | 131 |
|
138 | 132 |
|
139 | 133 |
|
140 | 134 | 不是很了解socket操作?可以问问各种AI们! |
141 | 135 |
|
142 | | -RESTFUL的http格式的API** |
143 | | - |
144 | | -专门给Claude等AI使用的**MCP结构的API** |
145 | | - |
146 | | -目前这些还在编写中 |
147 | 136 |
|
148 | 137 | ## 3. **实现一个AI-Agent** |
149 | 138 |
|
|
0 commit comments