1. Go to the AWS IAM console and create an IAM role called o3de-automation-tests which adds your own account as as a trusted entity and uses the "AdministratorAccess" permissions policy.
2. Copy {engine_root}\scripts\build\Platform\Windows\deploy_cdk_applications.cmd to your engine root folder.
3. Open a new Command Prompt window at the engine root and set the following environment variables:
3. Open a new Command Prompt window at the engine root and set the following environment variables:
```
Set O3DE_AWS_PROJECT_NAME=AWSAUTO
Set O3DE_AWS_DEPLOY_REGION=us-east-1
Set O3DE_AWS_DEPLOY_ACCOUNT={your_aws_account_id}
Set ASSUME_ROLE_ARN=arn:aws:iam::{your_aws_account_id}:role/o3de-automation-tests
Set COMMIT_ID=HEAD
```
4. In the same Command Prompt window, Deploy the CDK applications for AWS gems by running deploy_cdk_applications.cmd.
//! The QuadMeshType specifies the property of the heightfield quad.
enumclassQuadMeshType:uint8_t
{
SubdivideUpperLeftToBottomRight,//!< Subdivide the quad, from upper left to bottom right |\|, into two triangles.
SubdivideBottomLeftToUpperRight,//!< Subdivide the quad, from bottom left to upper right |/|, into two triangles.
Hole//!< The quad should be treated as a hole in the heightfield.
};
structHeightMaterialPoint
{
floatm_height{0.0f};//!< Holds the height of this point in the heightfield relative to the heightfield entity location.
QuadMeshTypem_quadMeshType{QuadMeshType::SubdivideUpperLeftToBottomRight};//!< By default, create two triangles like this |\|, where this point is in the upper left corner.
uint8_tm_materialIndex{0};//!< The surface material index for the upper left corner of this quad.
uint16_tm_padding{0};//!< available for future use.
};
//! An interface to provide heightfield values.
classHeightfieldProviderRequests
:publicAZ::ComponentBus
{
public:
//! Returns the distance between each height in the map.
AZ_CVAR(bool,bg_octreeUseQuadtree,false,nullptr,AZ::ConsoleFunctorFlags::ReadOnly,"If set to true, the visibility octrees will degenerate to a quadtree split along the X/Y plane");
AZ_CVAR(float,bg_octreeMaxWorldExtents,16384.0f,nullptr,AZ::ConsoleFunctorFlags::Null,"Maximum supported world size by the world octreeSystemComponent");
AZ_CVAR(uint32_t,bg_octreeNodeMaxEntries,64,nullptr,AZ::ConsoleFunctorFlags::Null,"Maximum number of entries to allow in any node before forcing a split");
AZ_CVAR(uint32_t,bg_octreeNodeMinEntries,32,nullptr,AZ::ConsoleFunctorFlags::Null,"Minimum number of entries to allow in a node resulting from a merge operation");
AZ_CVAR(uint32_t,bg_octreeNodeMaxEntries,64,nullptr,AZ::ConsoleFunctorFlags::Null,"Maximum number of entries to allow in any node before forcing a split");
AZ_CVAR(uint32_t,bg_octreeNodeMinEntries,32,nullptr,AZ::ConsoleFunctorFlags::Null,"Minimum number of entries to allow in a node resulting from a merge operation");
ScaleModem_scaleMode;//! Determines if the vertical range of the histogram will be manually specified, auto-expanded or automatically scaled based on the samples.
floatm_autoScaleSpeed=0.05f;//! Indicates how fast the min max values and the visible vertical range are adapting to new samples.
ImColorm_barLineColor=ImColor(66,166,178);//! Color used by either the lines in case ViewType is Lines or bars in case or Histogram.
// Generate crypto-rand user identifier, send to both server and client so they can negotiate the autonomous entity to assume predictive control over after migration
"The address of the remote server or host to connect to");
AZ_CVAR(uint16_t,cl_serverport,DefaultServerPort,nullptr,AZ::ConsoleFunctorFlags::DontReplicate,"The port of the remote host to connect to for game traffic");
AZ_CVAR(uint16_t,sv_port,DefaultServerPort,nullptr,AZ::ConsoleFunctorFlags::DontReplicate,"The port that this multiplayer gem will bind to for game traffic");
AZ_CVAR(uint16_t,sv_portRange,999,nullptr,AZ::ConsoleFunctorFlags::DontReplicate,"The range of ports the host will incrementally attempt to bind to when initializing");
AZ_CVAR(AZ::CVarFixedString,sv_map,"nolevel",nullptr,AZ::ConsoleFunctorFlags::DontReplicate,"The map the server should load");
AZ_CVAR(ProtocolType,sv_protocol,ProtocolType::Udp,nullptr,AZ::ConsoleFunctorFlags::DontReplicate,"This flag controls whether we use TCP or UDP for game networking");
AZ_CVAR(bool,sv_isDedicated,true,nullptr,AZ::ConsoleFunctorFlags::DontReplicate,"Whether the host command creates an independent or client hosted server");
AZLOG_ERROR("Failed to add entity replicator, entity does not exist, entity id %u",entityHandle.GetNetEntityId());
AZLOG_ERROR("Failed to add entity replicator, entity does not exist, netEntityId %llu",static_cast<AZ::u64>(entityHandle.GetNetEntityId()));
AZ_Assert(false,"Failed to add entity replicator, entity does not exist");
}
returnentityReplicator;
@ -502,24 +517,20 @@ namespace Multiplayer
{
if(entityReplicator->IsMarkedForRemoval())
{
AZLOG(NET_RepDeletes,"Got a replicator delete message that is a duplicate id %u remote host %s",updateMessage.GetEntityId(),GetRemoteHostId().GetString().c_str());
AZLOG(NET_RepDeletes,"Got a replicator delete message that is a duplicate id %llu remote host %s",static_cast<AZ::u64>(updateMessage.GetEntityId()),GetRemoteHostId().GetString().c_str());
// This can occur if we migrate entities quickly - if this is a replicator from C to A, A migrates to B, B then migrates to C, and A's delete replicator has not arrived at C
AZLOG(NET_RepDeletes,"Got a replicator delete message for a replicator we own id %u remote host %s",updateMessage.GetEntityId(),GetRemoteHostId().GetString().c_str());
AZLOG(NET_RepDeletes,"Got a replicator delete message for a replicator we own id %llu remote host %s",static_cast<AZ::u64>(updateMessage.GetEntityId()),GetRemoteHostId().GetString().c_str());
}
else
{
shouldDeleteEntity=true;
entityReplicator->MarkForRemoval();
AZLOG(NET_RepDeletes,"Deleting replicater for entity id %u remote host %s",updateMessage.GetEntityId(),GetRemoteHostId().GetString().c_str());
AZLOG(NET_RepDeletes,"Deleting replicater for entity id %llu remote host %s",static_cast<AZ::u64>(updateMessage.GetEntityId()),GetRemoteHostId().GetString().c_str());
AZLOG(NET_RepDeletes,"Leaving id %u using timeout remote host %s",entity.GetNetEntityId(),GetRemoteHostId().GetString().c_str());
AZLOG(NET_RepDeletes,"Leaving id %llu using timeout remote host %s",static_cast<AZ::u64>(entity.GetNetEntityId()),GetRemoteHostId().GetString().c_str());
}
else
{
AZLOG(NET_RepDeletes,"Deleting entity id %u remote host %s",entity.GetNetEntityId(),GetRemoteHostId().GetString().c_str());
AZLOG(NET_RepDeletes,"Deleting entity id %llu remote host %s",static_cast<AZ::u64>(entity.GetNetEntityId()),GetRemoteHostId().GetString().c_str());
AZLOG(NET_RepDeletes,"Trying to delete entity id %u remote host %s, but it has been removed",entity.GetNetEntityId(),GetRemoteHostId().GetString().c_str());
AZLOG(NET_RepDeletes,"Trying to delete entity id %llu remote host %s, but it has been removed",static_cast<AZ::u64>(entity.GetNetEntityId()),GetRemoteHostId().GetString().c_str());
AZLOG(NET_RepDeletes,"EntityReplicationManager: Received old DeleteProxy message for entity id %u, sequence %d latest sequence %d from remote host %s",
AZLOG(NET_RepDeletes,"EntityReplicationManager: Received old DeleteProxy message for entity id %llu, sequence %d latest sequence %d from remote host %s",
AZLOG(NET_RepUpdate,"EntityReplicationManager: Received old PropertyChangeMessage message for entity id %u, sequence %d latest sequence %d from remote host %s",
AZLOG(NET_RepUpdate,"EntityReplicationManager: Received old PropertyChangeMessage message for entity id %llu, sequence %d latest sequence %d from remote host %s",
AZLOG(NET_RepDeletes,"Handle Migration %u new authority from remote host %s",entityHandle.GetNetEntityId(),GetRemoteHostId().GetString().c_str());
AZLOG(NET_RepDeletes,"Handle Migration %llu new authority from remote host %s",static_cast<AZ::u64>(entityHandle.GetNetEntityId()),GetRemoteHostId().GetString().c_str());
AZLOG(NET_AuthTracker,"AuthTracker: Removing networkEntityId %u from %s",aznumeric_cast<uint32_t>(entityHandle.GetNetEntityId()),previousOwner.GetString().c_str());
AZLOG(NET_AuthTracker,"AuthTracker: Removing networkEntityId %llu from %s",aznumeric_cast<AZ::u64>(entityHandle.GetNetEntityId()),previousOwner.GetString().c_str());
if(autolocalEnt=entityHandle.GetEntity())
{
if(authorityStack.empty())
@ -114,14 +114,14 @@ namespace Multiplayer
}
else
{
AZLOG(NET_AuthTracker,"AuthTracker: Skipping timeout for Autonomous networkEntityId %u",aznumeric_cast<uint32_t>(entityHandle.GetNetEntityId()));
AZLOG(NET_AuthTracker,"AuthTracker: Skipping timeout for Autonomous networkEntityId %llu",aznumeric_cast<AZ::u64>(entityHandle.GetNetEntityId()));
}
}
}
}
else
{
AZLOG(NET_AuthTracker,"AuthTracker: Remove authority called on networkEntityId that was never added %u",aznumeric_cast<uint32_t>(entityHandle.GetNetEntityId()));
AZLOG(NET_AuthTracker,"AuthTracker: Remove authority called on networkEntityId that was never added %llu",aznumeric_cast<AZ::u64>(entityHandle.GetNetEntityId()));
AZ_Assert(false,"AuthTracker: Remove authority called on entity that was never added");
}
}
@ -205,8 +205,8 @@ namespace Multiplayer
{
AZLOG_ERROR
(
"Timed out entity id %u during migration previous owner %s, removing it",