GithubHelp home page GithubHelp logo

sig-network's Introduction

Open 3D Engine Special Interest Group for Networking (SIG Network)

This repository holds materials for the Open 3D Engine Foundation Special Interest Group for Networking (SIG-Network).

Description of SIG Network

We manage communication components for O3DE, including foundational networking layers, transport, multiplayer, client/server interactions and Cloud connectivity pieces of O3DE. See the SIG's charter for full details.

What does the SIG do?

  • Reviews and contribute to O3DE's technology roadmap specifically around Networking features.
  • Reviews network related issues, RFCs and PRs.
  • Ensures timely and frequent communication of networking activities (including Discord, sig meetings, triage, PR review, RFCs, etc.)
  • Actively maintains networking features.
  • Provides support to community for networking topics.
  • Works with other SIGs and the TSC on networking related features and issues that are impactful.

How do I get involved?

  • Contact us on Discord. The SIG has a specific chat channel #sig-network.
  • Attend any of our public meetings by connecting to the #sig-network voice channel on O3DE's Discord server. See the O3DE Calendar for upcoming meetings and details.
    • The SIG hosts a general meeting once a month, on the third Thursday of the month, to discuss networking features, recently contributed work, pending RFCs, and other items of interest to the SIG. Look for the meeting titled SIG-Network Meeting on O3DE calendar. Meeting agendas are posted in advanced as GitHub issues and anyone can raise issues for discussion.
    • The SIG also meets once per week, on Thursdays, to review any new issues of interest to the SIG. Look for the meeting titled SIG-Network Issue Triage and see the Triage Guide for more details of what happens at this meeting.
  • Subscribe to our mailing list, which is occasionally used to convey information of interest to SIG members.

Who can attend or participate?

O3DE cannot work without the help and input from as many of its community members as possible. You do not need anyone’s permission to get involved and contribute to the project. The #sig-network channel on O3DE Discord is a great place to begin getting involved. Many of our community members regularly share ideas, updates, and resources there. You can also find a number of topics under the GitHub Discussions area which need your input.

Helpful information

Some of this guide was influenced by the SIG-Simulation Readme. Thanks to the contributors there.

sig-network's People

Contributors

fuzzycarter avatar lmbr-pip avatar mcphedar avatar obwando avatar robhaco avatar spham-amzn avatar tjmichaels avatar vincent6767 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sig-network's Issues

SIG Maintainer Nomination

Reviewer/Maintainer Nomination

I would like to nominate: AMZN-Gene, to become a Maintainer on behalf of sig-networking. I verify that I have fulfilled the prerequisites for this role.

Maintainer Nomination Requirements

  • Has been a Reviewer for 2+ months
  • 8+ reviewed Pull Requests in the previous 2 months
  • 200+ lines of code changed across all reviewed Pull Request
  • 2+ O3DE Maintainers that support the promotion from Reviewer to Maintainer
  • Requirements to retain the Reviewer role: 4+ Pull Requests reviewed per month

Reviewers & Maintainers that support this nomination should comment in this issue.

Proposed SIG-Network meeting agenda for Feb-21-2023

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed RFC Feature: Migrate TargetManagement to a new Remote Tools Gem

Summary:

The Remote Tools Gem provides functionality for O3DE applications to connect to each other for debug and tooling purposes.

The Remote Tools Gem is the proposed successor to the TargetManagement system in AzFramework which is currently used to connect O3DE Applications to the Lua IDE. This Gem can serve as the connection layer between any O3DE applications that supports Gem loading. Existing potential use cases could include ScriptCanvas debugging and AssetProcessor. It would also become the connection solution for Lua IDE debugging as part of replacing TargetManagement.

What is the relevance of this feature?

The Remote Tools Gem enables connecting to remote applications for remote debugging and tooling. As an example, the Lua IDE could use the gem to act as a host while a game build could use the gem to connect to the host as a client in order to debug lua. The gem also enables multiple host support which allows for an instance of an application to connect to a range of hosts. A practical example of this would be the Editor connecting to the Lua IDE for debugging in addition to ScriptCanvas debugging.

The gem allows users to more easily author transport dependent debug and tooling features for O3DE applications communicating through the use of a defined communication protocol and AzNetworking's security. Specifically, it will leverage AzNetworking to provide secure authenticated communication over localhost and TLS encrypted connections which provides secure connection handshake and encrypted data transport. This will allow O3DE developers to rapidly standup debug utilities and other non-release mode utilities requiring a socket based connection for communication.

Furthermore, the replacement of TargetManagement with the Remote Tools Gem will untangle several component dependency issues caused by TargetManagement.

Since the Remote Tools Gem is intended for debug and tooling purposes, it will be compiled out for RELEASE builds meaning it will not provide any change to consumers of O3DE based products.

Feature design description:

The new Remote Tools Gem will contain the equivalent of AzFramework's TargetManagementComponent.

TargetManagement provides the ability for O3DE applications to connect with each other for debug purposes. In it, an application can declare itself a host while client applications will poll on TCP looking for a host. Once connected, the host can choose which target to communicate with via UI.

The Remote Tools Gem aims to address the following issues in TargetManagement:

  • TargetManagement only supports one host which is currently expected to be the Lua IDE
  • TargetManagement only supports one active connection vs being able to broadcast to multiple clients
  • TargetManagement forks two threads on top of AzNetworking for a single connection
  • TargetManagement has a tangled component registration pattern that would be greatly simplified by gemification
  • TargetManagement primarily uses EBUS to communicate

The Remote Tools Gem will, via AZ::Interface, provide the ability to register and poll for multiple hosts. AZ::Events will be added to replace EBUS usage for forwarding packets to handlers. Two threads will be used by Remote Tools. One to poll for hosts and will cease operation if all hosts are connected to and one for processing outbox messages for all connections.

Connections between clients and hosts will be restricted to localhost.

Once gemification is complete, TargetManagement will be red coded which will also correct related component registration issues. All usages of TargetManagement will be migrated to Remote Tools.

Technical design description:

The new Remote Tools Gem will communicate exclusively on TCP via AzNetworking. Currently, TargetManagement communicates via two types of packets. One that performs a connection handshake and one that sends a buffer of data. The buffer packets are sent to handlers via EBUS who can then deserialize and handle the buffer content as desired. This pattern offers flexibility and allows users to implement their own handling similar to Lua IDE and will be migrated to a combination of AZ::Interface and AZ::Events from EBUS.

Remote Tools will update this model to allow listeners to register a handler to a prescribed IP/Port combo. This will facilitate supporting a client connecting to multiple hosts. A practical example of this would be the Editor application being connected to the Lua IDE and Asset Processor. The goal will be for this API to be implemented via an AZ::Interface named IRemoteTools. Presently, TargetManagement starts polling for a host by default at startup. With multiple hosts, the user would have to opt in to this behavior via IRemoteTools. IRemoteToolswould be implemented in AzFramework with an implementation registered in the Remote Tools Gem.

Once traffic is received, it will be routed via AZ::Event to the handler registered for the prescribed IP/port. For example, a hosting Lua IDE will register its handler against a pre-defined listen port such that all traffic on related connections would be routed to said handler.

Connections for Remote Tools are secured via DTLS as implemented by OpenSSL including passworded private keys on the server side. Connections in TargetManagement are hard wired to localhost only. This will be removed to allow for remote debugging, leveraging passworded DTLS to enforce security and a restriction to localhost to reduce target surface area by allowing users to restrict connections to their specified surface area.

TargetMangement's threading model also needs to be revised. Currently there are two extra threads in use. One polls for a host at a low interval by attempting to connect. Connection failure is a slow event that should be investigated for speedup (potentially by authoring a query as an alternative). The other processes outbox messages for an already established connection. Two threads will continue to be used however they will be updated to handle multiple client/host connections vs just one. Both threads will be disabled if there is no outstanding work.

Once the Remote Tools Gem is authored, the TargetManagement Component can be removed and will no longer need to be registered by a patchwork mix of core libraries and AzNetworking.

How will this be implemented or integrated into the O3DE environment?

  • TargetManagement will be migrated to a Gem

  • Component registration for TargetManagement will be migrated to said Gem

Are there any alternatives to this feature?

We could potentially implement this an AzNetworking.Tools however it is important for Remote Tools to function for Launcher applications.

How will users learn this feature?

Documentation will be provided on the Remote Tools API. In addition, the Lua IDE will make use of this Gem and will consequently be an in engine example of usage.

Are there any follow up features?

There is some potential for follow up features here including:

Converting AssetProcessor from its AzSocket based stack to this Gem
Updating Remote Tools to use raw TCP Socket buffer based transport over AzNetworking's packet layer
This would more easily enable usage of the Gem for features like Remote Console without affecting other usages of the Gem
Gemification of AzNetworking
Adding a broadcast mode to Remote Tools such that a host can broadcast data to all connected endpoints vs only a selected target.
Update Remote Tools Gem to connect over a range of IPs beyond localhost as permitted by a CIDR filter.

Are there any open questions?

N/A

Proposed SIG-Network meeting agenda for Feb-01-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for Oct-18-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed RFC Feature: Multiplayer Versioning

Summary

This feature will provide a way to detect when a multiplayer server and client are using different versions of multiplayer components.

This RFC was created as a proposed fix for github.com/o3de/o3de/issues/9669

What is the relevance of this feature?

As a developer I want to know if my server and client have a version mismatch.

It's important for servers and clients to be running the same version of all the multiplayer components (components which communicate to each other over the network). Any mismatch will lead to unexpected behavior. This feature will warn users immediately upon connecting to the server if there is a mismatch.

Example:
A developer wants to push a game update to players in the wild. One of the changes was made to a multiplayer auto-component, but the change was minimal; a developer reordered the auto-components RPCs inside the XML so they were in alphabetical order (just because felt easier to read that way). Before pushing the update live, the developer tries testing the new build and starts a match by connecting to one of their production branch servers on the cloud. The game appears to be going smoothly, except the RPCs associated with this auto-component they reordered seemed have stopped working. Unbeknownst to the developer, this is because the server’s RPC index is different; although it felt minor at the time, reordering the RPCs inside the XML has broken the logic. The developer now needs to go and debug why the RPCs aren’t working as expected, which can take a long time if they don't realize the server and client are actually running different multiplayer auto-component versions.
After this feature is implemented, the developer would know right away that their client and server builds are different. Now upon connecting to the server, the client and server would share a hash-value representing the current snapshot of all their multiplayer components. If the hashes don’t match, an error message will be logged, and an error popup will be prominently displayed in the game's viewport. The developer will see the message, and know that he forgot to update the server.
Note: developers may want to add their own extensions to client/server "versioning" (ie region checks), this would instead be a feature for a custom game-specific handshake which is already supported.

Feature design description:

The multiplayer system will be updated so that it can detect when a server and client are using different multiplayer auto-components. The server and client machines will then be warned of a mismatch, at which point the user can go and update their server or client builds to the latest build version. The hash generation, error detection, and reporting will all happen automatically without adding any extra steps to the developer's normal build process.

Common example workflows:

  1. Local development: There currently isn’t any client/server code split so accidently mismatching game and server in this a local development environment is not really an issue. Whether building Editor, or GameLaunch, or ServerLauncher, the multiplayer auto-components are built as part of the game gem module and shared between all three apps. However, if client and server logic is split it may become more likely that a dev could forget to build the server after updating multiplayer components. Should this occur when developing locally, the dev will see a popup on their client app immediately upon trying to connect explaining that there’s a mismatch. “Warning: Server/Client Mismatch Detected!” The logs will include which exact components are mismatched: “Multiplayer Component mismatch includes NetPlayerController, NetCameraController, etc”. At which point the dev will likely just rebuild both server and client to be sure. One question to ask is if there’s an opportunity to narrow down knowing whether it's the client or the server that needs rebuilding (ie which one is newer and which is older)? If Jinja also generated a timestamp during compilation, perhaps this build timestamp could be displayed along with the mismatch warning logs to provide better clues as to which build is older.
  2. Developer testing with remote server: A developer might want to try testing their game using a remote server, or a server on other developer’s machines to play together. After receiving the mismatch warnings, each developer would need to check their code source control to double check who has latest. The dev with the older code will need to sync latest and rebuild. There may be an opportunity to improve this workflow using generic engine versioning; if each pull request increments a minor version number this extra information could be shared between machines and give clues as to which machine is older. However, is unlikely to help in a dev-to-dev play session since developers don’t modify their engine versions between local builds.
  3. Play testing with real players: If players in the wild have a client version mismatch with a live server, the game logic should connect to the mismatch notification bus in order to receive a callback on the client when a mismatch occurs. Game specific logic can then be deployed to assist the client upgrade to the latest client build. Although this is unlikely to be necessary as the game logic should already be using custom handshake logic to ensure the client is using the proper game version.

