Skip to content

Latest commit

 

History

History
319 lines (209 loc) · 37.1 KB

multiplayer-workflow-tests.md

File metadata and controls

319 lines (209 loc) · 37.1 KB

Multiplayer Testing Workflow Tests

These tests are designed to cover the basic functionality related to running a level from a Multiplayer project.

General Docs

Common Issues

  • Most issues will be caught through log errors, which can be seen in the Editor and Launcher consoles or in logs after running tests.
  • In addition, network prefabs can be a visual clue that something isn't working as expected (objects disappearing or not appearing in the first place).
  • Issues connecting to the server are caused either by:
    • Processes that remain after closing applications - this can result in errors when trying to launch subsequent times.
    • The ServerLauncher has not been built or has not been built against the same commit as Editor/ClientLauncher.

Prerequisites

  • MultiplayerSample project is cloned and built O3DE MultiplayerSample
    • If using this approach, the SampleBase level can be used for most tests.
  • Alternatively: A project has been created and built that includes the Multiplayer Gem and subsequent changes have been made to enable functionality (O3DE Multiplayer Gem).
    • A new level should be created in the project that utilizes the following to act as identifiers for whether multiplayer connections are working as intended:
      • Player Spawners.
      • Network Prefabs.

Server Platforms

  • Windows
  • Linux

Game Launcher Platforms

  • Windows
  • Linux

NewStarBase Gameplay Validations

Player Connection

  • Players are able to connect to the server without issue.
  • Game is able to start.

Player Movement & Combat

  • Moving, Jumping, and basic controls work as expected.
  • Aiming and Primary Weapon Fire work as expected.
  • Pistol firing VFX should be visible.

UI/UX

  • Connected player count should display the correct number of players.
  • Round counter should start at the end of the round.
  • Round counter should end at round end.
  • Scoreboard (opened with Tab) should accurately display scores.
    • Increase on gem pick up.
    • Decrease on player death by 20%.
  • Esc Menu - Continue and Quit should work as expected.

Basic Gameplay

  • Collected gems should disappear from the field.
  • Jumping out of bounds should have the player respawn.
  • Start of Round should respawn players.

Victory/Defeat

  • Player with the most gems wins the round.
  • Winning player can tell they have won.
  • Losing players can tell they did not win.

Stability

  • No stability issues are present when playing
  • Ensure no errors are present in the server or game logs.
    • user/logs/server.log.
    • user/logs/game.log.

Workflows

Area: Client-Server Building

Docs

Prerequisites

  • A Multiplayer level exists in the project (must contain a netbind component).

Product:

  • A functional server launcher.
  • A functional client launcher.

Suggested Timebox: 1 hour per platform.

Workflow Requests Things to Watch For
Build Existing Project Launchers
  1. Build all 3 launchers using CLI..
    • cmake --build build/windows --target MyProject.GameLauncher MyProject.ServerLauncher MyProject.UnifiedLauncher --config profile -- -m
  • Project launchers build successfully.
  • Server, Client and Unified launchers are built in the project build directory.
  • Project can be launched in O3DE Editor once built.
Build New Project Launchers
  1. Create a new multiplayer project.
  2. Build all 3 launchers using CLI.
    • cmake --build build/windows --target MyProject.GameLauncher MyProject.ServerLauncher MyProject.UnifiedLauncher --config profile -- -m
  • Project launchers build successfully.
  • Server, Client and Unified launchers are built in the project build directory.
  • Project can be launched in O3DE Editor once built.
Build Project with Project Manager
  1. Launch o3de.exe.
  2. Add or create a project with the Multiplayer Gem enabled.
  3. Select Build Project.
  • Project launchers build successfully.
  • Server, Client and Unified launchers are built in the project build directory.
  • Project can be launched in O3DE Editor once built.
