LogoLogo
API Status
  • 👋Welcome
  • 🌐What is Morpheus Platform?
    • Interoperability
  • â„šī¸Help
    • 📗Glossary
    • 🆘Support
    • Firewall problems
    • EULA
  • CREATION
    • 🎮Unreal Development
      • ⚡Get Started
        • âš’ī¸Download the Editor
        • âĢUpload Content
        • 🌎Creating your own map
        • 📝Morpheus Base Project
        • ❓Differences from Unreal
          • 🧍Character Configuration
        • 📡Morpheus Networking
          • Introduction to Morpheus Networking
          • Network Levels
          • Replicated Properties
          • RPCs
          • Morpheus Render Targets
          • Morpheus Array
          • Networking FAQ
          • Replicating Sublevels
      • 📚Features & Guides
        • 📒Example Plugin
          • Nameplates
          • In-game roles
          • Resizing
        • 🏊Actor Pooling
        • 🔊Audio
        • 🎭Avatars
          • Creating an Avatar
          • Attachments
            • MML Attachments
          • Custom Animation Variables
          • Importing an NFT collection
          • Capsules and Mesh Transforms
        • 🤖Bots
        • đŸŽ™ī¸Chat
          • Unreal Text Chat
        • đŸŽ›ī¸Control Panels
          • Control Panel Configuration
          • DJ booth mission control
          • Observer Controls
        • 🔉Crowd Audio
        • đŸ¤ŧCrowd Rendering
          • Legacy Animated Crowd
            • Animated Crowd Console Commands
            • Attaching static meshes to crowd members
          • Crowd Materials
          • Performance Parameters
          • Live Config Settings
          • Crowd Animation
            • Crowd Anim Blueprint
              • User Guide - Crowd Anim Blueprint
              • Reference Guide - ABP Nodes
                • Animation Playback
                • States and State Machines
                • Variables
                • Transitions
                • Special
                • Blends
                • Additional Notes
        • 🍱Helpers & Extras
          • "Instanced Objects" in Blueprints
          • Objects with "world context"
          • Making DataAsset classes
          • Duplicate Objects
          • The Bootflow Subsystem
          • The "Wait For Condition" System
          • Advanced Graphics settings
          • Listening to inputs on UObjects
          • Morpheus UserID
          • World Services
          • M2Extras: Skins System
        • đŸ–Ĩī¸Loading Screen
        • ⚡Live Config
          • Editing for a World
          • Editing Locally
          • Default Settings
          • Accessing via Blueprint
          • Adding New Settings
          • Overriding Defaults
          • Using Arrays
        • 🧊MML
        • đŸ•ēMotion Capture
        • 📡Networking
        • đŸ“ĸNotifications
        • Raycastable Crowd
        • 🌐Singletons
        • 📱Streaming & Multiplatform
          • GFN on mobile
        • đŸ–Ĩī¸UI
          • "UI Mode"
        • đŸ—ƒī¸User Collections
          • Creating a New Object Definition
          • Accessing from Unreal
            • Creating Objects Definitions
            • Transfer Objects
            • User Collection Views
            • Receiving Updates
        • đŸ“ēVideo Players
          • Embedded Video Player
          • Millicast video streaming
            • How to Setup an In-Game Video Stream
            • Picture-in-Picture mode
          • Streaming Video Player
            • How to Setup a URL Video Player
            • Picture-in-Picture mode
        • 🐞Visual Debugging
          • Inspector
        • đŸĒŸWeb UI
        • Online Services
          • KV Store Service
        • 💠Web Requests
          • Http Requests
            • Legacy HTTP Nodes
          • JSON Handling
          • WebSockets
          • Identity Validation
          • Allowed External URLs
          • Walkthrough Example
            • Example Counter Service
        • âœˆī¸World Travel
          • World Travel in the editor
        • Avatar Physics Assets
        • Action Gameplay Helper Components
      • 🔑Workflows
        • â†—ī¸Upgrade the Editor
          • đŸ–Ĩī¸Version History
        • âš™ī¸Editing Project Settings
        • 📈Profiling
        • đŸ§ēMarketplace Importing
        • đŸ› ī¸Extra Workflows
          • Setup Play-in-Editor
          • Setup Local Asset Validation
          • Adding Gameplay Tags
          • Validating Game Assets
          • Custom Connection Modes
          • Connect Editor to a World
          • Common Issues
      • 📚Useful Reading
        • ⭐Best Practices
    • 🌎Worlds
      • 📩Invite Players
        • Setting Role Groups
      • Persistent Worlds
      • Always on Worlds
    • 📅Running events
      • ✅Large scale events - Checklist
      • 👾Anti-Cheat (EAC)
      • 🎮Player Entry
        • 📱React Native
        • Steam
        • đŸ’ģHardware Reqs
      • đŸŽĨBroadcast
        • 📹OBS Integration
      • Failover
      • 🏁Capacity And Queue Management
  • ADMINS
    • đŸ‘ĒAccess Control
      • Adding metaverse contributors
      • Creating a new project
    • 💲Pricing
      • Development Support
      • Included Usage & Overages
      • Cloud Streaming
      • Access Modes
      • War Room Support
      • Platform SLA
    • âš™ī¸Settings
      • đŸ—ƒī¸Projects
  • APIs and Tooling
    • đŸ–Ĩī¸API Reference
      • Accounts
      • Events
      • Key/Value Store
      • Organizations
      • Realtime
      • User Profile
      • World Builder
      • Worlds
    • đŸ’ģTemplate Web App
      • đŸ’ĸModeration
    • Pixel Streaming
    • 🚀Launcher
  • Integrations
    • 📊Analytics
      • Sending events from web
      • 🎮Sending Events from Unreal
    • đŸ’ŦChat
      • 🎮Integrating Pubnub with your Unreal Project
      • Adding Moderation to Chat
