Hello there,
A little background:
I’m developing on linux and have been able to run the precompiled release of the game engine successfully (along with 2 C# bots)
What I’m asking:
I’d like to build a Golang bot sample but it seems the game engine only supports csharp (CIL) based executables… (I am able to cross compile to a native windows target from linux + Go.)
In the code I see the following in the BotHarness:
switch (meta.BotType)
{
case BotMeta.BotTypes.CSharp:
case BotMeta.BotTypes.CPlusPlus:
case BotMeta.BotTypes.FSharp:
_botRunner = new DotNetRunner(this);
break;
... etc
which in turn calls DotNetRunner which just tacks “mono” in front of the exe file:
private string ConvertProcessName(string processName)
{
return Environment.OSVersion.Platform == PlatformID.Unix ? "mono" : processName;
}
Which is fine for C# and F# cases but when I want something that doesnt build the Common Intermediate Language stuff of C# I get:
Cannot open assembly ‘gobot.exe’: File does not contain a valid CIL image.
Would you be against me adding another Runner for purely compiled (ie “no vm in the middle”) languages? I’m not sure how DotNet stuff compiles(or works even) but it seems like the exe might perhaps be thin wrapper around something that’s still being interpreted ?
Forgive me if I’m missing something here. C# not really my strong suit.
I appreciate the input. Or any better solution you may prefer. (I can show you a gist with the Gobot if you should be interested) This would probably also help those who want to build Rust, C++ or C targets. I’m not sure the DotNetRunner will work for those building gnu gcc code.
All the best,
Stephan
PS
here is how I compile the go stuff for windows:
GOOS=windows GOARCH=amd64 go build -o /home/stephan/source/entelect-2017/dls/Version\ 1.0.0/refbots/go/gobot.exe main.go
Here is my bot.json file:
{
"Author":"John Doe2",
"Email":"john.doe2@example.com",
"NickName" :"Goon",
"BotType": 0,
"ProjectLocation" : "",
"RunFile" : "gobot.exe"
}