OpenGothic icon indicating copy to clipboard operation
OpenGothic copied to clipboard

Multiplayer

Open VibingCreator opened this issue 3 years ago • 4 comments

In addition to the game reimplementation, is there any plan to create a multiplayer platform?

VibingCreator avatar Dec 19 '21 16:12 VibingCreator

Hi, @VibingCreator !

There was a general conversation on this: https://github.com/Try/OpenGothic/discussions/106#discussioncomment-962557

Basic idea is: provide some api to scripts and let them do the hard work. Api itself can be based on:

  • https://gothic-online.com.pl/wiki/Script:Client_Functions
  • https://gitlab.com/Reveares/GMP/-/wikis/Functions

Try avatar Dec 22 '21 10:12 Try

Sounds good. I have been playing around the Gothic Online platform before but Squirrel language is too lightweight solution in my opinion. I wish javascript's ecosystem would be used instead.

VibingCreator avatar Dec 25 '21 08:12 VibingCreator

I also think Javascript would be a good choice as ecosystem. There are great Nodejs libs for common server tasks like database access, file access, networking etc. Meanwhile v8 (which Nodejs is based on) contains only the javascript basics without file access, perfect for secure client scripting. They are implemented in c++ but still hard to embed.

By the way, I don't think the GMP Scripting API is great, so I wouldn't copy it. But it is certainly a start.

@Try Is OpenGothic designed in a way to be able to exclude rendering, sound, input etc. for a headless server? I'm no expert but I imagine it is quit hard too avoid too much deviations between client/server and singleplayer code. A properly implemented server would also be authoritative while the client only sends commands (for example player walks forward) for the server to validate them. It would be necessary to seperate logic handling somehow. Also the server would have to load multiple worlds.

Reveares avatar Dec 28 '21 23:12 Reveares

Is OpenGothic designed in a way to be able to exclude rendering, sound, input etc. for a headless server?

Not really, but we can change it.

Also the server would have to load multiple worlds. ...deviations between client/server and singleplayer cod

That will be way more challenging: original game is script-driven + not designed for network game-play. So we should probably look into design that accepts the fact that client-side execution wont be exact.

Try avatar Dec 30 '21 14:12 Try