Test Hosting with Unified Launcher
  1. Build an existing or new multiplayer project's launchers - using either Project Manager or CLI.
  2. Launch the project.UnifiedLauncher.
  3. Open the Console ~.
  4. Enter host into the console.
  5. Load a multiplayer level.
  6. Launch the project.GameLauncher.
  7. Enter connect into the console.
  • Console displays text confirming the session is operating in ClientServer mode.
  • Game Launcher client is able to connect to the ClientServer.
  • Project can be launched in O3DE Editor once built.
Compile Autogen File
  1. Use either MultiplayerSample or create an autogen file following the O3DE Tutorial: First Multiplayer Component instructions.
  2. Edit the selected autogen file if using an existing one.
  3. Build the Project.
  • No compile errors when building.
  • If the edits included a component field/component, the changes show in the Editor.
  • Project can be launched in O3DE Editor once built.

Area: Client-Server Communications

Docs

Prerequisites

  • Ensure the ServerLauncher is built, as well as the Editor and ClientLauncher (if testing via the client launcher).

Example Assets

  • Auto Component: MultiplayerSample\Gem\Code\Source\AutoGen\NetworkHealthComponent.AutoComponent.xml

Product: A client that has successfully communicated with the server.

Suggested Timebox: 30 minutes per platform.

Workflow Requests Things to Watch For
Editor Game Mode
  1. Run the network enabled level (network prefabs, spawners, etc.) in game mode in Editor.
  2. Leave game mode.
  • Network player prefabs are never spawned when they should.
  • Error logs in Editor Console.
  • Connection drops.
  • Server process doesn't shut down.
Server/Game Launchers
  1. Launch the server launch and configure to use the network enabled level.
  2. Launch the client/game launcher and connect to the server.
  • Network player prefabs are never spawned.
  • Error logs in either console ~.
  • Connection drops.
Auto Component Creation/Editing
  1. Edit an existing auto component or create a new one.
  2. Compile the project.
  3. Add the new/edited component to an entity in the level.
  4. Check the level in Editor game mode.
  5. Check the level in Server and Game Launcher.
  • Compile errors that don't seem to result from user error.
  • Component doesn't display in Component List in Editor.
  • Error logs in Editor, Server or Game Launcher consoles.

Area: Debug Desync

Docs

Prerequisites

  • These scenarios all require a server and at least one client to be set up and connected utilizing the SampleBase level.
  • With reduced situations causing desync, it may be required to use a tool similar to Clumsy (or your preferred tool) to create artificial network issues.

Audit Feature CVARS

  • cl_EnableDesyncDebugging
  • cl_DesyncDebugging_AuditInputs
  • net_DebutAuditTrail_HistorySize

Product: A Network Audit Trail that provides the expected information.

Suggested Timebox: 30 minutes per platform.

Workflow Requests Things to Watch For
CVARS can be adjusted at runtime
  1. Bring up console ~ in Server Launcher.
  2. Set cl_EnableDesyncDebugging to true.
  3. Set cl_DesyncDebugging_AuditInputs to true.
  4. Set net_DebutAuditTrail_HistorySize to something other than the default of 20.
  5. Try to force a desync through button mashing, alt-tabbing, general chaotic inputs on one of the game launcher client windows.
  6. In the server launcher, press the Home Key.
  7. Go to Multiplayer → Audit Trail.
  • The server console window will note when a desync has occurred.
  • Desync debugging can be seen in the Home Key → Multiplayer → Audit Trail menu after enabling cl_EnableDesyncDebugging.
  • Positional desync debugging can be seen in the Home Key menu after enabling cl_DesyncDebugging_AuditInputs.
  • The new net_DebutAuditTrail_HistorySize value is echoed in the console window after changing it.
    • The number of items in the Desync Debugging list is capped at this value with the desync titles counted toward the total.
Desync Audit Search functionality
  1. All audit features are enabled.
  2. In the Audit Trail window HOME Key → Multiplayer → Audit Trail enter a value (case sensitive) into the search field that corresponds to some subset of currently capture information.
  • Audit trail only lists items that meet the entered search term.
Refresh Button
  1. All audit features are enabled.
  2. In the Home Key → Multiplayer → Audit Trail window press the Refresh button.
  • The audit list updates to show additional desync records that occurred since the last refresh, up to the defined history size.

Area: Player Spawners

Docs

Prerequisites

  • These scenarios all require a server and at least one client to be set up and connected utilizing the SampleBase level.

Product: A Multiplayer Game Session that spawns players in across player spawners.

Suggested Timebox: 30 minutes per platform.

Workflow Requests Things to Watch For
Existing player spawners in MultiplayerSample sample_base level function as expected
  1. Launch the Server Launcher and set it up to host by entering the host command in the console.
  2. Change the level to SampleBase.
  3. Connect multiple Game Launcher Clients to the server by entering the connect command entered in game launcher console.
  • As clients connect, they spawn at the player spawner locations in a round robin fashion.
  • Each player spawns in a new location until all player spawners have been used, then restarting at the beginning location.
Add additional player spawners
  1. Open the O3DE Editor.
  2. Open the SampleBase level.
  3. Add a new, or duplicate an existing, player spawner entity with the player spawner component added and configured.
  4. Save and close the O3DE Editor.
  5. Launch and setup the Server Launcher before connecting multiple Game Launcher Clients to the server.
  • As clients connect, they spawn at the player spawner locations in a round robin fashion.
  • Each player spawns in a new location until all player spawners (including the newly added spawners) have been used, then restarting at the beginning location.
Snap to Ground
  1. Open the O3DE Editor.
  2. Open the SampleBase level.
  3. Select all Spawner entities and toggle Snap to Ground off.
  4. Raise all the entities by adjusting the Z Translate value.
  5. Save and close the O3DE Editor.
  6. Launch and setup the Server Launcher before connecting multiple Game Launcher Clients to the server.
  • Players should spawn at the new Z height as they connect.

Area: Play NewStarBase in Editor

Docs

Prerequisites

  • MultiplayerSample project has both the Server Launcher & Game Client built.

Product: A built project that is playable through the O3DE Editor.

Suggested Timebox: 30 minutes per platform.

Workflow Requests Things to Watch For
Load and Launch into O3DE Editor Client
  1. Load NewStarBase level in O3DE Editor.
  2. Hit play.
  • Level should load in the O3DE Editor.
  • Green text in bottom right should show Connected.
Basic Player Movement & Player Combat
  1. NewStarBase level is in game mode in the O3DE Editor.
  2. Move around the level using the movement controls.
  3. Utilize the combat controls while moving around the level.
  • Moving, Jumping, and basic controls work as expected.
  • Aiming and Primary Weapon Fire work as expected.
  • Pistol firing VFX should be visible.
Basic Gameplay
  1. Collect Gems.
  2. Go Out of Bounds (OOB).
  3. Play through until a new Start of Round.
  • Collected gems should disappear from the field.
  • Jumping out of bounds should have the player respawn.
  • Start of Round should respawn players.
Basic UI/UX
  1. Round Counter.
  2. Player Health/Shields.
  3. Scoreboard (Press Tab).
  4. Scoreboard (End of Round).
  5. Esc Menu.
  • Round counter should start at the end of the round.
  • Round counter should end at round end.
  • Scoreboard should accurately display scores.
  • Esc Menu - Continue and Quit should work as expected.

Area: Play NewStarBase in Standalone Launchers

Docs

Prerequisites

  • MultiplayerSample project has both the Server Launcher & Game Client built.
  • Server Launcher is configured and launched in Headless Mode with NewStarBase level.

Product: A built Server Launcher & Game Client that is able to connect to the server and interact with other game clients.

Suggested Timebox: 60 minutes per platform.

Workflow Requests Things to Watch For
2 Game Clients connect and play through until end of the round Players attempt to connect and then play through the session until the end of the round. NewStarBase Gameplay Validations
3+ Game Clients connect and play through until end of the round Players attempt to connect and then play through the session until the end of the round. NewStarBase Gameplay Validations
Max Game Clients connect and play through until end of the round Players attempt to connect and then play through the session until the end of the round. NewStarBase Gameplay Validations
Max + 1 Game Clients connect and play through until end of the round Players attempt to connect and then play through the session until the end of the round.
NewStarBase Gameplay Validations

Max +1
  • Server remains stable for already connected players
  • Last player connect is unable to connect and is presented with a meaningful error.

Area: Network Versioning

Docs

Prerequisites

  • MultiplayerSample project has both the Server Launcher & Game Client built.
    • Alternatively: A new project is created using the Multiplayer Template and the project is built, including the server and game launchers.

Server Version Mismatch CVARs

  • Server: sv_versionMismatch_autoDisconnect (Default = True)
    • Determines if a mismatched connection will automatically terminate. It’s recommended to keep this true; even minor differences between the version of a multiplayer component can cause unexpected behavior.
  • Server: sv_versionMismatch_sendAllComponentHashesToClient (Default = True)
    • Determines if the server will send all its individual multiplayer component version information to the client when there’s a mismatch. Upon receiving the information, the client will print which components are different to the console. It’s recommended to set to false for release builds. This is to prevent clients having knowledge to any multiplayer component information that should be kept private (component names and version hashes).
  • Client: bg_viewportConnectionStatus (Default = True)
    • If true, the viewport connection status system will display on-screen warnings whenever important multiplayer events occur; this includes version mismatches.

Product: A Server/Client that are either version matched or version mismatched that behave as expected.

Suggested Timebox: 90 minutes per platform.

Workflow Requests Things to Watch For
Server/Client - No Mismatch
  1. Without making any changes to the project, launch the server launcher and connect to it with a local client.
  • No connection issues occur.
  • No notification about mismatch with bg_viewportConnectionStatus set to True or False.
Server/Client - Older Server Mismatch
  1. Make a change to one of the Auto Components used in the project.
  2. Rebuild the Game Launcher Client WITHOUT rebuilding the Server Client.
  3. Launch the Server Client and connect to it with a local Game Launcher Client.
  • User IS notified in console/log about the mismatch when with bg_viewportConnectionStatus set to True.
  • User IS NOT notified in console/log about the mismatch when with bg_viewportConnectionStatus set to False.
  • Client is disconnected.
Server/Client - Older Client Mismatch
  1. Make a change to one of the Auto Components used in the project.
  2. Rebuild the Server Launcher WITHOUT rebuilding the Game Launcher Client.
  3. Launch the Server Client and connect to it with a local Game Launcher Client.
  • User IS notified in console/log about the mismatch when with bg_viewportConnectionStatus set to True.
  • User IS NOT notified in console/log about the mismatch when with bg_viewportConnectionStatus set to False.
  • Client is disconnected.
Allow Players To Connect On Mismatch
  1. Launch the Server Client and disable sv_versionMismatch_autoDisconnect from the console.
  2. Launch a local Game Launcher Client and connect to the Server Client.
  • In the above Server/Client Mismatch workflow scenarios the client will connect to the session and will not be disconnected.
  • User IS notified in console/log about the mismatch when with bg_viewportConnectionStatus set to True.
  • User IS NOT notified in console/log about the mismatch when with bg_viewportConnectionStatus set to False.
Verbose Mismatch Messaging
  1. Launch the Server Client and disable sv_versionMismatch_sendAllComponentHashesToClient from the console.
  2. Launch a local Game Launcher Client and connect to the Server Client.
  • In the above Server/Client Mismatch workflow scenarios the client will receive a less verbose notification, that doesn't include specific components, with bg_viewportConnectionStatus set to True.

Area: MultiplayerSample PAK Builds (WIP)

NOTE: This area is a work in progress and needs formal instructions for generating PAK builds.

Docs

Prerequisites

  • MultiplayerSample project has both the Server Launcher & Game Client built.
  • Create a PAK asset bundle to distribute the game and server following the instructions in .
  • Server Launcher is configured and launched in Headless Mode with NewStarBase level.

Suggested Timebox: 90 minutes per platform.

Workflow Requests Things to Watch For
3+ Game Clients connect and play through until end of the round
  • Players play through the session until the end of the round.
NewStarBase Gameplay Validations