Powered by GitBook
On this page
  • Overview
  • Foreground
  • Midground
  • Background
  • Customizing Network Levels
  • Modifying the number in a given network level
  • Modifying the "client origin" for network prioritization
  • Forcing/prioritizing an entity into the foreground

Was this helpful?

  1. CREATION
  2. Unreal Development
  3. Get Started
  4. Morpheus Networking

Network Levels

PreviousIntroduction to Morpheus NetworkingNextReplicated Properties

Last updated 13 days ago

Was this helpful?

Overview

Each on an AMorpheusActor belongs to one of three network levels (Foreground, Midground or Background) as defined by the user.

Seeing an AMorpheusActor at a specific network level means you can see all replicated properties belonging to that network level and below. For example, if a client is seeing an AMorpheusActor in the midground, it will see all the actor's background and midground properties. This means that every client will see all background properties for every AMorpheusActor in the world at all times.

Each client decides actors' network levels according to a prioritization algorithm. The network levels are filled in order, so that the highest priority actors are in the foreground, the next are in the midground, and the remainder are in the background. The number of actors allowed in foreground and midground is customisable: see Modifying the number in a given network level.

By default, the algorithm prioritizes all actors based on their distance from the client's authoritative Morpheus pawn, but there are some exceptions. For these, see Forcing/prioritizing an entity into the foreground and Modifying the "client origin" for network prioritization .

You can specify the MinimumNetworkLevel of an AMorpheusActor type. The AMorpheusActor will be forced into at least this network level at all times.

Below is a breakdown of each network level, its behavior, limitations and examples.

Foreground

All foreground properties are replicated at 60Hz.

Foreground properties can use most types supported by standard Unreal replication: see .

Multicast RPCs are only received for actors in the foreground network level.

Depending on the game, each client will likely be able to see on the order of 50-100 actors in the foreground. Foreground properties cost much less bandwidth than midground & background ones. You should only move a property out of foreground if you definitely need it to be more widely visible.

Typical foreground properties include:

  • The player's name.

  • The player's current chat status.

  • A list of the player's teammates.

The server sees every actor in the foreground network level, but only receives foreground property updates at 30Hz.

Midground

All midground properties are replicated at 30Hz.

Multicast RPCs are not received for actors in the midground network level.

Depending on the game, each client will likely be able to see on the order of 500-1000 actors in the midground.

