godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.89k stars 20.16k forks source link

Implement headless (server) version for all desktop platforms #11389

Closed akien-mga closed 4 years ago

akien-mga commented 6 years ago

Operating system or device, Godot version: All desktop platforms, master branch (7bd0067).

Issue description: The current headless version of Godot (no rendering, no audio), a.k.a. the "server" platform, is Linux-specific (platform=server).

The dummy rasterizer and dummy audio servers are however platform-independent, and only the windows management code is platform-specific.

We should eventually replace the server platform by a server=yes compilation switch that would apply to all desktop platforms where it makes sense (Linux, macOS, Windows).

Zylann commented 6 years ago

Is there a way to run a Godot game in server mode even with a visual interface? It can be useful for debugging (while a headless export is better for a stable game build).

akien-mga commented 6 years ago

Well server mode just means "no visual and audio". But you can run your game's server with a normal editor binary, yes.

jedStevens commented 6 years ago

I know this is more of a feature proposal thread, but I was running into issues compiling the server version using a Heroku machine. I'm sure that people will want this for easy multiplayer so this may aid in developing the compilation but then again maybe not.

I was getting errors with libxcursor specifically even though these shouldn't be needed for a server build no?

Also I'm using a cedar-14 machine, which does include libXcursor but under a different location and only contained the libXcursor.so.1 and libXcursor.so.1.0.2, whereas my machine includes those and a libXcursor.so but under a different location. /usr/lib/ is the location on my laptop for these but on Heroku it seems that they are stored under /usr/lib/x86_64-linux-gnu/, it also implements wayland cursor but whatever. I'm just not an expert on this and I'm not sure if this lib is needed for simulating input or not.

I'm also curious for personal interest.

akien-mga commented 6 years ago

@jedStevens That's out of the scope of this issue, and not another bug either as it's just that you lack the development library for Xcursor on your system. Please ask such questions on support platforms such as the Q&A, forum, Discord, etc. to get help fixing it.

PJB3005 commented 6 years ago

On top of this, it should probably also be possible to run at least a normal tools build in headless with just a command line switch.

silverkorn commented 6 years ago

@akien-mga, can tag for 3.1?

@Zylann, would it be better to not include visual interface for debugging and use/create a RPC client for this instead? So if there's a need of visual interface, we might just use the main export template.

I guess the main goal of server is to have less size, slightly faster loading/processing and less dependencies on restricted platforms.

shonlove commented 6 years ago

Maybe we should make the flag, headless=yes instead - less likely to conflate that with the idea of the game server component . . .

Anutrix commented 4 years ago

What's the status on this?

Calinou commented 4 years ago

@Anutrix As far as I know, there hasn't been any progress on this. See also https://github.com/godotengine/godot-proposals/issues/198 which is tangentially related to this issue.

akien-mga commented 4 years ago

Superseded by https://github.com/godotengine/godot-proposals/issues/991.