Technical design description:

In order for this feature not to impact normal developer workflows, we'll aim to have the normal build process automatically generate all of the code required for comparing multiplayer components. For this, we'll rely on AzCodeGen.

High-level overview:

  1. AzAutoGen creates a unique 64-bit hash value for each auto-component xml it digests.
    1. The 64-bit hash will be stored in the ComponentData class that’s passed to the global MultiplayerComponentRegistry
  2. Connection packets will be updated so that the server and the player can exchange their current hollistic version hash (see Hash Generation (Per-Application) below).
  3. During application start up, as all the gems are registering their components with the MultiplayerComponentRegistry, the MultiplayerComponentRegistry will combine each component’s hash to create its own 64-bit version hash.
  4. The MultiplayerComponentRegistry’s version hash is sent from the client to the server as part of the client’s connection packet.
  5. Server will compare the client’s version-hash with its own to make sure it matches
    1. If the server finds a mismatch:
      1. Error logs will be reported
      2. An EBus notification is broadcast
        1. Test automation can receive the event
        2. MultiplayerViewportMessageSystemComponent can receive the mismatch event and display a warning on-screen
      3. The version hash of each individual auto-component will be exchanged (using a new packet type) in order that the server and client know exactly which components are out-of-date.

Auto-component XML To Multiplayer Component Registry
[Image: image.png]## Hash Method Available to AzCodeGen/Jinja:
Ultimately we want to compare the server and client auto-component XMLs. Instead of having to send and receive 100's of kilobytes of XML files over the network, we'll instead parse the XML and create a unique hash. Parsing the XML and creating a hash can be achieved by leveraging the same AzCodeGen that's used to parse and convert XML into game components and packets. For converting XML into a 64-bit hash, a new method will be added to \cmake\AzAutoGen.py called CreateHashValue64(string). It will return a AZ::HashValue64. Then in Jinja one can call the code as follows:
{{ SomeStringRepresentingTheAutoComponent | createHashValue64string}}

Hash Generation (Per-Auto-Component):

Auto-components contain a name, namespace, RPCs, RPC parameters, network properties, network inputs, and archetypes. Each of these properties would need to be considered when generating a hash. The auto-component classes would have a new member variable “AZ::HashValue64 m_versionHash" and a public accessor method "GetVersionHash()".

Creating the auto-component hash value will be done during AzCodeGen. The multiplayer auto-component Jinja will need to be updated to parse all the auto-component attributes (name, namespace, RPCs, RPC parameters, network properties, archetypes, and network inputs), store it in a string, pass it to the createHashValue64string method, and store it in m_versionHash.

Relevant Files:
\Gems\Multiplayer\Code\Include\Multiplayer\AutoGen\AutoComponent_Header.jinja
\Gems\Multiplayer\Code\Include\Multiplayer\AutoGen\AutoComponent_Source.jinja

Hash Generation (Per-Application):

Instead of checking every auto-component on the server against every auto-component on the client, we will first compare a single holistic hash that’s generated per-application.
This hash, unlike the individual auto-component hash, will not be generated during AzCodeGen and instead will be produced at runtime.
Currently, at the start of the app, all of the auto-components register themselves with the global MultiplayerComponentRegistry. MultiplayerComponentRegistry will be updated so that as each component registers itself, the MultiplayerComponentRegistry will update its own AZ::HashValue64, by combining the component hashes together. (Note: A lazy init may be more appropriate here whereby the hash is generated once it’s asked for and then stored for future use)

\Gems\Multiplayer\Code\Include\Multiplayer\Components\MultiplayerComponentRegistry.h
class MultiplayerComponentRegistry
{
public:

void RegisterMultiplayerComponent( ComponentData componentData );
...
private:
AZ::HashValue64 m_versionHash;
}

\Gems\Multiplayer\Code\Include\Multiplayer\Components\MultiplayerComponentRegistry.cpp
void MultiplayerComponentRegistry::RegisterMultiplayerComponent( ComponentData componentData )
{
...
// update m_versionHash by adding in componentData.m_versionHash;
}

Sending and Receiving Hashes Between Client and Server

  1. Update MultiplayerPackets::Connect packet to contain a new 64-bit hash value called “MultiplayerComponentVersion”. This will contain the hollistic hash generated per-application.
  2. Upon receiving the MultiplayerPackets::Connect packet, the server will check the MultiplayerComponentVersion against his own version, and send back an updated MultiplayerPackets::Accept packet which contains a boolean specifying if the hashes match.
    1. If the hash doesn't match:
      1. The server and client will exchange a new type of packet that contains the per-component hashes. This information which allows each to map auto-components and their version hash; this will allow us to quickly identify which auto-components were added, removed, or modified. Trigger EBus notifications, log warnings, and display viewport messages.
      2. The client/server should disconnect from one another; no player should be spawned.

Relevant Files:
\Gems\Multiplayer\Code\Source\MultiplayerSystemComponent.cpp\h
\Gems\Multiplayer\Code\Source\AutoGen\Multiplayer.AutoPackets.xml

What are the advantages of the feature?

This feature will alert developers and players when their game doesn't match the server version. It's an important safe-guard. By knowing which components don't match, developers can then check the code on either machine to see which is out-of-date.

What are the disadvantages of the feature?

This feature will add to build times, although probably not much considering the new Jinja logic will only be a fraction of what’s being generated per-autocomponent. To be safe, the GitHub pull-request should include a comment about before and after build times using Multiplayer Sample. If parsing each auto-component by hand is too slow, maybe it's faster to turn the entire XML into a string in order to hash; but be careful not to consider non-essential characters (such as newlines) which can be different depending on the operating system.

How will this be implemented or integrated into the O3DE environment?

This will be added as default behavior in the MultiplayerGem connect logic. Users of the gem will get the behavior for free, when they update the gem. Users who require more control may utilize the IsHandshakeComplete method which already exists in the IMultiplayer interface; users can specify what constitutes a complete handshake specific to their game’s requirements.

Are there any alternatives to this feature?

  1. Alternative Hash Generation (Per-Auto-Component and Per-Auto-Packet):
    There's a possibility to hash the entire auto-component XML file instead of having to parse its individual auto-component properties to create a hash. We'd want to be careful that the internal XML data-structure passed into Jinja ignores newlines as these could produce different results based on a machine's operating system. For instance, if a Windows machine using CR/LF line endings connects to a Linux server using CR line endings, the hash function could incorrectly produce a different hash. The upside is that using an XML "ToString()" method would be computationally faster, and also quicker to implement (less lines of code and easier to read).

  2. Leverage Existing Engine-Version API:
    o3de/sig-core#44
    Instead of automatically generating versions for multiplayer components specifically, we could simply leverage the upcoming O3DE engine versioning API to send the current engine/project/gem versions. The problem with this is it likely won't catch any multiplayer component mismatches unless developers specifically remember to update versions after every change.

  3. Instead of automatically generating versions, we could add a "version" field to the auto-component XML. The problem with this is it won't catch any multiplayer component mismatches unless developers specifically remembers to update versions after every change.

How will users learn this feature?

Users will not need to learn of this feature in order to enable it as it will be enabled automatically.
Should a version mismatch occur, debug logs, and an on-screen warning message will appear on the client machine tipping off users as to the version mismatch, however, a detailed networking troubleshooting doc should cover what to do in order to fix a version mismatch.

Out of Scope

  1. Auto-packet Versioning: Versioning based on auto-packets out of scope. it would be highly unusual for a customer to alter the actual packets since that would involve editing core engine code and gems. An overall engine version # check would probably be more than sufficient here. The auto-component network properties, types, and RPCs and param types are what customers will be implementing and editing in their game code, and are most important to capture in this version check.

Are there any open questions?

  • Can this be turned off with a cvar switch? For debugging purposes, etc?
  • Are there solutions to knowing which application is out-of-date? Right now mismatch is known, but not which is right or wrong.

Proposed SIG-Network meeting agenda for JAN-04-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?: #33

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for DEC-07-2021

Meeting Details

  • Date/Time: December 7th, 2021 @ 5:00pm UTC / 12:00pm ET / 9:00am PT
  • Location: Discord SIG-Network Voice Room
  • Moderator: Pip (lmbr-pip)
  • Note Taker Person

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

  • Meeting notes from last time: #26
  • Networking update
  • Cloud services update

Meeting Agenda

  • New reviewer nomination: #25
  • Accept RFC moved to final comment period: #23
  • Highlight election: #27

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for OCT-26-2021

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for Dec-20-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for Jan-18-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

SIG Reviewer/Maintainer Nomination

Nomination Guidelines

Reviewer Nomination Requirements

  • 6+ contributions successfully submitted to O3DE
  • 100+ lines of code changed across all contributions submitted to O3DE
  • 2+ O3DE Reviewers or Maintainers that support promotion from Contributor to Reviewer
  • Requirements to retain the Reviewer role: 4+ Pull Requests reviewed per month

Maintainer Nomination Requirements

  • Has been a Reviewer for 2+ months
  • 8+ reviewed Pull Requests in the previous 2 months
  • 200+ lines of code changed across all reviewed Pull Request
  • 2+ O3DE Maintainers that support the promotion from Reviewer to Maintainer
  • Requirements to retain the Reviewer role: 4+ Pull Requests reviewed per month

Reviewer/Maintainer Nomination

Fill out the template below including nominee GitHub user name, desired role and personal GitHub profile

I would like to nominate: junbo75, to become a Maintainer on behalf of sig-network. I verify that they have fulfilled the prerequisites for this role.

Reviewers & Maintainers that support this nomination should comment in this issue.

Proposed RFC Feature Amendment: Client/Server Build Target Separation

This proposes an updated version of an accepted RFC:

What is the delta produced by this Amendment?

Feature Design Description

The amendment proposes moving from a Client and Server target with a CMake target to allow Client to include Server to a Client, Server and Unified target. This is largely what was described as the alternative solution in the original RFC. The prior solution is now listed as the alternative.

Technical Design Description

Example CMake was updated for accuracy and updated Feature Design Description.

Macros

Added further details on macro usage and expected user interactions.

Open Questions

Added a question around AutoGen usage in CMake for modules using Client/Server split

RFC Feature: Client and server build target separation

Summary:

For some O3DE applications, like multiplayer and live service games, server code cannot be shipped to the clients. Doing so creates incremental security and cheating risks. Servers that include client code and resources can also bring unnecessary dependencies which causes long build and relocation times. That being said, customers may also require a unified build containing client and server logic. This RFC proposes a hard client and server split by separating the client and server into different build targets when required while maintaining the option of a unified build for customers that require it.

What is the relevance of this feature?

With the solution proposed by this RFC, O3DE will support the following two hosting modes for multiplayer applications:

  1. (Headless Dedicated Server mode) One is for live service games, where headless dedicated servers can be packaged and distributed to on-prem/remote servers to provide reliable and stable hosting solutions. The dedicated server build omits the packages and modules that a headless server does not require and has a smaller compiled size.
  2. (Client-As-Server mode) Supporting Single Purchase products which cannot rely on subscription revenue to cover the costs of dedicated server hosting. In this mode, one of the clients acts as a server to which other players connect.

Feature design description:

This solution proposes adding two compiler definitions to allow the separation of client and server behaviors:

  • AZ_TRAIT_SERVER_ENABLED: Compile the server code for the current target.
  • AZ_TRAIT_CLIENT_ENABLED: Compile the client code for the current target.

O3DE developers can use these compiler definitions to separate the client and server targets, so that they can create a dedicated server for live service games, a client with no server logic or a client hosted server for console titles. These will be referred to as a Server build, Client build and Unified build going forward.

Technical design description:

CMake definitions

For any multiplayer O3DE project, as well as any dependent gems that contain multiplayer components, define separate static libraries for the Client, Server and Unified targets like below:

create target Multiplayer.Client.Static
    COMPILE_DEFINITIONS
        PUBLIC
            AZ_TRAIT_CLIENT_ENABLED=1
            AZ_TRAIT_SERVER_ENABLED=0

create target MultiplayerSample.Client.Static
    BUILD_DEPENDENCIES
        PRIVATE
            Gem::Multiplayer.Client.Static
            
create target Multiplayer.Server.Static
    COMPILE_DEFINITIONS
        PUBLIC
            AZ_TRAIT_CLIENT_ENABLED=0
            AZ_TRAIT_SERVER_ENABLED=1

