Server-side game logic abstraction

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By KoBeWi
:warning: Old Version Published before Godot 3 was released.

I’m making a multiplayer game (MMORPG to be exact). I’m using node.js for server and Godot for client. I managed to set up connection between the two, but then I realized I have a problem. Normally in MMORPG you want all interactions to be server-side. I suppose that means I have to write game logic on the server in Javascript. If it was a typical MMORPG, that wouldn’t really be a problem, but in my game… that would be too complicated XD

So I thought that I could use sort of server-side client instances to mirror the game logic on the server. I mean, client does the interactions itself as part of the client-side predictions, but I want to simulate the same thing on the server, so that the game’s logic doesn’t depend on client calculations (so I avoid cheating and all the problems). And I’ve been wondering if it’s maybe possible to run Godot game instances, but with anything that does rendering and graphic stuff etc. disabled. I mostly need a collision detection and since client is made in Godot, it would be much easier to synchronize it with the server.

So, is there some way to use only parts of the engine, to avoid overhead? Perfectly I’d like it to use the same project as normal clients, but run it with special parameters that disable unneeded parts.

support of you.physics check could be done at server side game engine will make great helpful!

lorancechen | 2017-12-07 19:01

So, it appears there’s a thing like “headless Godot”, which seems totally what I wanted. However it runs only on Linux :confused:

KoBeWi | 2018-02-27 17:00

:bust_in_silhouette: Reply From: KoBeWi

Writing this answer just so this question doesn’t remain unanswered, lol.

What I wanted is already done in form of “Headless Godot” - Godot executable that runs in console mode with dummy renderer and audio server. It’s available only for Linux right now, but I tested it and seems to do the job.

I’m newbie to Godot. Same question about using godot as dedicated server.

  1. could headlees godot support simple CPU simulate collision rather then GPU? box2d like detection.
  2. could gdscript run as parallel? because many room/zone is irrelevant

Thanks

GD_LoranceChen | 2019-10-03 12:12