Typical midground properties include:

  • A higher fidelity quantised position of the actor.

  • The quantised rotation of the actor.

  • The colour index of each player's hat.

Background

All background properties are replicated at 6Hz.

Multicast RPCs are not received for actors in the background network level.

Because every client sees all background properties in the world, you have to be careful what you mark as a background property. Adding background properties which frequently change value can incur a large bandwidth cost to your game. Additionally, processing a large number of OnReps in a single tick in BP can impact client performance. You should only mark a property as being in the background if it is absolutely essential that it is visible on all clients.

Typical background properties include:

  • A low fidelity quantised position of the actor.

  • An index determining which player character the actor is.

  • The current emote index of each player.

Customizing Network Levels

Modifying the number in a given network level

The number of entities in a given network level can be modified in 2 ways:

Via Live Config:

  • To modify the number of players in the foreground level, use PlayerClient.Networking.NumInForeground (in the game config)

  • To modify the number of players in the midground, use PlayerClient.Networking.NumInMidground (in the game config)

NOTE: The number in the midground includes all the number in the foreground. Therefore, NumInMidground must be >= NumInForeground. If you want 3 foreground entities, and 3 explicitly midground entities, you would want NumInMidground to be 6.

  • The remaining entities will be placed in the background.

NOTE: Updating the live config will apply to all users.

Via BP

NOTE: This section contains features that were added for release version v29. Some functionality described here won't be present in earlier versions.

We have a helper function on the MorpheusClientConnection class - UpdateBucketMaxEntities. By providing the appropriate bucket name (via GetForegroundBucketName or GetMidgroundBucketName respectively), you can call this method to manually update the bucket's max entites.

(Similarly, we have GetBucketMaxEntities which returns the current value for the relevant networking bucket.)

To get the correct MorpheusClientConnection for the local machine, you can call GetOwningClientConnection on an authoritative Morpheus Actor (e.g. the local player's Morpheus Actor).

NOTE: Calling this method will only apply locally. If you want to update the number for everyone, you will need to either call the method on all machines, or go via the live config approach.

Modifying the "client origin" for network prioritization

NOTE: This section contains features that were added for release version v28. Some functionality described here won't be present in earlier versions.

The client connection uses a "Client Origin Actor" to determine the client's centre for distance related priority calculations. By default this is the authoritative pawn that the client is controlling, but it can be modified.

E.g. if you want to make a "sniper" feature, where you focus in on a distant location, you would want the most high fidelity networked actors to be around your zoomed in location, not your actor's current position.

This client origin actor can be live-updated, by calling the PushClientOriginActor method, providing a new actor to use as the origin location. This makes the new actor trump the default as the origin for the prioritization logic. Once you are done, and want to go back to the default prioritization, call RemoveClientOriginActor, to stop considering your new actor, and return to using the previously set one.

(If you want the client origin to be at a fixed or relative location, the simplest approach would be to spawn an invisible actor, and use it as the Client Origin Actor).

Forcing/prioritizing an entity into the foreground

NOTE: This section contains features that were added for release version v28. Some functionality described here won't be present in earlier versions.

If you want a particular entity to be preferred by the prioritization system regardless of position

This is used e.g. by our "presenters": if you have a VIP player in your game that you want everyone to see at the highest fidelity, you can set it to be prioritized.

There are two ways of achieving this:

  • Via the SetIsForcedIntoForeground method on a morpheus actor:

    • (This will mean that the actor is prioritized on the local machine, and so will trump non-prioritized actors, regardless of position)

  • Via the Capabilities.Morpheus.ForceIntoForeground capability:

    • (This does effectively the same as the approach above under the hood)

    • The capabilities can either be set manaully, or via your Game Roles

NOTE: The forced prioritization here does not override the cap of entities in the foreground network level. If you have e.g. max 30 entities in your foreground, and have 50 prioritized, it won't put all 50 in your foreground. 30 is still the max.

Background properties can only use a narrow set of types: see .

Background properties can only use a narrow set of types: see .

🎮
⚡
📡
replicated property
Supported types
Supported types
Supported types