Skip to content

Commit

Permalink
Merge pull request #458 from aws-lumberyard-dev/LYN-19028_FlexmatchMenu
Browse files Browse the repository at this point in the history
FlexMatch Connection Menu
  • Loading branch information
AMZN-Gene authored Aug 16, 2023
2 parents e76cfb4 + 3eb8e80 commit 149bf33
Show file tree
Hide file tree
Showing 10 changed files with 2,092 additions and 114 deletions.
229 changes: 120 additions & 109 deletions AssetBundling/SeedLists/GameSeedList.seed
Original file line number Diff line number Diff line change
@@ -1,109 +1,120 @@
<ObjectStream version="3">
<Class name="AZStd::vector&lt;SeedInfo, allocator&gt;" type="{82FC5264-88D0-57CD-9307-FC52E4DAD550}">
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{67155E6B-0365-5033-8A95-C193C1334F5B}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="3443916038" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="levels/newstarbase/newstarbase.spawnable" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{67155E6B-0365-5033-8A95-C193C1334F5B}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="2444860857" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="levels/newstarbase/newstarbase.network.spawnable" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{A216609B-EFB4-54CD-B3C0-4E4907FDA1C9}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="sounds/wwise/init.bnk" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{03A2BEFE-AF6D-5A01-BADA-836DA080FB00}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="sounds/wwise/multiplayersample_soundbank.bnk" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{C17AC204-7D16-52D7-8706-3E737959D3EA}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="libs/gameaudio/wwise/multiplayersample_controls.xml" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{40512DA0-4ED3-55AB-82EC-24EB3FED7296}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="libs/gameaudio/wwise/default_controls.xml" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{4E6C7558-D367-5FD5-95F8-36FAD3DD55BF}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="533909303" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="levels/startmenu/startmenu.spawnable" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{E70688BE-6CC3-58AC-9F0A-BEBD83EA72AA}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="ui/textures/lyshineexamples/panelbkgd.sprite" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{D487D864-03CC-5EA1-BF03-1C922EAA41A8}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/scrollbar_vert_track.sprite" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{156D982B-B793-5720-BC57-3B07D40A6E39}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="ui/textures/lyshineexamples/panelbkgd.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{16669CD6-F9D1-5A06-A760-24575C6484F8}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/scrollbar_vert_track.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{AB5B0F22-07A0-5D7D-A9AC-B3225C10552B}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="uicanvases/splashscreen/splashscreen.jpg.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{775F7670-09BB-5568-8F8C-4122F68EEE30}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="595876996" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="mpsgamelift/prefabs/gameliftconnectjsonmenu.spawnable" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
</ObjectStream>

