Networking FAQ
How should I avoid overloading the Unreal server?
Although the server does have authority over all AMorpheusActor
s in the game, you are able to mark a replicated property as client authoritative. This means that the client which owns that AMorpheusActor
can write directly to that property, and that value will be sent to other clients without needing to go via the server. Clients are also able to send RPCs directly to each other, meaning a lot of communication never needs to go via the server.
This ability to have client authority allows you to run cloud hosted, trusted clients which can log in and directly simulate certain 'server' computation. For example, you can log in a client which can simulate 100 AI, or 50 destructible buildings. This client can directly write to the AI or building properties, and talk to player clients directly using client RPCs, never needing to go via the server.
This allows you to put the heavy server side computation on cloud hosted 'clients', and reserve the server's capacity for higher level logic or transactions across multiple AMorpheusActor
s.
Will this work out of the box with Unreal system X
Not directly. Morpheus only replicates AMorpheusActor
s and AMorpheusActorComponent
s and classes inheriting from them, so a project will always require some work to inherit from these classes.
Morpheus does, however, provide out of the box tools to make it easier to integrate with some Unreal systems. For example, Morpheus provides the AMorpheusPawnActor
type which provides simple and scalable replication of APawn
s and their movement. This class also contains a UMorpheusCharacterActorComponent
which extends AMorpheusPawnActor
to work with ACharacter
classes.
Morpheus also has the 'render target' system which makes it simple to associate an AMorpheusActor
with any type of actor, and automatically replicate the base movement of any actor type in a scalable fashion.
My client authoritative property is not working?
Ensure you are spawning your actor on the server with client authority, see Spawning and Destroying section for more info.
Running integration tests in the editor seems really flaky?
Tests can fail if they time out, and there is a setting that makes the editor run slowly if it's not in focus. Check this setting: Editor --> Editor Preferences --> "Use Less CPU when in Background" --> Set to False
Last updated