Hello everyone!
I’m just discovering the world of replication because I’m working on my game to have cooperative sessions.
But, after a few days of replication and testing, I’m now at the widgets part of my game. And I have a question and would like to know how you would or do deal with this… I have several widgets that players can interact with because my game is a management game and each widget is being created in the HUD Class individually by player (so far so good). However, I started to analyze internally in my widgets to start adapting the code, and all the data that I present in the widgets is basically data that is in server management blueprints.
I’ve already gotten the hang of needing to make a request to the server, to get the data, retrieve it on the client and display it. However, I realized that the widget cannot make a direct call to the server. I even saw this in the UE docs, which made me adapt my code to first call the player controller, to call what I need on the server, receive it on the player controller, and then call the widget with the result and continue this cycle until it is necessary.
Is that right, guys? Am I right in my understanding here? Because it seems to be a lot of back and forth. But since it is my first time, I would like to see with someone who has more experience than me. I will not post code because it is not a code problem per se, but I believe it is more of an architecture question perhaps. If I am right in my understanding and you have read this far, leave me a tip about multiplayer that you think I should know. (NOTE: I already understood that I should have thought about multiplayer at the beginning of my project lol)