{
"Type": "JsonSerialization",
"Version": 1,
"ClassName": "AZStd::vector<SeedInfo, allocator>",
"ClassData": [
{
"assetId": {
"guid": "{67155E6B-0365-5033-8A95-C193C1334F5B}",
"subId": 3443916038
},
"platformFlags": 255,
"pathHint": "levels/newstarbase/newstarbase.spawnable"
},
{
"assetId": {
"guid": "{67155E6B-0365-5033-8A95-C193C1334F5B}",
"subId": 2444860857
},
"platformFlags": 255,
"pathHint": "levels/newstarbase/newstarbase.network.spawnable"
},
{
"assetId": {
"guid": "{A216609B-EFB4-54CD-B3C0-4E4907FDA1C9}"
},
"platformFlags": 255,
"pathHint": "sounds/wwise/init.bnk"
},
{
"assetId": {
"guid": "{03A2BEFE-AF6D-5A01-BADA-836DA080FB00}"
},
"platformFlags": 255,
"pathHint": "sounds/wwise/multiplayersample_soundbank.bnk"
},
{
"assetId": {
"guid": "{C17AC204-7D16-52D7-8706-3E737959D3EA}"
},
"platformFlags": 255,
"pathHint": "libs/gameaudio/wwise/multiplayersample_controls.xml"
},
{
"assetId": {
"guid": "{40512DA0-4ED3-55AB-82EC-24EB3FED7296}"
},
"platformFlags": 255,
"pathHint": "libs/gameaudio/wwise/default_controls.xml"
},
{
"assetId": {
"guid": "{4E6C7558-D367-5FD5-95F8-36FAD3DD55BF}",
"subId": 533909303
},
"platformFlags": 255,
"pathHint": "levels/startmenu/startmenu.spawnable"
},
{
"assetId": {
"guid": "{E70688BE-6CC3-58AC-9F0A-BEBD83EA72AA}"
},
"platformFlags": 255,
"pathHint": "ui/textures/lyshineexamples/panelbkgd.sprite"
},
{
"assetId": {
"guid": "{D487D864-03CC-5EA1-BF03-1C922EAA41A8}"
},
"platformFlags": 255,
"pathHint": "ui/textures/prefab/scrollbar_vert_track.sprite"
},
{
"assetId": {
"guid": "{156D982B-B793-5720-BC57-3B07D40A6E39}",
"subId": 1000
},
"platformFlags": 255,
"pathHint": "ui/textures/lyshineexamples/panelbkgd.tif.streamingimage"
},
{
"assetId": {
"guid": "{16669CD6-F9D1-5A06-A760-24575C6484F8}",
"subId": 1000
},
"platformFlags": 255,
"pathHint": "ui/textures/prefab/scrollbar_vert_track.tif.streamingimage"
},
{
"assetId": {
"guid": "{AB5B0F22-07A0-5D7D-A9AC-B3225C10552B}",
"subId": 1000
},
"platformFlags": 255,
"pathHint": "uicanvases/splashscreen/splashscreen.jpg.streamingimage"
},
{
"assetId": {
"guid": "{775F7670-09BB-5568-8F8C-4122F68EEE30}",
"subId": 595876996
},
"platformFlags": 255,
"pathHint": "mpsgamelift/prefabs/gameliftconnectjsonmenu.spawnable"
},
{
"assetId": {
"guid": "{DD84481F-C18D-5EDF-A8EC-3EB87A97CEA6}"
},
"platformFlags": 1,
"pathHint": "config/default_aws_resource_mappings.json"
},
{
"assetId": {
"guid": "{424E3241-9748-537B-8742-B3A8D986E61D}",
"subId": 1157861216
},
"platformFlags": 1,
"pathHint": "mpsgamelift/prefabs/gameliftflexmatchconnect.spawnable"
}
]
}
24 changes: 24 additions & 0 deletions MPSGameLift/Code/Include/MPSGameLift/IMatchmaking.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@

namespace MPSGameLift
{
enum class MatchmakingFailReason
{
FailedToReceiveTicket,
FailedToReceiveStatusUpdate,
TimedOut
};

using MatchmakingTicketReceivedEvent = AZ::Event<AZStd::string>;
using MatchmakingSuccessEvent = AZ::Event<>;
using MatchmakingFailedEvent = AZ::Event<MatchmakingFailReason>;

// Supports matchmaking request calls to a serverless backend
class IMatchmaking
{
Expand All @@ -26,5 +37,18 @@ namespace MPSGameLift
// Gets the current matchmaking ticket id if any
// @return A matchmaking ticket id, or empty string if no ticket has been received.
virtual AZStd::string GetTicketId() const = 0;

// Adds a MatchmakingTicketReceivedEvent Handler which is invoked when FlexMatch gives the player back a matchmaking ticket.
// This ticket id can be used by developers for debugging should matchmaking fail.
// @param handler The MatchmakingTicketReceivedEvent Handler to add
virtual void AddMatchmakingTicketReceivedEventHandler(MatchmakingTicketReceivedEvent::Handler& handler) = 0;

// Adds a MatchmakingSuccessEvent Handler which is invoked when FlexMatch has discovered a valid game.
// @param handler The MatchmakingSuccessEvent Handler to add
virtual void AddMatchmakingSuccessEventHandler(MatchmakingSuccessEvent::Handler& handler) = 0;

// Adds a MatchmakingFailedEvent Handler which is invoked when no match is found.
// @param handler The MatchmakingFailedEvent Handler to add
virtual void AddMatchmakingFailedEventHandler(MatchmakingFailedEvent::Handler& handler) = 0;
};
} // namespace MPSGameLift
Loading

0 comments on commit 149bf33

Please sign in to comment.