create target MultiplayerSample.Servers.Static
    BUILD_DEPENDENCIES
       PRIVATE
           Gem::Multiplayer.Server.Static

create target Multiplayer.Unified.Static
    COMPILE_DEFINITIONS
        PUBLIC
            AZ_TRAIT_CLIENT_ENABLED=1
            AZ_TRAIT_SERVER_ENABLED=1

create target MultiplayerSample.Unified.Static
    BUILD_DEPENDENCIES
       PRIVATE
           Gem::Multiplayer.Unified.Static

if (PAL_TRAIT_BUILD_SERVER_SUPPORTED)
    # If developers need to build a server launcher, then add the project name to the list of server launcher projects
    set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS MultiplayerSample)
endif()

All the downstream targets should always refer to one of the Client, Server or Unified static libraries.

Multiplayer gameplay components will live in both of the client and server targets to keep a simple cook and replication pipeline. Their behavior and accessors will be different because of the compile definitions and macros.

If O3DE developers only need the client hosted solution and don’t want to generate a server launcher, they can just remove the following lines in the CMake configuration:

if (PAL_TRAIT_BUILD_SERVER_SUPPORTED)
    # If developers need to build a server launcher, then add the project name to the list of server launcher projects
    set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS MultiplayerSample)
endif()

Macros

Macros would be enforced at the auto-generated component level. We should be adding additional #if AZ_TRAIT_SERVER_ENABLED and #if AZ_TRAIT_CLIENT_ENABLED markup around authority, server, autonomous, client properties and remote procedure calls (RPC), which will force derived components to respect those same defines.

Auto-generation provides a variety of logic overall. Some of this logic is declared and defined purely in AutoGen. Some however, is declared in AutoGen and defined by the user. RPC Handlers are an excellent example of this. In these cases, the declaration itself will be macro wrapped which will require users to macro wrap their definitions.

How to handle logic the user declares and defines that can be separated using Client/Server macros is left to the user's discretion.

What are the advantages of the feature?

  • Hard client and server separation can make O3DE multiplayer application more secure and compact.
  • The hard split mode can be helpful to catch programmer errors. For example, when compiling the client only target, the compiler can catch errors where O3DE developers use server only network state on a client code path.

What are the disadvantages of the feature?

  • Testing/validating all permutations would multiply the number of builds on Jenkins. AR will have to pick the primary mode as default and validate the non-default permutation (client hosted use case) periodically during Jenkins nightly builds. Some breaking changes might pass AR and won’t be detected by Jenkins jobs immediately. It is suggested to validate the non-default permutation on one platform and configuration instead of doing this on 3 platforms (mac/linux/windows) with 3 configurations (debug/profile/release) and 2*2 permutations (monolithic/unity/non-monolithic-unity/non-unity).

How will this be implemented or integrated into the O3DE environment?

  • Identify the projects/gems that contain multiplayer components and split their client and server targets. Initial list this RFC targets on includes:
    • MultiplayerSample project
    • Multiplayer gem
    • AWS GameLift gem
  • Add project and gem templates to O3DE. Any new multiplayer-dependent projects or gems will follow the same configurations proposed by this RFC.

Are there any alternatives to this feature?

Using an extra CMake flag, remove the Unified solution and instead allow the Client configuration to function as the Client launcher or the Unified launcher based on said flag.

Project/Gem CMake configuration will look like below:

create target Multiplayer.Client.Static
    COMPILE_DEFINITIONS
        PUBLIC
            AZ_TRAIT_CLIENT_ENABLED=1
            AZ_TRAIT_SERVER_ENABLED=${LY_CLIENT_BEHAVES_AS_SERVER}

create target MultiplayerSample.Client
    BUILD_DEPENDENCIES
        PRIVATE
            Gem::Multiplayer.Client.Static
            
create target Multiplayer.Server.Static
    COMPILE_DEFINITIONS
        PUBLIC
            AZ_TRAIT_CLIENT_ENABLED=0
            AZ_TRAIT_SERVER_ENABLED=1

create target MultiplayerSample.Servers
    BUILD_DEPENDENCIES
       PRIVATE
           Gem::Multiplayer.Server.Static

if (PAL_TRAIT_BUILD_SERVER_SUPPORTED)
    # If developers need to build a server launcher, then add the project name to the list of server launcher projects
    set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS MultiplayerSample)
endif()

This solution has the same advantages as the proposed solution. Disadvantages include:

  • Toggling the CMake flag requires rebuilding the affected launcher
  • Building all three types of launchers requires toggling the CMake flag at least once to update all builds
  • Same compile definitions and testing/validating problems as the proposed solution.

How will users learn this feature?

  • Existing O3DE project (MultiplayerSample) and any gems that contain multiplayer components can be referenced as examples for the hard client and server separation.
  • Specific project/gem template can be provided with the client and server target predefined as references.
  • Document usage of the new compile definitions.
  • Certain Multiplayer AutoGen based features will require using the new compile definitions.

Are there any open questions?

  • Lumberyard 1.x was WAF based and its GridMate networking system provided a macro solution for separating the client and server code. How could O3DE avoid messing up macros in most of the multiplayer-dependent classes as GridMate did?
    • Enforce macros at the auto-generated component level which results in quick compile errors when macros are misused in derived classes.
  • For sig-build and sig-testing, what optimizations can be made to reduce the build time and simplify testing/validating on Jenkins when switch between these two hosting modes?
    • Create a common static library between server and client static targets that has the code shared between the two (that is not affected by the GENERATE_ defines) to reduce the amount of code that is compiled multiple times.
  • How will AutoGen be affected by this feature?
    • A module generally allows one target to define AutoGen rules. This has historically been the Static target. Splitting into multiple static targets removes that option. A solution would be to provide an AutoGen target with Client and Server compile definitions not defined that all other Static targets inherit from.

Proposed SIG-Network meeting agenda for May-24-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

SIG-Networking 11/30 release notes

Please fill any info related to the below for the 11/30 release notes: Note this has a due date of Friday Nov 12th, 2021

(Note: Notes should cover July 6th to Nov 12th)

  • Features
  • Bug fixes (GHI list if possible)
  • Deprecationa
  • Known issues

Features

Cloud Services

  • AWS GameLift Gem completed and out of preview
    • Added Linux and FlexMatch support

Networking

Bug Fixes

  • Fixed dependencies for networking that could crash the Editor: o3de/o3de#5277
  • Enabled tests for HttpRequestor gem: o3de/o3de#4687
  • Changed the serialization format for networking to binary to save space and time: o3de/o3de#4608
  • Multiplayer NetworkInput Silently Fails Unless LocalPredictionPlayerInputComponent is Attached: o3de/o3de#3155

(Add MPS updates here)

Deprecations

  • None

Known issues

  • TBD

Proposed RFC Feature: Remove Amazon gems from O3DE

Summary:

Currently there are 6 Amazon-specific gems within the main o3de/o3de repo: AWSCore, AWSClientAuth, AWSMetrics, AWSGameLift, the Twitch gem, and HttpRequestor (which is essentially a wrapper around AWSNativeSDK types and methods for making REST calls). These gems are unique in that they are optional and vendor-specific, yet live within the main engine source code. This RFC proposes extracting these gems to their own, Amazon-owned GitHub repositories and removing (over time) the versions of these gems that live within the engine source. This will improve the vendor neutrality of the engine itself, while allowing for development of these gems to continue in a leaner, more decoupled way from that of the entire engine.

What is the relevance of this feature?

This work will change where 6 gems within o3de/o3de are housed, how they’re pulled into O3DE projects, and (potentially) how they’re advertised to the community. The biggest impact, from a user perspective, will be that once this work is completed, users will need to register the individual Amazon gem repositories with the project manager before being able to see and select them for inclusion in a project (unless other mechanisms are identified - see “open questions”, below). Users of the existing gems would need to migrate to use the external gems in order to continue pulling in the latest fixes & features.

Feature design description:

At a high level, this work would entail making the following changes, in order:

  1. Publish the 6 Amazon gems in public, Amazon-maintained repositories. It’s likely they won’t all be published at the same time, but AWSCore will need to be extracted first so that subsequent external gems can depend on it. These external Amazon gems should be functionally equivalent to the existing “included” gems and also maintained as permissively licensed open source projects.
  2. Communicate to the community that the external versions of the Amazon gems are now available, along with instructions for migration and links to their docs (if docs are moved. See “Open Questions”, below). This communication should include, at a minimum, announcements in the relevant SIGs and on Discord, published notices on the o3de.org docs pages for the effected gems, and comments in the engine source Amazon Gems which indicate they are being deprecated in favor of their external counterparts. It may also include, pending agreement of SIG-Release, release notes in the final (and/or penultimate) versions of engine which include the Amazon gems that they will be removed in a future release.
  3. After a pre-determined amount of time, automated review (AR) tests run on the Amazon gems within the engine will be switched to non-blocking, or removed entirely. New issues cut against the Amazon Gems will be routed to the external repositories (exact mechanisms for this are TBD, will need to established in further conversations with SIG-Network).
  4. After a pre-determined amount of time (at least one release cycle), the Amazon Gems will be red coded from https://github.com/o3de/o3de.
  5. As development of the extracted Amazon gems continues, new versions of the AWSNativeSDK will be stored in, and pulled from, a separate distribution point (vs. the central 3rd party system), since they will not be a dependency of anything in the engine. Versions of the AWSNativeSDK already in use by released versions of the engine (which include old versions of the Amazon gems) will remain in the central system for backward compatibility.

Technical design description:

The new “external” Amazon gems should be functionally equivalent to the existing source versions of the gems, but will need to differ slightly in terms of build setup and AR due to their new locations. Those differences may include:

  • slightly different gem_name values and CMAKE target names, so that they don’t conflict with the source versions of the gems during the initial period of time when they may both exist in the same project.
  • Pulling the AWSNativeSDK from a separate distribution point which will be appended to the LY_PACKAGE_SERVER_URLS variable.
  • Be compatible with the head of o3de/o3de development at a delay. Testing and development against the last official release of the engine will take priority over integration with bleeding edge changes.

Adding the external versions of the gems to an O3DE project will be done as it is now for external gems. See the relevant documentation pages:

What are the advantages of the feature?

Advantages for O3DE:

  • Leaner O3DE engine source code, without gems that exist for primarily commercial benefit.
  • Less O3DF engineering and compute resources spent building and testing gems as part of AR on each pull request.

Advantages for Amazon Gem users:

  • Faster, more decoupled development will allow fixes and changes to be incorporated into these gems more quickly.

What are the disadvantages of the feature?

  • Developers who wish to use the Amazon gems in projects need to complete an extra step to configure them (i.e., register the external gem URL(s) with the project manager).
  • Reduced discoverability of the Amazon Gems from within the main O3DE code repo and docs.
  • O3DE will lack “out of the box” cloud service integrations.

Are there any alternatives to this feature?

An alternative would be to leave the Amazon gems in the main o3de/o3de repo and continue to maintain them there. However, this may set a confusing precedent for adding similar optional vendor gems in the main engine source, which over time would encumber maintenance and testing of the core engine. For example: asking SIG-Network maintainers to incur costs on personal AWS accounts, or other commercial platforms, to fix bugs in the main engine repo is not fair or sustainable.

How will users learn this feature?

Advanced notice of the Amazon gems’ removal from the main engine repo and comprehensive migration instructions will be available and circulated at least one release cycle prior to its execution. As mostly enumerated above in “Feature design”, we plan make the community aware of this change by:

  • Making advanced announcements in relevant SIG meetings and on Discord.
  • Adding notices on the o3de.org docs pages for the effected gems.
  • Adding code comments in the o3de/o3de source versions of the Amazon gems which indicate they will be deprecated in favor of their external counterparts, with links to the new repositories.
  • Including release notes, in the final (and/or penultimate) versions of engine which include the Amazon gems, that they will be removed in a future release.
  • Blog post(s) and tutorials on how to migrate to the external gems.

Are there any open questions?

  • Once these gems are removed from https://github.com/o3de/o3de/tree/development/Gems, whether or not their docs will continue to live at o3de.org needs to be decided. We plan to work with SIG-docs-community to determine where they should go.
  • An explicit definition of which sorts of gems should, and should not, be kept in the main o3de/o3de repo has yet to be agreed upon. Although we are taking a stance with this RFC that Amazon gems should be kept and maintained outside the engine itself, proposing formal criteria for inclusion that might apply to all gems is beyond the scope of this RFC.
  • How and where we, as a community, promote discovery of gems external to https://github.com/o3de/o3de/tree/development/Gems. This is likely a topic to discuss with the marketing committee and SIG-Content.
  • Whether there’s value in building, and keeping in the main engine repository, an alternative to the HttpRequestor gem. Generic REST call functionality may useful and simple enough to reasonably include with the engine, however it shouldn’t rely on vendor-specific SDKs as HttpRequestor does now.

Proposed SIG-Network meeting agenda for APRIL-18-2023

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

  • [Office Hours] - Do any community members need help with anything? (5min slots) Grab a slot in issue comments, and SIG admins will add here

    • <slot 1 - add question/topic>
    • <slot 2 - add question/topic>
  • Review state of new MultiplayerSample game

    • Review all pending feature requests for MPS to see if they have value as contributions.
    • Feature matrix update: o3de/o3de#15639
  • Review release notes, plans etc around O3DE 2305 release: o3de/sig-release#173

  • Cover updates from SIG contributors

  • Review roadmap for future planned work / contributions from others

  • Plans to hold onboarding sessions for MPS: https://discord.com/channels/805939474655346758/816043672709103667/1096496623888117790 (from JT in Discord). Interested if SIG will run live onboarding sessions

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for NOV-23-21

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Networking

AWS

Meeting Agenda

  • Review action items for last meeting: #24
  • RFCs
    • Highlight engagement is low - process changes?
    • Highlight new RFC: #23
  • Discuss requirements for: o3de/o3de#5730
  • Maintainer nomination: #21

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

SIG Reviewer/Maintainer Nomination - AMZN-Olex

Nomination Guidelines

Maintainer Nomination Requirements

  • Has been a Reviewer for 2+ months
  • 8+ reviewed Pull Requests in the previous 2 months
  • 200+ lines of code changed across all reviewed Pull Request
  • 2+ O3DE Maintainers that support the promotion from Reviewer to Maintainer
  • Requirements to retain the Reviewer role: 4+ Pull Requests reviewed per month

I would like to nominate: https://github.com/AMZN-Olex, to become a Maintainer on behalf of sig-network. I verify that they have fulfilled the prerequisites for this role.

Reviewers & Maintainers that support this nomination should comment in this issue.

RFC: Scriptable Network Input

Summary:

A key feature built into Multiplayer Components is the concept of Network Input.  Network Input helps digest player input (the human and therefore most unpredictable aspect of the network simulation), in order to keep the simulation on clients and servers in sync.

Currently, Network Input is only available to developers writing C++ components; this RFC proposes exposing Network Input to script (Lua and Script Canvas).

What is the relevance of this feature?

Scriptable Network Input will help save iteration time and allow developers who have limited experience with networking and C++ to build a multiplayer game.

Since scripting doesn't require C++ knowledge or time to recompile, adjustments to the multiplayer controllers can be iterated upon quickly.  For example, when receiving keyboard WASD controller input, a designer might decide to add an acceleration curve so that tapping the keyboard moves the character less than it would from holding it down.  These types of gameplay edits aren't an exact science and requires dozens of little modification in order to create "good feel".  Without scripting support, a designer hoping to modify how keyboard input affects the character controller will need to (1) modify C++ game logic, (2) close down the Editor and Asset Processor, (3) recompile C++, (4) reopen the Editor, and finally (5) reopen and run the test level in order to see the results of their code.  If each of these small modifications requires C++, then hours are lost over the course of game development due to recompiling and testing code.

If, alternatively, designers can make changes via script then the time and steps taken are reduced: (1) modify the game logic script, (2) rerun the level to test the change.

In addition to saving time, scripting is typically easier to learn than C++ and thus is easier for studios to find/maintain a scripting dev.

Feature design description:

Multiplayer auto-components with NetworkInputs will have the option to enable or disable exposing any of their NetworkInputs to script via an "ExposeToScript" flag.  If any NetworkInputs are enabled for scripting, the multiplayer auto-component should generate 2 new methods inside of behavior context. 

The first method will be an event which returns a result called CreateInput:

  • Scripters will listen for this CreateInput event in Script Canvas or Lua and return a struct containing the values for each exposed network input.  For example, the network player controller may want the ability to move a player forward and backward using the W and S keys respectively.  The scripter would then listen for the CreateInput callback and return 1.0 if W is currently being pressed, - 1.0 if S is currently pressed, or 0.0 if neither W or S is being pressed.  The networking backend will do the heavy lifting ensuring the input is sent to the authoritative server and making sure_ProcessInput_ is called on the other side.

image

The second method will be an event called ProcessInput:

  • Scripters will listen for ProcessInput on the Autonomous player or the Authority in order to read the input and drive the simulation.  Using the last example from CreateInput, if ProcessInput says the player's movement is -1.0, then the designer could send a request to the NetworkCharacterController to decrease the player velocity so that they slow down or move backwards. 

Technical design description:

Step 1: Update Auto-Component XML NetworkInputs to Include "ExposeToScript" Attribute

  • MutliplayerComponent XMLs should add a new NetworkInput attribute called "ExposeToscript"
  • Example:  <NetworkInput Type="StickAxis" Name="ForwardAxis" Init="0.0f" "ExposeToScript"="true"/>
  • .\Gems\Multiplayer\Code\Source\AutoGen\AutoComponent_Header.jinja and AutoComponent_Source.jinja will look for NetworkInputs using the new "ExposeToScript" attribute and expose new Behavior Context methods for the multiplayer component

Step 2: Expose Auto-Component Class {{ ComponentName }}NetworkInput to Behavior Context

  • In order for CreateInput event to return the input and ProcessInput to read the input, the {{ ComponentName }}NetworkInput class will need to be exposed to behavior context
  • Create a ReflectToBehaviorContext() method inside of the  {{ ComponentName }}NetworkInput class and make sure it's called from somewhere (suggestion: the base component's Reflect() method) so it's reflected
  • Loop through each network input and create a behavior context property.  Remember to only expose them if their "ExposeToScript" attribute is true.
  • Create a behavior context constructor so scripters can create/store an instance of the {{ ComponentName }}NetworkInput class
  • Make sure to name all the classes, properties, and constructor parameters so scripter can see what they are editing.  For example, if there's a boolean input called "IsJumping", make sure any Script Canvas nodes referencing "IsJumping" says "IsJumping" instead of displaying the default "boolean"

Step 3: Expose StickAxis and MouseAxis to Behavior Context

  • The existing MultiplayerSample game uses a type called StickAxis and MouseAxis for network inputs, these will be commonly used for network input.  These types are just wrappers around ranged floats (for example: -1.0 to 1.0) that are nicely packed into a single byte to reduce network traffic. 
  • StickAxis and MouseAxis should be exposed to behavior context.
  • StickAxis and MouseAxis should be moved out of MultiplayerSample and into the MultiplayerGem as these seem common enough to be used for lots of multiplayer games.

Step 4: Add CreateInput and ProcessInput Event to Multiplayer Auto Component BehaviorContext

  • Multiplayer components which have network inputs with "ExposeToScript"="true" need to add the CreateInput and ProcessInput events to behavior context 
  • CreateInput should provide a deltaTime and allow handlers to return a struct containing all of the network input variables that are exposed to script
  • ProcessInput should provide deltaTime, but does not need to return anything
  • The auto-component's CreateInput() and ProcessInput() base methods should broadcast the CreateInput and ProcessInput event respectively.  The returned result of the CreateInput event should be passed back to the Multiplayer::NetworkInput& input parameter which a MultiplayerInputDriver service (such as LocalPredictionPlayerInputComponent) will use to send and receive input over the network. 
  • This should all be implemented using jinja inside .\Gems\Multiplayer\Code\Source\AutoGen\AutoComponent_Header.jinja and AutoComponent_Source.jinja

After implementing all 4 steps, users will be able to create auto-components with network inputs that are exposed to Lua and Script Canvas and receive event callbacks during the game runtime when it's time to create and process input.

What are the advantages of the feature?

Using script instead of C++ for creating and processing network input will saves time since users don't need to recompile.  Also, those less familiar with C++ can still enjoy the ease of sending/receiving user input across the network.

What are the disadvantages of the feature?

While creating network input is fairly straight forward, scripters who may not have experience with networking could accidently mess up the network simulation if they incorrectly process network input.

For example, if you're creating a first-person-shooter where animations need to stay in sync in order to properly detect where a bullet hit (body, arms, head, etc) then the scripter would need to know to how to update animation in a way that is network safe as opposed to using the existing actor events they've used in the past.  At the time of writing this document, there isn't a generic networking solution for EMotion Fx, so scripters will need to know specifically what is and isn't safe to update.

How will this be implemented or integrated into the O3DE environment?

There are no special steps to integrate this feature into your O3DE environment. As long as you have the MultiplayerGem enabled, you'll receive the ability to enable network input for scripting.

Are there any alternatives to this feature?

There aren't any alternative features, but there are some additional features which could make the user experience a lot better.  Each of the following bonus features requires an RFC, and is a general Script Canvas feature which would be handled by sig-content.  This could greatly improve the script canvas user experience in general.

Bonus Feature 1: Auto-Exploded Script Canvas Variables

  • The CreateInput node will need to return a struct containing all the inputs, it would be great if script canvas automatically allowed users to explode the struct in order to show each property separately.
    image

Bonus Feature 2: New Script Canvas Event Result UI

  • The current Script Canvas node for returning a result is a bit clunky, requiring users to pass in the result on the left hand side of the node.
    image
  • Instead it would make more sense to produce 2 nodes: the event node and a result node that is data connected (and can't be disconnected).  The user would be expected to connect the execution slot at the end of the of the operation.
    image
  • More notes regarding implementation:
    • A significant (4 day?) spike would be needed to investigate the Script Canvas front-end UI work required to get the 2 nodes appearing on screen.
    • The UX team would be needed for designing a nice visual for showing users when the 2 nodes are correctly connected, or when they are unconnected (ex: highlight a dotted-line between the event and result node)
    • After the GUI part is done, the parser would need to be updated so that return node is properly passed back to the event, but this shouldn't take long (couple days at most?)
    • Existing event result nodes would need an upgrade path. For example, when we automatically generate the 2nd node (the return node) where exactly should it spawn?

How will users learn this feature?

Anyone familiar with Lua or Script Canvas could quickly pick up how to use network input for their multiplayer game.

Teaching Opportunity 1:

Fortunately, Script Canvas is quite nice for discovering new features.  I often discover new features just by using the search feature in the Script Canvas node palette.  Network input is no exception, by searching the multiplayer component the 2 new methods for CreateInput and ProcessInput will appear in the node palette.  These nodes are fairly simple to grasp; CreateInput requires users to return inputs and ProcessInput provides input values for which designers can use to drive the simulation.

Teaching Opportunity 2:

A small video tutorial using Script Canvas to drive a simple network character around using WASD would also be a valuable learning tool.

Are there any open questions?

Script Canvas Networking Context

When writing any multiplayer gameplay logic, whether using C++ or Script Canvas, developers need to be careful to keep the network simulation in sync.  However, when it comes to Script Canvas there's an opportunity to limit what is exposed; it is possible to create a new scripting context for networking specifically where only certain methods are exposed to designers when writing networked scripts.  Instead of adding a ScriptCanvas component, designers would add a NetworkScriptCanvas component in order to enable the network specific context.

This could help mitigate the potential harm done by bad design logic; however, it's a double edged sword that could severely nerf what's possible via script. 

For example, a multiplayer character controller may want to use the Physics API to drive the player; they could use Physics::Character::AddVelocity and Physics::Character::ApplyRequestedVelocity to accurately move the player around based on deltaTime.  By using a network context script we could hide the Physics API and instead limit Script Canvas access to the NetworkCharacterComponent (a component which was designed specifically for moving characters on the network).  This topic would need further discussion about which Script Canvas nodes should and shouldn't be exposed to a network context.

Proposed SIG-Network meeting agenda for NOV-15-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

  • Review feature roadmap
  • Discuss SIG election

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for April-26-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Create Roadmap View

Hi! SIG release is working to help the O3DE community to get visibility of the O3DE roadmap. Full context can be read here: o3de/sig-release#79.

In order to achieve that goal, we need your help to create the roadmap for your SIG by February 6th, 2023, and start giving brief updates about the roadmap items at the Joint TSC meeting on February 28th, 2023. Instruction to create the roadmap view can be read in the RFC section "Roadmap Review in TSC monthly meeting".

Let me know if you have any concerns with the dates or any questions about the ask!

Proposed RFC Feature: Multiplayer Desync Logging

Summary:

In multiplayer networking solutions, one of the hardest developer tasks is debugging state desynchronization. Practically speaking, state can desync for any number of reasons. A missed variable set, a missed function call, a missing cvar on an endpoint, etc. In a multiplayer environment, detailed and performant diagnostic logging to help identify the source of these desyncs and provide detail to their nature will be incredibly useful.

What is the relevance of this feature?

Challenge: Desynchronization of networked values

In the Multiplayer Gem model, certain networked values are autonomous. The values can be modified locally despite not being the authority. When the logic between endpoints are not synchronized, the state of a networked value can diverge requiring the authority to send a correction.

The root cause of a desynchronization of a networked value can occur for any number of reasons and at unpredictable frequency. The ability to detect the source of a desync without transmitting additional data between endpoints to do so will enable surfacing of information related to desyncs even in production optimized builds.

Goal: Configurable logging to assist in identifying and debugging network desynchronization

Feature and Technical design description:

Terminology

  • Desync - A divergence of simulation state between two endpoints in a networked simulation
  • Authority - The source of truth for a piece of data in a networked simulation
  • Autonomous - A non-authoritative piece of data that can be modified locally but is not the authority. Used to run predictive simulations.
  • Proxy - A non-authoritative piece of data that is strictly read only and whose values are determined by the authority
  • Endpoint - A participant in a networked simulation which can be connected to anywhere from one to many other endpoints
    The feature set for logging desyncs of networked values will be separated into multiple verbosity levels. As verbosity increases, a tradeoff is made of performance for information. The higher the verbosity, the greater the performance cost incurred for access to more information.

Current State

Currently, the Multiplayer Gem has logic to detect a desync for Autonomous proxies in non-release builds. On detection, the detecting endpoint serializes its state history for the desynced value and sends to its opposite endpoint where state can be compared. The block is notably from the function HandleSendClientInputCorrection which means that in this function and in SendClientInputCorrection on the server, the occurrence of the desync can be logged along with the frame ID it occurred at and the current and expected values.

This approach requires serializing state between two endpoints to compare state as perceived by each. Due to its cost, it is not used on Release builds. Additionally, this approach only shows changes over time for the desynced value and provides no context on what actions/occurrences led to the desync.

#ifndef AZ_RELEASE_BUILD
        if (cl_EnableDesyncDebugging)
        {
            AZLOG_INFO("** Autonomous Desync - Corrected clientInputId=%d ", aznumeric_cast<int32_t>(inputId));
            auto iter = m_predictiveStateHistory.find(inputId);
            if (iter != m_predictiveStateHistory.end())
            {
                // Read out state values
                AzNetworking::StringifySerializer serverValues;
                GetNetBindComponent()->SerializeEntityCorrection(serverValues);
                PrintCorrectionDifferences(*iter->second, serverValues);
            }
            else
            {
                AZLOG_INFO("Received correction that is too old to diff, increase cl_PredictiveStateHistorySize");
            }
        }
#endif

Verbosity Level 1 - High Performance

At the minimum level, an O3DE developer would want to be able to compare perceived networked state for the client and server. By utilizing the fact that the simulation is ultimately deterministic and already has awareness of when a desync occurs in order to issue a correction, logging can be provided detailing the step that resulted in a desync. This approach would require no additional data to be sent between end points. While this would provide no context on what actions led to the desync, it would be performant enough to run in Release builds.

Verbosity Level 2 - Audit Trail

At the next level, additional data will be sent when a desync is detected in order to provide more detail on the nature of a desync. Networked values that desync are generally the result of actions taken on each endpoint resulting in different outcomes. In order to debug these occurrences with greater detail, information of every network related action recorded that remains in network history can be attached to the desynced endpoint. Both can then be outputted to determine if any divergence exists between the contents and order of each.

Furthermore, desynced values that are predictable feature rewindable history. This data can also be appended with timing information such that the value can shown at each step of the audit trail.

Once again let us look at LocalPredictionPlayerInputComponent:

#ifndef AZ_RELEASE_BUILD
            if (cl_EnableDesyncDebugging)
            {
                StateHistoryItem inputHistory = AZStd::make_unique<AzNetworking::StringifySerializer>();
                while (m_predictiveStateHistory.size() > cl_PredictiveStateHistorySize)
                {
                    m_predictiveStateHistory.erase(m_predictiveStateHistory.begin());
                }
                GetNetBindComponent()->SerializeEntityCorrection(*inputHistory);
                m_predictiveStateHistory.emplace(m_clientInputId, AZStd::move(inputHistory));
            }
#endif

Here predictive state of an autonomous proxy is stored so that it can be used in the comparison detailed in the code block discussed in Current State. A similar approach can be utilized in which emplace the input ID, frame ID and data value for a networked property. On desync a client can display the history for a given property as a log ordering the values in history chronologically. This is similar used to the approach in the function PrintCorrectionDifferences in LocalPredictionPlayerInputComponent. Alternatively, history can be aggregated for all properties so changed can be displayed across multiple values sorted by frame ID and input ID to form a broader audit trail of changes to network properties. This sorted data could then be logged out in sort order. Long term this data could be made available so that visual tools (such as an imgui integration) could provide a more interactive UX.

Verbosity Level 3 - Audit Trail + User Supplied Logging

At the highest level, users can additionally add logging to the audit trail via macro. This will involve serializing user specified logs between end points but offers users the ability to add custom logging. This will leverage the same structures utilized to implement Verbosity Level 2.

What are the advantages of the feature?

This feature provides various levels of logging to assist users in identifying and debugging state desynchronization.

What are the disadvantages of the feature?

While the lowest verbosity level of this feature is intended to be performant enough for production use, all higher levels of verbosity involve transport of additional data between endpoints to facilitate debugging. This extra cost should be kept in mind by users.

How will this be implemented or integrated into the O3DE environment?

This feature will be a part of the Multiplayer Gem which can be fully disabled or run at various verbosity levels via cvar.

For example,

cl_DesyncLogginVerbosity

0 = Fully disabled
1 = High performance mode
2 = Audit Trail logging
3 = Audit Trail + User Supplied logging

Are there any alternatives to this feature?

This feature provides various levels of operation for users for debugging desynchronization between two endpoints. Alternatives to this approach include traditional style logging in each endpoint separately and then comparing that output. This could be facilitated by forwarding logs to an aggregation service. The user would be responsible for adding requisite information to differentiate endpoints and sessions. This would mean that compared to the proposed solution, the user would have to identify which endpoints a desync occurred between and then manually inspect logs to root cause the source of the desync.

How will users learn this feature?

This feature will have public facing documentation provided detailing each verbosity level and how to interface with them. Surfacing will occur via log file and visual debugging tools such as the Multiplayer ImGui Gem.

Are there any open questions?

N/A

Proposed SIG-Network meeting agenda for March-29-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

RFC: Hierarchical Network Entities

Summary:

Game designers often create game and player objects out of several entities, often in a parent-child relationship, such as a player object consisting of a main player body entity with child entities representing various player abilities and weapons. Entities of these game objects are often dependent on one another, based on transform or game logic.

In multiplayer environment, group of such entities need to do the following:

  • spawn in the correct order on multiplayer clients, with parent entities starting first, and child entities spawning last
  • and process player input together as a single unit, instead of processing and sending their inputs as separate entities.

What is the relevance of this feature?

Challenge: Parent – Child Activation Order of Network Entities

On a server, prefabs spawn entities from parent to child entities. On clients, however, these entities may be created out of order as network packets come in. For example, a child entity may be activated before the parent entity; this may lead to child entities having incorrect world positions. Due to the random nature of network packet ordering, this will be a source of hard to reproduce and identify bugs.

Given the following prefab structure:

  • Test Entity 1 is the root parent
  • Test Child 2 is the child of Test Entity 1
  • Test Child 3 is the child of Test Child 2

These entities may be created on a multiplayer client out of order. Here is an example output of a debug component that prints activation order to the log:

(DebugNetwork) - entity [Test Child 2] activated
(DebugNetwork) - entity [Test Entity 1] activated 
(DebugNetwork) - entity [Test Child 3] activated

Whereas the correct order should be Test Entity 1, followed by Test Child 2 and then Test Child 3.

Goal: O3DE Networking provides a solution to spawn parents and child entities in the right order, where parents are activated before their child entities.

Challenge: Combined Input Processing of Entities

Once entities are created in the correct order another, more advanced, challenge will appear on both server and clients: a player entity often needs to process player input commands (such as movement commands). In the context of a multiplayer game, that means saving processed inputs to a buffer. This buffer acts as a recent history of player inputs and is used by features such as local prediction for player movements and actions. Let us suppose that soon after, a game designer adds a child entity that represents a jetpack and describes the amount of fuel left in the jetpack.

Now it would be convenient to store processed player input for both the main player entity and the child jetpack entity; this way if a network feature needs to know the player's state a few moments in the past, it can find the state of both the main player entity and the jetpack entity. For example, a player may have moved using the jetpack. If one only considers the movement, bugs will be introduced if the game logic does not take into account the state of the jetpack's fuel across time.

Bug Example 1: a player moves forward using a jetpack; the jetpack fuel amount is now at half. However, the locally predicted forward movement was incorrect and so the server sends the client a correction. The client receives the correction and re-calculates using the stored player input data but ignores the state of the jetpack entity. This ends up using the remaining jetpack fuel while re-calculating the player’s movement after the correction. The bug is now a sudden drop in jetpack fuel at seemingly random times.

Bug Example 2: one of the player abilities is a shield that is drained when attacked by other players. On a server, whenever a player firing action is received the world is rolled back in time to when the shot occurred on the player's application. The target player is moved back into the position, but their shield strength was not rolled back, as it was not included in input processing by mistake. Now, the damage calculation may be incorrect if shield amount is different between these two moments in time.

Goal: O3DE Networking provides a solution where a defined hierarchy of entities are processing input for multiplayer systems as one group.

Feature and Technical design description:

As mentioned earlier, there are two challenges to solve:

  1. the order of entity activation on clients and
  2. combined input processing for the entire entity hierarchy.

There is one additional variation that spans both challenges: dynamic versus edit-time prefabs. That is, a user might wish define their hierarchy in the Editor to get started but will soon find a reason to modify that hierarchy at runtime by attaching new entities or removing exists entities. For example, this could be a game spawning a new entity or a prefab describing a player weapon and attaching it to player’s root entity, or it could removing some vehicle parts due to in-game damage. Either way, in practice, both dynamic and bake time hierarchy ought to be supported.

image

The above diagram is a visual example of a prefab that contains 4 entities: 1 of them is the root, and 3 others are children. Because Hierarchy Child entities are linked via their Transform component as children of Hierarchy Root, that are visually shown to belong to Hierarchy Root. (This UI already exists in the Editor.)

At activation time, the hierarchical root entities are activated before hierarchical child entities. Therefore, these child entities can notify their root of their activation.

By the time the entire prefab has been activated, Hierarchy Root component will have all its relevant children listed. That means, when the root entity is processing its input (NetBindComponent::ProcessInput), it can also invoke processing on all attached hierarchical children. Specifically, a Network Binding component at the top-level root of the hierarchy does the following 3 steps in the descending order:

  1. Process inputs of the components attached to the hierarchy root entity
  2. Then process inputs of Network Binding components to any hierarchical children
  3. And finally process inputs of any hierarchical lower level roots in the hierarchy

(There will be some limit to the supported levels of recursions. Likely specified by a AZ_CVar.)
Here is a visual diagram of the order. Component (1) gets its input processed first and component (10) last.

image

Note: an attached root is a root that was once autonomous but later attached to another hierarchy. It is more likely to occur at runtime than Editor time, for example, when attaching a player to a vehicle. In such a case, a player prefab would be created with a hierarchy root component at the top entity and be autonomous on its own during the game but occasionally attaching itself to an autonomous vehicle prefab when needed.

image

When a hierarchical child is activated on the server, it can find its immediate parent by looking up its transform parent. Network Transform component on the same entity will transmit this information to clients, where this entity’s activation will be delayed until its hierarchical parent has been activated on the parent. Once activated on a client, Hierarchical Child component may need to walk up multiple transform parents to find its root and connect itself for input processing.
Hierarchical component will have Editor component toggles and API for disable/enable of hierarchy and input processing. This way users can customize their structures and it allows for helpful debugging while developing and testing this solution.
In summary, two new components will be introduced:

  • Hierarchical Root component
    no network properties (depends on the data in Network Transform component)
  • Hierarchical Child component
    "include in input processing" toggle
    no network properties (depends on the data in Network Transform component)

Network Binding component will be modified to reference these components when inspecting child entities, as connected via Transform components.

Additional Background / Terminology

Terminology

  • Parent entity – in O3DE it commonly means an entity whose transform determines other entities’ transforms
  • Child entity – an entity whose transform depends on a transform of its parent entity
  • Hierarchy of entities – a group of entities united by their parent-child relationships
  • Transform – a combination of a position, orientation, and scale
  • Local prediction – a technique in multiplayer to predict player actions without waiting on the server to tell the player how they will move
  • Server correction – when local prediction on a client goes wrong, the server will let the client know of the correct result

What are the advantages of the feature?

  • The best presentation of hierarchy in O3DE engine is found in the Editor and in prefab is that of Transform components. A transform component can have a parent and/or children entities, all link by their Transform components. This solution leverages and builds on this UI by using Transform parent-child relationship as the basis for hierarchical entities.
  • This is a straightforward hierarchical implementation using components and existing parent-child relationship of Transform component.

Implications / Considerations

  • This is a straightforward hierarchical implementation using components and existing parent-child relationship of Transform component.
  • All hierarchical connections point from transform children up to transform parents. This way we avoid the danger of creating loops of hierarchical structures by using battle-tested checks within Transform component.
  • Whenever an entity is detached, destroyed or moved to a new entity, this change can be detected by hierarchical components and adjusted accordingly.
  • In practice, the root of a prefab will be the root of hierarchy as well. If a user wishes to add a new child to this hierarchy, they will add their new entities and/or prefabs to the root entity or one of its child entities that have either hierarchical root or child components.
  • In order to support multiple levels of hierarchy, Network Hierarchy Child component needs to keep track of two entities: its immediate parent and its top-level root. The root can be calculated at the activation of entities, by walking up the parent-child relationship until the root is found. Its immediate parent can be looked up in Network Transform component on the same entity.
  • Care must be made to avoid unnecessary walking up the entities on game ticks. It should be limited to entity activation only, or when an entity is moved or removed.
  • The most critical path is ProcessInput method of NetBindComponent class. ProcessInput gets called every time any player input is detected on clients and is executed on server when applying player input. In practice it occurs every frame on clients, and multiple times a frame on servers. It is a hot execution path in multiplayer code. The calculation of hierarchical members must be kept outside of this logic. Given that parent changes can be signed up for via AZ::Events, hierarchy updates would occur only when a parent-child relationship changes in the hierarchy.

How will this be implemented or integrated into the O3DE environment?

The implementation will be placed inside Multiplayer gem. The logic will reside primarily in 2 new components outlined above: Network Hierarchy Root and Child components.

Are there any alternatives to this feature?

Another possible approach is Arbitrary Hierarchy of Entities.

This approach is largely the same as the recommended solution but one major difference: instead of depending on Transform component, it allows for full freedom of assigning of parent entities within a hierarchy. In this case, it is possible to either skip Transform parents or parent to an entity from a different prefab and avoid Transform parent-child structure entirely, even potentially going in the opposite direction of Transform parent-child connections.

Rationale for NOT Recommending This Solution

  • This much flexibility makes it too easy to get oneself in a bad state, especially at runtime, where one could form a loop within a hierarchy while attaching multiple hierarchies.
  • It would be unclear what should be activated first on clients. Likely, it would require an additional activation pass over involved entities, which would add too much complexity to the logic in multiple other related network systems.
  • The relationship would be hard to visualize in the Editor since the current UI can only be based on Transform parent-child relationship.

How will users learn this feature?

  • This feature will be discoverable through Network Hierarchy components and documentation.

Are there any open questions?

  • If a filtering system filters out a hierarchical root, should the entire hierarchy be filtered out?

SIG-Network Nominations 1/23 - 2/3 — Elections 2/6 - 2/10

SIG chair / co-chair roles

The chair and co-chair serve equivalent roles in the governance of the SIG and are only differentiated by title in that the highest vote-getter is the chair and the second-highest is the co-chair. The chair and co-chair are expected to govern together in an effective way and split their responsibilities to make sure that the SIG operates smoothly and has the availability of a chairperson at any time.

Unless distinctly required, the term "chairperson" refers to either/both of the chair and co-chair. If a chair or co-chair is required to perform a specific responsibility for the SIG they will always be addressed by their official role title.

In particular, if both chairpersons would be unavailable during a period of time, the chair is considered to be an on-call position during this period. As the higher vote-getter they theoretically represent more of the community and should perform in that capacity under extenuating circumstances. This means that if there is an emergency requiring immediate action from the SIG, the chair will be called to perform a responsibility.

Responsibilities

See chair and co-chair responsibilities as outlined in the SIG-Network Charter.

Nomination

Nomination may either be by a community member or self-nomination. A nominee may withdraw from the election at any time for any reason until the election starts on 2/6/2023.

Nomination requirements

The only other nomination requirement is that the nominee agrees to be able to perform their required duties and has the availability to do so, taking into account the fact that another chairperson will always be available as a point of contact.

How to nominate

Nominations will be accepted for 2 weeks from January 23, 2023 12:00PM PT to February 3, 2023 12:00PM PT.
Nominate somebody (including yourself) by responding to this issue with:

  • A statement that the nominee should be nominated for a chair position in SIG-Network. Nominees are required to provide a statement that they understand the responsibilities and requirements of the role, and promise to faithfully fulfill them and follow all contributor requirements for O3DE.
  • The name under which the nominee should be addressed. Nominees are allowed to contact the election proctor to have this name changed.
  • The GitHub username of the nominee (self-nominations need not include this; it's on your post.)
  • Nominee's Discord username (sorry, but you must be an active Discord user if you are a chairperson.)

Election process

The election will be conducted for one week from February 6, 2023 12:00PM PT to February 10, 2023 12:00PM PT and held through an online poll. Votes will be anonymous and anyone invested in the direction of O3DE and SIG-Network may vote. If you choose to vote, we ask that you be familiar with the nominees.

If there is a current interim chair, they will announce the results in the Discord SIG channel as well as the SIG O3DE mailing list no later than February 13, 2023 1:00PM PT. If there is no interim chair, the executive director will announce the results utilizing the same communication channels. At that time if there is a dispute over the result or concern over vote tampering, voting information will be made public to the extent that it can be exported from the polling system and the SIG will conduct an independent audit under the guidance of a higher governing body in the foundation.

The elected chairpersons will begin serving their term on February 14, 2023 at 10:00AM PT. Tentatively SIG chairs will be elected on a yearly basis.

Proposed SIG-Network meeting agenda for 2021-05-10

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

  • Community-organized bug bash for networking (proposed in last meeting)
  • What should people expect as a "state of the union" on networking this week? - Will give update on proposed roadmap

Proposed SIG-Network meeting agenda for April-12-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Prior Meeting Notes

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

From Previous Meetings

Provide updates on these

  • O3DE Marketing would like screenshots of MPS running on mobile (@lmbr-pip)
  • Need to remove blockers to public roadmap updates for SIG-Network: ETA April 2022
  • SIG completes feature matrix and provides requested dependency graphs: ETA April 2022

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

SIG Reviewer/Maintainer Nomination - AMZN-puvvadar

Nomination Guidelines

Maintainer Nomination Requirements

  • Has been a Reviewer for 2+ months
  • 8+ reviewed Pull Requests in the previous 2 months
  • 200+ lines of code changed across all reviewed Pull Request
  • 2+ O3DE Maintainers that support the promotion from Reviewer to Maintainer
  • Requirements to retain the Reviewer role: 4+ Pull Requests reviewed per month

I would like to nominate: AMZN-puvvadar, to become a Maintainer on behalf of *sig-Network. I verify that they have fulfilled the prerequisites for this role.

Reviewers & Maintainers that support this nomination should comment in this issue.

Proposed SIG-Network meeting agenda for MAR-21-2023

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

SIG-Network Nominations 12/1 - 12/8 -- Elections 12/8 - 12/15

SIG chair / co-chair elections for 2022

Since the inception of O3DE, each SIG chair has been staffed as an interim position. It's time to hold some official elections, following some of the proposed guidance but with our own process due to the holiday season and in order to expedite the elections into next year.

The chair / co-chair roles

The chair and co-chair serve equivalent roles in the governance of the SIG and are only differentiated by title in that the highest vote-getter is the chair and the second-highest is the co-chair. The chair and co-chair are expected to govern together in an effective way and split their responsibilities to make sure that the SIG operates smoothly and has the availability of a chairperson at any time.

Unless distinctly required, the term "chairperson" refers to either/both of the chair and co-chair. If a chair or co-chair is required to perform a specific responsibility for the SIG they will always be addressed by their official role title.

In particular, if both chairpersons would be unavailable during a period of time, the chair is considered to be an on-call position during this period. As the higher vote-getter they theoretically represent more of the community and should perform in that capacity under extenuating circumstances. This means that if there is an emergency requiring immediate action from the SIG, the chair will be called to perform a responsibility.

Responsibilities

  • Schedule and proctor regular SIG meetings on a cadence to be determined by the SIG.
  • Serve as a source of authority (and ideally wisdom) with regards to O3DE SIG area of discipline. Chairpersons are the ultimate arbiters of many standards, processes, and practices.
  • Participate in the SIG Discord channel and on the GitHub Discussion forums.
  • Serve as a representative of the broader O3DE community to all other SIGs, partners, the governing board, and the Linux Foundation.
  • Represent the SIG to O3DE partners, the governing board, and the Linux Foundation.
  • Coordinate with partners and the Linux Foundation regarding official community events.
  • Represent (or select/elect representatives) to maintain relationships with all other SIGs as well as the marketing committee.
  • Serve as an arbiter in SIG-related disputes.
  • Coordinate releases with SIG Release.
  • Assist contributors in finding resources and setting up official project or task infrastructure monitored/conducted by the SIG.
  • Long-term planning and strategy for the course of the SIG area of discipline for O3DE.
  • Maintain a release roadmap for the O3DE SIG area of discipline.

Additionally, at this stage of the project, the SIG chairpersons are expected to act in the Maintainer role for review and merge purposes only, due to the lack of infrastructure and available reviewer/maintainer pool.

... And potentially more. Again, this is an early stage of the project and chair responsibilities have been determined more or less ad-hoc as new requirements and situations arise. In particular the community half of this SIG has been very lacking due to no infrastructural support, and a chairperson will ideally bring some of these skills.

Nomination

Nomination may either be by a community member or self-nomination. A nominee may withdraw from the election at any time for any reason until the election starts on 12/3.

Nomination requirements

For this election, nominees are required to have at minimum two merged submissions to http://github.com/o3de/o3de (must be accepted by 2022-01-31). This is to justify any temporary promotion to Maintainer as required by this term as chairperson. Submissions may be in-flight as of the nomination deadline (2021-12-08 12PM PT), but the nominee must meet the 2-merge requirement by the end of the election or they will be removed from the results.

Any elected chairperson who does not currently meet the Maintainer status will be required to work with contributors from the SIG to produce an appropriate number of accepted submissions by January 31, 2022 or they will be removed and another election will be held.

The only other nomination requirement is that the nominee agrees to be able to perform their required duties and has the availability to do so, taking into account the fact that another chairperson will always be available as a point of contact.

How to nominate

Nominations will be accepted for 1 week from 2021-12-01 12:00PM PT to 2021-12-08 12:00PM PT.
Nominate somebody (including yourself) by responding to this issue with:

  • A statement that the nominee should be nominated for a chair position in the specific SIG holding its election. Nominees are required to provide a statement that they understand the responsibilities and requirements of the role, and promise to faithfully fulfill them and follow all contributor requirements for O3DE.
  • The name under which the nominee should be addressed. Nominees are allowed to contact the election proctor to have this name changed.
  • The GitHub username of the nominee (self-nominations need not include this; it's on your post.)
  • Nominee's Discord username (sorry, but you must be an active Discord user if you are a chairperson.)

Election process

The election will be conducted for one week from 2021-12-08 12:00PM PT and 2021-12-15 12:00PM PT and held through an online poll. Votes will be anonymous and anyone invested in the direction of O3DE and the SIG holding the election may vote. If you choose to vote, we ask that you be familiar with the nominees.

If there is a current interim chair, they will announce the results in the Discord sig channel as well as the SIG O3DE mailing list no later than 2021-12-17 1:00PM PT. If there is no interim chair, the executive director will announce the results utilizing the same communication channels. At that time if there is a dispute over the result or concern over vote tampering, voting information will be made public to the extent that it can be exported from the polling system and the SIG will conduct an independent audit under the guidance of a higher governing body in the foundation.

The elected chairpersons will begin serving their term on 2022-01-01 at 12AM PT. Tentatively SIG chairs will be elected on a yearly basis. If you have concerns about wanting to replace chairs earlier, please discuss in the request for feedback on Governance.

Proposed RFC Feature: Client and server build target separation

Summary:

For some O3DE applications, like multiplayer and live service games, server code cannot be shipped to the clients. Doing so creates incremental security and cheating risks. Servers that include client code and resources can also bring unnecessary dependencies which causes long build and relocation times. This RFC proposes a hard client and server split by separating the client and server into different build targets when required.

What is the relevance of this feature?

With the solution proposed by this RFC, O3DE will support the following two hosting modes for multiplayer applications:

  1. (Primary mode) One is for live service games, where headless dedicated servers can be packaged and distributed to on-prem/remote servers to provide reliable and stable hosting solutions. The dedicated server build omits the packages and modules that a headless server does not require and has a smaller compiled size.
  2. (Listen-server mode) Supporting Single Purchase products which cannot rely on subscription revenue to cover the costs of dedicated server hosting. In this mode, one of the clients acts as a server to which other players connect.

Feature design description:

This solution proposes to add a new Boolean CMake flag LY_CLIENT_BEHAVES_AS_SERVER which indicates whether the client target can behave as a client server. If this flag is set to true, the generated binaries will satisfy the requirements of use case 2, and if false the binaries will satisfy the requirements of use case 1.

Two compiler definitions are also introduced to allow the separation of client and server behaviors:

  • AZ_TRAIT_SERVER_ENABLED: Compile the server code for the current target.
  • AZ_TRAIT_CLIENT_ENABLED: Compile the client code for the current target.

O3DE developers can use combination of these CMake flags and compiler definitions to separate the client and server targets, so that they can create either a dedicated server for live service games or client hosted server for console titles.

Technical design description:

CMake definitions

For any multiplayer O3DE project, as well as any dependent gems that contain multiplayer components, define separate static libraries for the client and server targets like below:

create target MultiplayerSample.Client.static
    COMPILE_DEFINITIONS
        AZ_TRAIT_CLIENT_ENABLED=1
        AZ_TRAIT_SERVER_ENABLED=${LY_CLIENT_BEHAVES_AS_SERVER}
    BUILD_DEPENDENCIES
        PRIVATE
            Gem::Multiplayer.Client.Static

create target MultiplayerSample.Clients
    BUILD_DEPENDENCIES
        PRIVATE
            Gem::MultiplayerSample.Client.Static
            
if (LY_CLIENT_BEHAVES_AS_SERVER)
    MultiplayerSample.Server.static alias to MultiplayerSample.Client.static
else()
    create target MultiplayerSample.Server.static
        COMPILE_DEFINITIONS
            AZ_TRAIT_SERVER_ENABLED=1
        BUILD_DEPENDENCIES
            PRIVATE
                Gem::Multiplayer.Server.Static
endif()

create target MultiplayerSample.Servers
    BUILD_DEPENDENCIES
       PRIVATE
           Gem::MultiplayerSample.Server.Static

if (PAL_TRAIT_BUILD_SERVER_SUPPORTED)
    # If developers need to build a server launcher, then add the project name to the list of server launcher projects
    set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS MultiplayerSample)
endif()

All the downstream targets should always refer to the client or server static library.

Multiplayer gameplay components will live in both of the client and server targets to keep a simple cook and replication pipeline. Their behavior and accessors will be different because of the compile definitions and macros.

If O3DE developers only need the client hosted solution and don’t want to generate a server launcher, they can just remove the following lines in the CMake configuration:

if (PAL_TRAIT_BUILD_SERVER_SUPPORTED)
    # If developers need to build a server launcher, then add the project name to the list of server launcher projects
    set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS MultiplayerSample)
endif()

Macros

Macros would be enforced at the auto-generated component level. We should be adding additional #if AZ_TRAIT_SERVER_ENABLED and #if AZ_TRAIT_CLIENT_ENABLED markup around authority, server, autonomous, client properties and remote procedure calls (RPC), which will force derived components to respect those same defines.

What are the advantages of the feature?

  • Hard client and server separation can make O3DE multiplayer application more secure and compact.
  • The hard split mode can be helpful to catch programmer errors. For example, when compiling the client only target, the compiler can catch errors where O3DE developers use server only network state on a client code path.

What are the disadvantages of the feature?

  • Changing LY_CLIENT_BEHAVES_AS_SERVER will require a rebuild of all the targets that are using it, which may result in long recompilation and compilation times.
  • Testing/validating both permutations would multiply the number of builds on Jenkins. AR will have to pick the primary mode as default and validate the non-default permutation (client hosted use case) periodically during Jenkins nightly builds. Some breaking changes might pass AR and won’t be detected by Jenkins jobs immediately. It is suggested to validate the non-default permutation on one platform and configuration instead of doing this on 3 platforms (mac/linux/windows) with 3 configurations (debug/profile/release) and 2*2 permutations (monolithic/unity/non-monolithic-unity/non-unity).

How will this be implemented or integrated into the O3DE environment?

  • Identify the projects/gems that contain multiplayer components and split their client and server targets. Initial list this RFC targets on includes:
    • MultiplayerSample project
    • Multiplayer gem
    • AWS GameLift gem
  • Add project and gem templates to O3DE. Any new multiplayer-dependent projects or gems will follow the same configurations proposed by this RFC.

Are there any alternatives to this feature?

Add the same CMake flag/compile definitions as the proposed solution and also create the following three static libraries for the client hosted and dedicated server mode:

  • MultiplayerSample.Unified.static: Unified static library for the client target that can also behave as a server.
  • MultiplayerSample.Server.static: Static library for the dedicated server target which doesn’t include any client code.
  • MultiplayerSample.Client.static: Static library for the client target which doesn’t include any server code.

Project/Gem CMake configuration will look like below:

if (LY_CLIENT_BEHAVES_AS_SERVER)
    create target MultiplayerSample.Unified.static
        COMPILE_DEFINITIONS
            GENERATE_SERVER=1
            GENERATE_CLIENT=1
        BUILD_DEPENDENCIES
            PRIVATE
                Gem::Multiplayer.Unified.Static
    
    create target MultiplayerSample.Unified
        BUILD_DEPENDENCIES
            PRIVATE
                Gem::MultiplayerSample.Unified.Static
else()
    create target MultiplayerSample.Server.static
        COMPILE_DEFINITIONS
            GENERATE_SERVER=1
        BUILD_DEPENDENCIES
            PRIVATE
                Gem::Multiplayer.Server.Static
                
    create target MultiplayerSample.Server
        BUILD_DEPENDENCIES
            PRIVATE
                Gem::MultiplayerSample.Server.Static

    create target MultiplayerSample.Client.static
        COMPILE_DEFINITIONS
            GENERATE_CLIENT=1
        BUILD_DEPENDENCIES
            PRIVATE
                Gem::Multiplayer.Client.Static
                
    create target MultiplayerSample.Client
        BUILD_DEPENDENCIES
            PRIVATE
                Gem::MultiplayerSample.Client.Static
endif()

if (CMAKE_ALLOW_CLIENT_HOSTED)
    ly_create_alias(NAME Multiplayer.Clients NAMESPACE Gem TARGETS Gem::Multiplayer.Unified)
    ly_create_alias(NAME Multiplayer.Servers NAMESPACE Gem TARGETS Gem::Multiplayer.Unified)
else()
    ly_create_alias(NAME Multiplayer.Clients NAMESPACE Gem TARGETS Gem::Multiplayer.Client)
    ly_create_alias(NAME Multiplayer.Servers NAMESPACE Gem TARGETS Gem::Multiplayer.Server)
endif()

if (PAL_TRAIT_BUILD_SERVER_SUPPORTED)
    # If developers need to build a server launcher, then add the project name to the list of server launcher projects
    set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS MultiplayerSample)
endif()

This solution has the same advantages as the proposed solution. Disadvantages include:

  • Create a redundant unified target for the client hosted use case and complicate the CMake configuration.
  • Same compile definitions and testing/validating problems as the proposed solution.

How will users learn this feature?

  • Existing O3DE project (MultiplayerSample) and any gems that contain multiplayer components can be referenced as examples for the hard client and server separation.
  • Specific project/gem template can be provided with the client and server target predefined as references.
  • Document usage of the new LY_CLIENT_BEHAVES_AS_SERVER flag and compile definitions.

Are there any open questions?

  • Lumberyard 1.x was WAF based and its GridMate networking system provided an macro solution for separating the client and server code. How could O3DE avoid messing up macros in most of the multiplayer-dependent classes as GridMate did?
    • Enforce macros at the auto-generated component level which results in quick compile errors when macros are misused in derived classes.
  • For sig-build and sig-testing, what optimizations can be made to reduce the build time and simplify testing/validating on Jenkins when switch between these two hosting modes?
    • Create a common static library between server and client static targets that has the code shared between the two (that is not affected by the GENERATE_ defines) to reduce the amount of code that is compiled multiple times.

Proposed SIG-Network meeting agenda for JUNE-24-2021

Meeting Details

  • Date/Time: Month Date, Year @ 5:00pm UTC / 10:00am PDT
  • Location: Link will be posted in the #sig-network voice channel on Discord shortly before the call.
  • Moderator: Derek Bronson
  • Note Taker TBD

The SIG-Network repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

Introductions

*Facilitator - Derek Bronson, Amazon, Software Development Manager
*Participants Alphabetically - <Name, Company, Team Role> Keep it to 30 sec

Meeting Agenda

Discuss agenda from proposed topics

** Charter RFC and feedback process
** SIG Scope Summary review
** SIG Meeting Cadence
** Community suggested topics
** Open topics (if time)

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussions

List of things discussed that remain open

Postponed due to time

List any agenda topics missed/not completed

RFC: Amazon GameLift FlexMatch Integration

Summary

FlexMatch is a Amazon GameLift matchmaking service which allows multiplayer game developers to customize and build multiplayer matchmaking experiences to best fit their games. It gives flexibility to customize key aspects of the matchmaking process, including fine-tuning the matching algorithm. This RFC covers integrating Amazon GameLift FlexMatch into the AWS GameLift Gem.

What is the relevance of this feature?

Integrate AWS GameLift Gem with FlexMatch feature to support multiplayer game matchmaking so that players can be easily grouped with other compatible players for each game match.

Personas

O3DE multiplayer game developer who wants to build matchmaking experience to evaluate and select compatible player for each match of their game.

User Stories

  • As an O3DE multiplayer game developer, I want O3DE to offer an integration with Amazon GameLift FlexMatch feature to build matchmaking experience.
  • As an O3DE multiplayer game developer, I want to be able take advantage of backfill modes in FlexMatch to improve the speed of matchmaking for players as well providing mechanism to bring in other players when players fail to join.
  • As an O3DE multiplayer game developer, I want to have a CDK example that shows how to model FlexMatch resources to help me manage and deploy matchmaking resources.
  • As an O3DE multiplayer game developer, I want to have step by step documentation about how to use Amazon GameLift FlexMatch in O3DE, including a tutorial level.

In Scope

  • Amazon GameLift FlexMatch matchmaking integration
  • Game client local matchmaking ticket system to poll Amazon GameLift FlexMatch matchmaking ticket status
  • Amazon GameLift FlexMatch automatic & manual backfill matchmaking integration

Out of Scope

  • Game client service to track Amazon GameLift FlexMatch matchmaking ticket event notifications. See open question at end of RFC.

Feature design description

This design proposes integrating FlexMatch matchmaking support into the existing AWS GameLift Gem such that developers of multiplayer games can easily build, experiment and deploy matchmaking features to group players and place them in game sessions. The O3DE AWS GameLift gem will support the FlexMatch workflows outlined here and in the workflow section.

FlexMatch also supports two backfilling games so games can start with fewer players to accelerate matchmaking and new players can be added to the game in cases such as players failing to join.

The AWS GameLift Gem will support two backfill modes: manual and automatic. In manual mode, the developer’s service code can make the decision if and when to backfill; no backfill will occur unless the server explicitly starts a backfill request. In automatic mode, the GameLift server SDK will automatically start backfill requests if the sessions starts without a full complement of players. Note: backfill mode is managed in the GameLift matchmaking configuration.

Requirements & Goals

  • The feature MUST get integrated with Amazon GameLift FlexMatch including matchmaking and backfill matchmaking process
  • The feature MUST support matchmaking features on both client and server
  • The feature MUST provide CDK application sample for deploying FlexMatch required resources
  • The feature MUST function on all supported GameLift Windows and Linux instances (Amazon Linux 2) for dedicated server
  • The feature MUST get deployed successfully through CDK application sample or manual instructions
  • The feature SHOULD have configurable polling frequency for game client local matchmaking ticket system
  • The feature SHOULD be flexible to replace game client local matchmaking ticket system with client event notification service

Terminology

  • Matchmaker The customized process to build a game match, which includes matchmaking configuration and rule set. It manages the pool of matchmaking requests received, forms teams for a match, processes and selects players to find the best possible player groups, and initiates the process of placing and starting a game session for the match.
  • Matchmaking Configuration Guidelines for use with FlexMatch to match players into games. All matchmaking requests must specify a matchmaking configuration.
  • Matchmaking Rule Set Set of rule statements, used with FlexMatch, that determine how to build player matches. Each rule set describes a type of group to be created and defines the parameters for acceptable player matches. Rule sets are used in MatchmakingConfiguration objects.
  • Player Acceptance If matchmaking configuration requires acceptance, all players must be given the option to accept or reject a proposed match. A match must receive acceptances from all players in the proposed match before it can be completed.
  • Match Backfill Fill the empty player slots in an existing game session with well-matched new players. Customize when and how new players can be requested, and use the same custom match rules to find additional players.
  • Backfill Mode Backfill mode is managed in matchmaking configuration, it can be either AUTOMATIC or MANUAL. For manual backfill, it gives developer the flexibility to decide when to trigger a backfill request. For automatic backfill, Amazon GameLift service begins automatically generating backfill requests for it if game session starts with open player slots.
  • Client Local Ticket Tracker A local ticker manager consistently describes matchmaking ticket for player. When an acceptable match is found, matchmaking ticket will get updated with required information for game session connection.

Workflow

Matchmaking
  1. Request matchmaking for player against Amazon GameLift FlexMatch by calling StartMatchmaking.

    • Amazon GameLift service will generate matchmaking ticket and put in ticket pool. Ticket will remain in pool until it is matched or time limit is reached.
    • Amazon GameLift service will evaluate ticket based on ticket age and build match based on matchmaking configuration.
  2. Track matchmaking ticket by using client local ticket tracker.

    • [Player Acceptance Enabled] Player needs to AcceptMatch to fulfill match ticket - if any player in proposed match rejects, ticket will go to FAILURE and won't be processed; for players accept, their ticket will go back to pool.
    • When acceptable match is found, Amazon GameLift service will create new game session automatically.
  3. Once game session is created, local ticket tracker will get updated ticket with game session connection data, like ip address and created player session id for player.

  4. Connect player to the match.

Note: Player can cancel match at any time by calling StopMatchmaking. If there is ongoing local ticket tracker process, it should be stopped as well.

Backfill matchmaking

The workflow is mostly the same with standard matchmaking workflow, except step 2 as game session is existed when acceptable match is found:

  • Amazon GameLift service will signal game session updated and game server needs to update existing game with latest match data in OnUpdateSessionBegin.

Note: For manual backfill, developer has responsibility to send backfill request on server side by calling StartMatchBackfill whenever a matched game has one or more open player slots, like a match game starts with open player slots, or player leaves an ongoing match game.
Note: Depending on the game style, developer might want to stop backfill after reaching specific conditions, like game has 5mins left, etc. Then server can stop backfill by calling StopMatchBackfill.

Technical design description

  • The feature requires an update to existing session interface as it introduces 3 new public client APIs: AcceptMatch, StartMatchmaking and StopMatchmaking.
  • The feature requires an update to existing session notifications with new callback OnUpdateSessionBegin to support existing game session update.
  • The feature requires to create new server interface, StartMatchBackfill and StopMatchBackfill, to support Amazon GameLift FlexMatch manual matchmaking backfill mode.
  • The feature requires to create a new component, AWSGameLiftClientLocalTicketTracker, to poll matchmaking ticket periodically.

Client APIs

Update ISessionRequests.h by adding client public API requests.

struct AcceptMatchRequest
{
    bool m_acceptMatch;
    AZStd::vector<AZStd::string> m_playerIds;
    AZStd::string m_ticketId;
};
 
struct StartMatchmakingRequest
{
    AZStd::string m_ticketId;
};
 
struct StopMatchmakingRequest
{
    AZStd::string m_ticketId;
};

Update ISessionRequests for AcceptMatch, StartMatchmaking and StopMatchmaking

virtual void AcceptMatch(const AcceptMatchRequest& request) = 0;
 
virtual AZStd::string StartMatchmaking(const StartMatchmakingRequest& request) = 0;
 
virtual void StopMatchmaking(const StopMatchmakingRequest& request) = 0;

Update ISessionAsyncRequests and SessionAsyncRequestNotifications for AcceptMatch, StartMatchmaking and StopMatchmaking

virtual void AcceptMatchAsync(const AcceptMatchRequest& request) = 0;
virtual void OnAcceptMatchAsyncComplete() = 0;
 
virtual void StartMatchmakingAsync(const StartMatchmakingRequest& request) = 0;
virtual void OnStartMatchmakingAsyncComplete(const AZStd::string& matchmakingTicketId) = 0;
 
virtual void StopMatchmakingAsync(const StopMatchmakingRequest& request) = 0;
virtual void OnStopMatchmakingAsyncComplete() = 0;

Add AWS GameLift Gem matchmaking requests AWSGameLiftAcceptMatchRequest, AWSGameLiftStartMatchmakingRequest and AWSGameLiftStopMatchmakingRequest under Gems/AWSGameLift/Code/AWSGameLiftClient/Include/Request as Amazon GameLift service requires extra attributes for matchmaking request 6

Server Notifications

Update SessionNotifications with OnUpdateSessionBegin

virtual void OnUpdateSessionBegin(const SessionConfig& sessionConfig) = 0;

Server APIs

Update IAWSGameLiftServerRequests with backfill server APIs

class IAWSGameLiftServerRequests
{
public:
    virtual void StartMatchBackfill(const StartMatchBackfillRequest& request) = 0;
    virtual void StopMatchBackfill(const StopMatchBackfillRequest& request) = 0;
};

Components

AWSGameLiftClientLocalTicketTracker Instead of having a backend client service to track FlexMatch event notification, AWS GameLift Gem will have a client local ticker manager consistently polls and describes matchmaking ticket.

  • m_ticketPollFrequency should be at least 10 seconds to prevent AWS request throttle (frequency could be configurable through setting registry file)
  • Start ticket polling only after StartMatchmaking succeeds; Stop ticket polling when ticket status is COMPLETED or StopMatchmaking is called
  • There is only one ticket polling process at one time
  • Developer has responsibility to replace it with more scalable solution for public release game, like publishing ticket event notifications to Amazon SNS topic.

AWSGameLiftClientLocalTicketTracker should be flexible to replace by implementing internal interface IAWSGameLiftMatchmakingTicketRequests

class IAWSGameLiftMatchmakingTicketRequests
{
public:
    virtual void StartPolling(const AZStd::string& ticketId, const AZStd::string& playerId) = 0;
    virtual void StopPolling() = 0;
};

What are the advantages of the feature?

  • The feature extends O3DE’s GameLift integration to support multiplayer matchmaking features that are used in most multiplayer games.
  • The feature saves developer efforts to integrate multiplayer matchmaking features with O3DE networking components.
  • The feature usage cost is included in fees for GameLift as hosting games on GameLift servers.
  • The feature utilize AWS CDK tool kit to deploy and manage related FlexMatch resources.

What are the disadvantages of the feature?

  • The feature is designed for dedicated server hosted on Amazon GameLift only.
  • The feature supports only one matchmaking ticket in flight per client at one time; developers may also need to implement extra code if manual backfill is required (such as player on early quit) but automatic backfill is configured.
  • The feature is hard to automatically test as GameLiftLocal does not support FlexMatch testing. Tests must deploy the required AWS resources with the downside of test run time time and added costs.
  • Amazon GameLift has limited free tier, requiring developers to be aware of potential costs they may incur.

How will this be implemented or integrated into the O3DE environment?

  • Most of code will be provided through AWS GameLift Gem, some code changes maybe required in AzFramework and AWS GameLift CDK application sample.
  • Settings registry file and other config will be provided for configurable settings.

Are there any alternatives to this feature?

Yes, customer are free to implement their own multiplayer matchmaking mechanism without using Amazon GameLift FlexMatch. Customers can also use GameLift without FlexMatch features.

How will users learn this feature?

  • The feature will provide detailed documentation for the feature, as per most O3DE gems.
  • Ideally the feature should be introduced with a tutorial multiplayer level. (note: tutorial level won’t be delivered as part of this RFC).

Are there any open questions?

Q: Should the feature provide client service solution to track matchmaking event notification (including CDK application sample to setup required resources)?

Context: As suggested by Amazon GameLift service, all games in public release should use notifications regardless of volume. The continuous polling approach is only appropriate for games in development with low matchmaking usage, because large volume DescribeMatchmaking calls in short period time can easily get your requests throttled which will delay client to get latest match status.

Solution: Setup event notifications through Amazon Cloudwatch events or Amazon SNS topics. See details in https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html

Cost: The feature need to add Amazon Cloudwatch events or Amazon SNS topics setup in CDK application sample, and cost will depend on corresponding service usage price.

Proposed SIG-Network meeting agenda for DEC-21-21

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for Feb-15-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Last meetings notes: https://github.com/o3de/sig-network/blob/main/meetings/notes/sig-meeting-20220201.md

In Progress

  • Migrate issue backlog fully to GitHub Issues: ETA 02/28
  • Remove blockers to public roadmap updates for SIG-Network: ETA 02/28
  • Sig-chair(s) meeting this week to breakdown feature matrix and provide initial draft to SIG-Network community: ETA 02/14
  • Requests for blog posts around networking items: Entity Hierarchies, input scripting.
    • Discussing needs with documentation, team to deliver docs updates rather blog posts with limited resources. Can address blog post needs separately with marketing for upcoming O3DE releases.

Abandoned

  • O3DE Marketing would like screenshots of MPS running on mobile (@lmbr-pip).

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for July-19-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for MAR-01-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for May-10-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for MAR-15-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for SEPT-14-21

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

  • Charter was updated and amended (to be reviewed in this meeting)
  • Pip Potter (lmbr-pip) taking over sig moderation until sig elections are held.
  • Sig triage is now public meeting held every Thursday, on O3DE calendar
  • Sig received a number of RFCs (see below)
  • Updates to networking code (since last meeting): Weapons components, debug draw updates, handshake updates etc.
  • Updates to cloud service (since last meeting): Migration of AWS SDKs to 3rd Party packages with build scripts/steps.

Meeting Agenda

** Charter RFC update review

  • Companies submitting cloud gems must commit to support the gems. Unclear if this should be in the charter?
  • Other items to consider for charter.

** Meeting cadence updates

  • Prior meeting proposed split schedule to have alternating EU/US (9am) and AP friendly times (9pm). Proposing in the short term to hold meetings consistently at 9am PT every other Tuesday.

** Community suggested topics
TBD

** Open topics (if time)

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for June-21-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

  • Review RFC: #64
  • Review Public Roadmap Proposal

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for August-16-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for NOV-09-21

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

Previous meeting notes: https://github.com/o3de/sig-network/blob/main/meetings/notes/sig-meeting-20211026.md

SIG Updates

What happened since the last meeting?

Networking Updates

Cloud Service Updates

Meeting Agenda

Discuss agenda from proposed topics

  • Charter update

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Proposed SIG-Network meeting agenda for Jan-17-23

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

SIG Reviewer Nomination for `allisaurus`

I would like to nominate: allisaurus (myself), to become a Reviewer on behalf of SIG-Network. I verify that I have fulfilled the prerequisites for this role.

Reviewer Nomination Requirements

Reviewers & Maintainers that support this nomination should comment in this issue.

Proposed SIG-Network meeting agenda for Sept-20-2022

Meeting Details

The SIG-Network Meetings repo contains the history past calls, including a link to the agenda, recording, notes, and resources.

SIG Updates

What happened since the last meeting?

Meeting Agenda

  • O3DCon updates / plans for October meeting due to O3DCon conflict.

Discuss agenda from proposed topics

Outcomes from Discussion topics

Discuss outcomes from agenda

Action Items

Create actionable items from proposed topics

Open Discussion Items

List any additional items below!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.