What is "network_synchronizer" and how to use it in MMORPG (Godot 4 + Django)? #116
Replies: 10 comments 3 replies
-
Please tell me, did I write everything correctly about “network synchronizer”? 😊 |
Beta Was this translation helpful? Give feedback.
-
Please tell me, I think many novice users of Godot may be interested in the question of whether there is any difference in the “Prediction and Reconciliation” strategy, which is mentioned in the description of Netfox, and the “Prediction and Rewinding” strategy, which is mentioned in the description of “network_synchronizer” ?
|
Beta Was this translation helpful? Give feedback.
-
@AndreaCatania Hello, please tell me if I wrote the information about "network synchronizer" correctly? |
Beta Was this translation helpful? Give feedback.
-
@AndreaCatania Hello, if you have some free time, please tell me if I wrote the information about the "network synchronizer" correctly? |
Beta Was this translation helpful? Give feedback.
-
First of all, it's very important to clarify the nature of the Network Synchronizer: what problem it solves, to understand the philosophy behind it, and why the features are integrated in the way they are. The If the game is not a real-time game, the
Yes, you are correct regarding the use of "Action." However, this feature has been completely refactored. I was not satisfied with the implementation, so it was replaced with a new feature called You can use the Timers
The GameplayBesides timers, you can use this feature for interactions, such as:
This means you can get quite creative with its applications. AdvantagesThe way I plan to integrate a method that allows triggering the
This library and Godot networking have some overlapping features, but for the most part, they are two completely different tools that you want to use together. So yes, your understanding is correct. Speaking of common features, Godot offers node state synchronization, similar to what the
Your understanding of the prediction and rewinding model is correct, but something to point out is that the The character, after registering its controller, is the object that is simulated, predicted, and rewinded. The scheduled procedures are just a utility but not the main way to use the library.
You can drag and drop the library into the Check: #143
This is the only problem with the Here’s the most important link: scene_synchronizer.h documentation
The biggest kudos for supporting this project go to Together Labs, which sponsored the development of this library. The most important and complex features were integrated, tested, and refined under their sponsorship. What you see in this public repository is just a small part of the work that was done before publishing this library to the open-source community. Then, Halcyon Zero (Pahdo Labs), The Mirror, Flying Toyz, and some other community members have contributed to making this library more reliable over time.
I'm not an expert in what the The
|
Beta Was this translation helpful? Give feedback.
-
@AndreaCatania, I want to inform you that at the moment the main area of using I informed Jared about this work even before he publicly announced the closure of work on the Mirror project based on Godot, now that we see that The Mirror Classic will not be actively developed by the original team, we are doing a major refactoring of The Mirror Classic, including significantly improving the architecture, changing the client-server interaction and much more. Our main specialist on this issue is @krnico Our work is currently based on non-profit activities (we finance the work using the team members' own funds), in the future we plan to launch crowdfunding and other ways of attracting resources for the development of the project A brief description of the project in various directions can be read in this Issues, in this repository after some time the code will be published after the first stage of the global refactoring of The Mirror and its transformation into @AndreaCatania, I thank you for the great work you have done! |
Beta Was this translation helpful? Give feedback.
-
That’s great, thanks for sharing what you’re working on! Based on the questions above, it seems like you’re considering switching to a different networking library. While it’s certainly possible to switch and retain all the novel features we implemented in TheMirror, any library that supports prediction and reconciliation should work well in principle, I suggest sticking with the current library unless there’s a compelling reason to change, as we’ve already tested it extensively. |
Beta Was this translation helpful? Give feedback.
-
@AndreaCatania, Hello. At the moment we are solving two main issues, which we partially solved and partially did not, including due to the problem with 1. Implementation of the approach "Move the world, not the player". Since we need to create, so to speak, "an analogue of EVE Online with blackjack and girls", we need a large space, so for this we will not be enough even to introduce 64-bit coordinates or other options. We need to make the player to be in his own Space with local coordinates, so that the whole world moves around him. Absolute coordinates will be on the server and will be converted to local and back for each player. 2. Implementation of the approach "The client sends actions to the server, not data". To avoid cheating, we need to fully implement the approach where the player creates actions on the client, these actions are checked on the server for their possibility, and then the results of these actions are calculated and transmitted to the client. This, as I understand it, is also related to I understand that part of what I wrote was implemented in @krnico is currently fully immersed in refactoring The Mirror, maybe in a couple of weeks he will have time to describe the new architecture, including how we now use As a result, I want to say that at the moment we are trying to use as much as possible the work that was previously done on The Mirror, including Just in case, I will tell everyone who may be reading this text that the door to our project is open, everyone can join, although it will not be easy to do now, until we have the code unloaded after refactoring, it is difficult to join the work on the code that cannot be viewed, but after some time this stage will be passed and the code will be unloaded into the repository. We are still doing this work out of enthusiasm, but we are also confident in the commercial success of the project. |
Beta Was this translation helpful? Give feedback.
-
Hello! Check it out: https://godotengine.org/article/emulating-double-precision-gpu-render-large-worlds/?ref=the-godot-report Let me know if you are also having any difficulties compiling the library for the latest version of Godot? |
Beta Was this translation helpful? Give feedback.
-
@Malkverbena Hello, thank you for your comment! I wrote about this above: "so for this we will not be enough even to introduce 64-bit coordinates or other options". Perhaps I wrote it in a not clear enough way. I will give an additional explanation. Unfortunately, 64-bit coordinates do not solve all the problems when creating an open world on a cosmic scale. You can look at the project "Godot 4 for 3D open worlds" and there in the list of implemented solutions "Large World Coordinates" is only one of the items. https://github.com/roalyr/godot-for-3d-open-worlds But the larger the coordinates, the more problems with them, it even affects the performance and load of the computer. We consulted with various specialists in game engines and performance and they say that if it is important for us to load the client application as little as possible, and therefore for users to have less load on their computers, then the only solution is to implement the concept "Move the world, not the user". Perhaps you do not agree with this concept and you have a different experience? In any case, I am grateful to you for taking the time to join our work, if you want we can exchange our contacts in Telegram and discuss various issues there. If you have such a desire, here is my profile 😊 https://t.me/Vladimir_Levadnij |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I thank the developers for creating "network_synchronizer", as far as I can imagine it is a powerful and interesting product.
But I have not yet fully understood how "network_synchronizer" can be used 😊 I will try to describe what I understood and ask my questions about how network_synchronizer can be used in the MMORPG that we are creating on Godot 4 + Django, which is an analogue of EVE Online. I am sure that such information will be useful to people who will research this project 😎
What is "network_synchronizer"?
The main idea of network_synchronizer is to ensure efficient synchronization of game actions and states between clients and the server. One of the key features is
Action
, which allows you to execute code synchronously on all clients. For example, this can be used to synchronize actions with objects (like opening/closing doors) or to transfer information between the client and server, such as signaling loss of health or other game events.To register actions, use the
NetworkSync.register_action
method, which allows you to specify an object, a method that will be executed when the action is activated, and a method to encode the action parameters into a compact format to optimize the use of network bandwidth. A client can trigger an action usingNetworkSync.trigger_action_by_name
, which allows the action to be executed synchronously across all clients.In addition to the basic functions, network_synchronizer offers additional features such as Server validation to prevent cheating, the ability to wait for server confirmation before performing an action on the client (Wait server validation), and specific actions for individual clients (Specific peer action and Server only trigger, which improves the security and flexibility of network synchronization in multiplayer games.
"network_synchronizer" is not a replacement for Godot server?
Yes, network_synchronizer does not replace the Godot server, but is an additional component in the technology stack. In the context of Godot game development, the main purpose of network_synchronizer is to ensure efficient and synchronized processing of events and actions between clients and the server, using an action prediction and rollback model. This is critical for real-time multiplayer games that require a high degree of coordination and consistency of game state between all participants.
Godot server, in turn, is a more general concept that describes the server side of your game, which handles game logic, network requests, and other server processes. It is responsible for game world management, authentication, data storage, and other tasks necessary to support multiplayer interaction in the game.
Using network_synchronizer with a Godot server will allow you to effectively synchronize in-game actions and states between clients and the server, while providing optimization and anti-cheat capabilities. This combined solution provides greater control and security for developers looking to create robust and scalable multiplayer games powered by the Godot engine.
What is Prediction & Rewinding networking model?
The Prediction & Rewinding model is a common approach in real-time multiplayer game development that helps minimize latency and improve the gaming experience by predicting player actions on the client side and adjusting those predictions on the server if necessary.
Prediction is a technique in which the client side of the game predicts the outcome of the player's actions without immediate confirmation from the server. For example, when a player moves, the client immediately displays that transition on the user's screen without waiting for confirmation from the server. This creates the illusion of instant response, even though the movement data still needs to be confirmed by the server.
Rewinding is the process by which the server checks the predictions made by the client and, if a discrepancy is detected, adjusts the state of the game on the client to match the actual state on the server. If the prediction was incorrect (for example, due to a collision that did not exist on the client), the server sends correction information to roll back the changes and synchronize the game state on the client with the actual state on the server.
In the context of network_synchronizer, Prediction & Rewinding networking model is used to ensure synchronization of actions and states in a multiplayer game. Clients predict the results of their actions and display them immediately, resulting in fast response and smooth game mechanics. At the same time, the server regularly checks and adjusts these predictions, ensuring that all players have the same and up-to-date view of the game world.
This approach allows you to create multiplayer games with low latency and high interactivity, making the gameplay smoother and more enjoyable for players, even with high network latency. It is especially important for games that require quick response and precision, such as shooters, racing and sports simulations.
How can I connect "network_synchronizer" to my Godot project?
"network_synchronizer" is created in C++, does NOT use GDExtension, but is implemented as a C++ module that requires Godot to be recompiled.
Here is the official documentation on how to do this
https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/custom_modules_in_cpp.html
???Or is this link more correct???
https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/binding_to_external_libraries.html
Where can I see documentation and examples?
For a true samurai, documentation is an unnecessary barrier to learning the real truth. But still, for those who are not looking for the “real truth”, there is a small amount of documentation:
Wiki with a little bit of how to use and how to debug https://github.com/GameNetworking/network_synchronizer/wiki/Actions
Old example project implemented on an early version of Godot 4 https://github.com/GameNetworking/example-project
Most of the documentation can be found inside C++ classes
https://github.com/GameNetworking/network_synchronizer/blob/main/scene_synchronizer.h#L48
https://github.com/GameNetworking/network_synchronizer/blob/main/doc_classes/GdSceneSynchronizer.xml#L6
What projects use "network_synchronizer"?
Previously mentioned Old example project https://github.com/GameNetworking/example-project
Halcyon zero (Pahdo labs) is an isometric Action RPG set in an ethereal, anime-inspired world https://www.halcyon-zero.com/
The Mirror is a next-gen game development platform designed to empower developers and artists with real-time, limitless creativity https://www.themirror.space/
Are there alternatives to "network_synchronizer"?
There is no direct alternative to "network_synchronizer", but on the Godot Discord server, some users (who have not yet learned the zen of the samurai) claim that it is easier to use the netfox addon kit https://github.com/foxssake/netfox
Netfox addons are implemented in GDScript and can be easily installed in Godot. It should be noted that “network_synchronizer” is implemented in C++ and has better performance. These solutions also have a number of other differences.
Beta Was this translation helpful? Give feedback.
All reactions