Where is the documentation (if any) for understanding how the game server communicates with the client?

For people working on the C++ code.
Post Reply
kujo
New member
Posts: 1
Joined: Thu Dec 09, 2021 05:47
In-game: kujo

Where is the documentation (if any) for understanding how the game server communicates with the client?

by kujo » Post

I'm trying to get a feel for the quantity of work required to build a version of the game server in Go (mostly to experiment with high-core-count performance). I'm under no allusions about the size of a project and do not actually intend to do this for plenty of reasons. This is mostly a hypothetical thought experiment, unless I'm pleasantly surprised with how easy it would be; though I've cloned the repo and this doesn't seem to be the case. Minetest *is* meant to be modded, though, so I'm holding out a little hope that I could do so.

User avatar
Blockhead
Member
Posts: 703
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: Where is the documentation (if any) for understanding how the game server communicates with the client?

by Blockhead » Post

All the docs that matter live in the source repository. In particular minetest/doc/protocol.txt will help you. But in my opinion really there's very little you could do to speed up Minetest when most of the server's workload is written in thread-unsafe Lua code, crossing the boundary between Lua and C++ has its own costs which won't go away when switching to Go, and C++ is just as multi-threadable as Go or any other useful programming language.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB

User avatar
DS-minetest
Member
Posts: 1275
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: Where is the documentation (if any) for understanding how the game server communicates with the client?

by DS-minetest » Post

See also:
* <https://github.com/minetest/minetest/bl ... entiface.h>
* <https://github.com/minetest/minetest/bl ... nnection.h>
* <https://github.com/minetest/minetest/bl ... protocol.h>

But in the end, you have to RTFS (S for source) to understand everything.

--------------
Blockhead wrote:
Wed Nov 02, 2022 11:36
thread-unsafe Lua
FYI, "thread-unsafe" is the wrong term here. It's not thread-unsafe because it has no threads.
Blockhead wrote:
Wed Nov 02, 2022 11:36
C++ is just as multi-threadable as Go or any other useful programming language.
A language doesn't have to support multithreading to be useful, just take lua as example. >:(
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest