Has anyone built a Mono Server in 3.1.1?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JoshLee0915

I have been playing with Godot and have been loving it thus far. A small group of friends and I wanted to try out Godots network capabilities with a simple multiplayer game following a fairly standard server-client setup. We wanted to setup a headless server written in C# using Godot with mono for the back end.

Since Godot does not provide a server export for Mono yet we decided to try to compile one our self but have been having trouble getting it to work. After fiddling with the build scripts some we where finally able to create the glue and server exports but any time we try to run the exported project we get a crash with the message “The loaded API assembly is invalid”. After some digging it looks to be because the API assembly is out of sync but we are not sure yet.

I am wondering if maybe the glue did not generate correctly or if Godot even supports building these export templates with Mono yet. I think it might be a problem with the glue as we get a segfault right at the end of generating it on first run though all other runs have no issue, but at the same time it seems the build script for Mono is missing the deceleration for the server platform (we had to add these in) so I am wondering if this is even supported yet.

So I wanted to ask if anyone has had success on creating a Mono Server Template, and if so how?

:bust_in_silhouette: Reply From: Zylann

Someone opened an issue about this: Add: Binaries for headless/server versions of Godot with Mono · Issue #25786 · godotengine/godot · GitHub

Note: I don’t think there is a server “platform”, you could still run your game server by making your scene tree a in server mode I think, until proper “server” export is supported (i.e with no rendering etc).

That was what I was thinking as well. I just wanted some confirmation as there is another answer on here that suggested you can, and that issue was not clear if it was not supported or they just didn’t distribute the template.

As for your suggestion we do have a server we can run but we wanted to make it headless to host it on a service like digital ocean and that is why we where trying to build a server export template.

Thank you very much for you help.

JoshLee0915 | 2019-10-10 02:02