+1 vote
in Engine by (66 points)

2 Answers

+2 votes

The server executable provides an easy way to run your game without the display and sounds showing up. It is intended for... (as you might have guessed it) game servers, that would host the game over TCP/UDP/something else. Also, it can be useful for other things as well, since it doesn't require an X server, PulseAudio/ALSA drivers, etc. etc.

Currently it is only supported on linux platforms, though it should be relatively easy to make a similar executable for windows and mac (and android and ios...) :)

by (1,564 points)

Still I wonder what man would do for a server app where gdscript has an advantage of other mainstream languages. I mean, for a server, even Python would be faster and more powerful than Godot.

This way you can easily share code and engine features between the client and the server without having to rewrite it in another language. It depends on the game so it's up to you to choose.

As a quick example, it can be useful if you want to replay the players' actions on the server, in a turn-based game, or simple reuse the scenes and scripts, etc. It isn't so easy to write a multiplayer game, but it is twice harder to write it two times over in two different languages, since then you have to make sure that the serialization and deserialization mechanisms won't break it, that all math functions function the same, that the logic is good, etc.

It's true I have no experience in multiplayer development, but in my knowledge in client-server development, there should be only once the business logic. Sure the serialization might be an issue, but since it's plain json, that's shouldn't be really difficult to write in another language.
However I see your point for some components, like the physics engine. But for a game like, for instance, chess, as long as there's an interface between the client and server, the server can be client agnostic.
And just to say, python has much much more libraries and frameworks than GDScript.

+1 vote

I also use to run scripts that process a lot of data, like convert/crop a bunch of images, etc. The server build can run on a headless system, and doesn't have to register textures in the GPU, so it's a lot faster loading images.

by (94 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.