C# 中的 .NET Unreal Tournament 机器人 - 无法构建 Codeplex 代码
.NET Unreal Tournament bots in C# - cannot build Codeplex code
我想使用 Unreal Tournament 环境作为使用 C# 开发 AI 机器人的游乐场。我在这里 Creating NET bots for UT, however this site is not maintained with lots of dead links. A video on this project UT3 Bots for .Net An updated version of the C# code is moved to Codeplex .NET Unreal Tournament Bots 找到了一个很好的起点。它提供了一个包含构建过程模板的文件夹和一个包含解决方案的文件夹。
我无法构建此代码。我没有使用模板的经验,在 VS2012 中加载解决方案不会构建。 VS2012迁移代码到这个版本,.NET version 2.0/3.0有警告,但是没有报错。所以我不认为这是致命的。
如果我在 VS2012 中加载解决方案,我会收到解决方案映射错误:
The mappings for the solution could not be found. [...] The active
solution has been temporarily disconnected from source control because
the server is unavailable. To attempt to reconnect to source control,
close and then re-open the solution when the server is available. If
you want to connect this solution to another server, use the Change
Source Control dialog.
如果我尝试构建,我会收到以下构建错误:
2>D:\Essential\Programming\Visual C#\Unreal tournament\UT Remote
bots\UTRemoteBotSolution\UTUserBot2004\RemoteUserBot.cs(189,35,189,43):
error CS0246: The type or namespace name 'UTVector' could not be found
(are you missing a using directive or an assembly reference?) [...]
========== Build: 0 succeeded, 2 failed, 2 up-to-date, 0 skipped ==========
所有错误似乎都指向 UTUserBot2004
,这是提供的 4 个解决方案之一。两个(UTUSerBot
、UTRemoteBot
)针对UT 1999年度游戏版本,另外两个(UTUserBot2004
、UTRemoteBot2004
)针对UT 2004。我只感兴趣在最初的 Channel9 post.
中描述的 1999 GOTY 版本中
我假设提供的代码没问题,我认为问题在于我缺乏如何让这段代码工作的经验。
任何有助于构建此代码的帮助都将不胜感激。
您正在使用的项目使用了较旧的编译方式,在项目构建完成后,它被复制到解决方案中另一个项目的 bin 文件夹中。因此,除非您的项目位于完全相同的文件夹结构中(即 E:\Shared Files\Shares\
),否则它将无法复制到正确的位置,并且不可用。此外,并非所有项目都相互引用。
要更正此问题,请首先转到 UTRemoteBot
项目的属性。在 Build Events
选项卡上,删除 Post-Build Event Commands
中的所有内容。接下来,右键单击 UTUserBot2004
项目,然后 Add -> Reference...
在解决方案选项卡中,选中 UTRemoteBot2004
项目。
此外,该项目缺少对 System.Windows.Forms
的引用。再次,右键单击 UTRemoteBot
项目,Add -> Reference...
在“程序集”选项卡上的“框架”下,选中 System.Windows.Forms
。
与源代码管理相关的消息不是问题,可以忽略,因为您不会对此项目进行更改以发布回 CodePlex。
我想使用 Unreal Tournament 环境作为使用 C# 开发 AI 机器人的游乐场。我在这里 Creating NET bots for UT, however this site is not maintained with lots of dead links. A video on this project UT3 Bots for .Net An updated version of the C# code is moved to Codeplex .NET Unreal Tournament Bots 找到了一个很好的起点。它提供了一个包含构建过程模板的文件夹和一个包含解决方案的文件夹。
我无法构建此代码。我没有使用模板的经验,在 VS2012 中加载解决方案不会构建。 VS2012迁移代码到这个版本,.NET version 2.0/3.0有警告,但是没有报错。所以我不认为这是致命的。
如果我在 VS2012 中加载解决方案,我会收到解决方案映射错误:
The mappings for the solution could not be found. [...] The active solution has been temporarily disconnected from source control because the server is unavailable. To attempt to reconnect to source control, close and then re-open the solution when the server is available. If you want to connect this solution to another server, use the Change Source Control dialog.
如果我尝试构建,我会收到以下构建错误:
2>D:\Essential\Programming\Visual C#\Unreal tournament\UT Remote bots\UTRemoteBotSolution\UTUserBot2004\RemoteUserBot.cs(189,35,189,43): error CS0246: The type or namespace name 'UTVector' could not be found (are you missing a using directive or an assembly reference?) [...] ========== Build: 0 succeeded, 2 failed, 2 up-to-date, 0 skipped ==========
所有错误似乎都指向 UTUserBot2004
,这是提供的 4 个解决方案之一。两个(UTUSerBot
、UTRemoteBot
)针对UT 1999年度游戏版本,另外两个(UTUserBot2004
、UTRemoteBot2004
)针对UT 2004。我只感兴趣在最初的 Channel9 post.
我假设提供的代码没问题,我认为问题在于我缺乏如何让这段代码工作的经验。
任何有助于构建此代码的帮助都将不胜感激。
您正在使用的项目使用了较旧的编译方式,在项目构建完成后,它被复制到解决方案中另一个项目的 bin 文件夹中。因此,除非您的项目位于完全相同的文件夹结构中(即 E:\Shared Files\Shares\
),否则它将无法复制到正确的位置,并且不可用。此外,并非所有项目都相互引用。
要更正此问题,请首先转到 UTRemoteBot
项目的属性。在 Build Events
选项卡上,删除 Post-Build Event Commands
中的所有内容。接下来,右键单击 UTUserBot2004
项目,然后 Add -> Reference...
在解决方案选项卡中,选中 UTRemoteBot2004
项目。
此外,该项目缺少对 System.Windows.Forms
的引用。再次,右键单击 UTRemoteBot
项目,Add -> Reference...
在“程序集”选项卡上的“框架”下,选中 System.Windows.Forms
。
与源代码管理相关的消息不是问题,可以忽略,因为您不会对此项目进行更改以发布回 CodePlex。