Closed api-Hypernova closed 7 years ago
Should research (and thus consider) using a pre-built solution such as GRPC.
After further research it's pretty obvious what I should have referenced was actually protobuf. Also, though it's in the installation instructions, I'll point out that it's important to provide the cmake flag -Dprotobuf_BUILD_TESTS=OFF
to decrease the size of the binaries.
Moved this to a Milestone.
@this Cuz idk where the milestones are We can use object level serialization. Since as objects and types will have node ids and these Ids will remain constant between client and server we can simply send the serialized tree of said changed objects, or the changes of the object and location in the object that needs changed.
Then we can use a call in as that will automatically track the the changes in a variable and add it to the buffer. So I can declare something like class player { vec o; vec rot; awake() { sendchagestoserver(@o); sendchangestoserver(@rot); } ... };
@chasester The Milestone list can be found by buttons shown at the top of the backlog list, or here: https://github.com/chasester/Rival3dengine/milestones Will move your comment to the investigation ticket on that Milestone.
In the current system, we have a hardcoded set of packet types which are used to pass a specified set of information, some defined as client->server while others are client->client. The whole API is unnecessarily restrictive, while state synchronization is becoming more and more complex. The Inexor project has proposed one possible solution with their tree API:
https://github.com/inexor-game/code/wiki/Inexor-Tree-API
More details to follow. This should become a milestone eventually.