Download

FAQ: Miscellaneous Networking

Dec 2, 2020.Knowledge

How would we go about using voice through Unreal?

  • For an implementation example, the ShooterGame sample project (available through the Epic Games Launcher) is set up to work with voice chat.
  • Voice functionality is handled automatically by the session interface. A player’s voice is registered/unregistered when a player is registered/unregistered with a session.
  • To enable voice, you’ll want to add the following to your *Engine.ini file:

[Voice] bEnabled=true [OnlineSubsystem] bHasVoiceEnabled=true

  • To require push to talk, the following should be added to the *Game.ini file:

[/Script/Engine.GameSession] bRequiresPushToTalk=true

What are the best settings for multiplayer VR, and what would the performance parameters be?

  • Using a dedicated server would be recommended in order to avoid the extra CPU load of a listen server (a client also being the server).
  • Whether the app is VR or not shouldn’t necessarily affect the dedicated server requirements, as it does not render anything. VR doesn’t add extra cost to hosting, but it does have an impact on the visuals (client side) to run at 90 FPS.
  • Other than that, standard VR best practices will apply: Virtual Reality Best Practices | Unreal Engine Documentation

How do you supply URL parameters to the connection request?

  • URL parameters can be supplied by appending them to the URL connection string before passing it to, for example, APlayerController::ClientTravel. For an implementation example, see UShooterGameInstance::InternalTravelToSession in the ShooterGame sample.

What are some strategies for managing player-specific replication?

  • Unreal doesn’t have an easy built-in way to handle this, but there are a few strategies:
    • You can use separate actors on the server that are only relevant to a specific client or clients. For example, PlayerControllers follow this model using AActor::bOnlyRelevantToOwner, and some of the available property replication conditions, such as COND_OwnerOnly or COND_SkipOwner, can achieve this as well per property.
    • It’s also possible to make a UStruct w/ a custom net serialization function and have logic to serialize different data to different connections by branching based on the connection, but this is harder for the engine to optimize and can’t benefit from shared serialization.

Can the current replication system support 1000’s of actors with lockstep?

  • We don’t have support for lock step out of the box, but you can still use our replication when building such a system.

UE4 currently has a DTLS encryption handler, but it does not seem to be working out of the box yet. Is this something that Epic is prioritizing for an upcoming release?

  • Yes, we are working on supporting DTLS in the engine as well as updating platforms’ OpenSSL versions.

Is it possible to start multiple server worlds inside a single dedicated server instance?

  • With the exception of PIE, hosting multiple active server worlds within the same Unreal Engine process is not currently supported. Implementing such a system would require significant engine modifications and can also introduce issues, such as a crash in one match taking out all of them.

Does the engine support seamlessly traveling between servers?

  • There is currently no built-in support for seamlessly traveling between servers.