FlexMatch規則集:綱要 - Amazon GameLift

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

FlexMatch規則集:綱要

FlexMatch 規則集會將標準結構描述用於小型配對和大型配對規則。如需每個區段的詳細描述,請參閱FlexMatch規則集性質定義

小型相符項目的規則集綱要

以下結構描述記錄規則集的所有可能屬性和允許的值,這些規則集用於建立最多 40 位玩家的相符項目。

{ "name": "string", "ruleLanguageVersion": "1.0", "playerAttributes":[{ "name": "string, "type": <"string", "number", "string_list", "string_number_map">, "default": "string" }], "algorithm": { "strategy": "exhaustiveSearch", "batchingPreference": <"random", "sorted">, "sortByAttributes": [ "string" ], "expansionAgeSelection": <"newest", "oldest">, "backfillPriority": <"normal", "low", "high"> }, "teams": [{ "name": "string", "maxPlayers": number, "minPlayers": number, "quantity": integer }], "rules": [{ "type": "distance", "name": "string", "description": "string", "measurements": "string", "referenceValue": number, "maxDistance": number, "minDistance": number, "partyAggregation": <"avg", "min", "max"> },{ "type": "comparison", "name": "string", "description": "string", "measurements": "string", "referenceValue": number, "operation": <"<", "<=", "=", "!=", ">", ">=">, "partyAggregation": <"avg", "min", "max"> },{ "type": "collection", "name": "string", "description": "string", "measurements": "string", "referenceValue": number, "operation": <"intersection", "contains", "reference_intersection_count">, "maxCount": number, "minCount": number, "partyAggregation": <"union", "intersection"> },{ "type": "latency", "name": "string", "description": "string", "maxLatency": number, "maxDistance": number, "distanceReference": number, "partyAggregation": <"avg", "min", "max"> },{ "type": "distanceSort", "name": "string", "description": "string", "sortDirection": <"ascending", "descending">, "sortAttribute": "string", "mapKey": <"minValue", "maxValue">, "partyAggregation": <"avg", "min", "max"> },{ "type": "absoluteSort", "name": "string", "description": "string", "sortDirection": <"ascending", "descending">, "sortAttribute": "string", "mapKey": <"minValue", "maxValue">, "partyAggregation": <"avg", "min", "max"> },{ "type": "compound", "name": "string", "description": "string", "statement": "string" } }], "expansions": [{ "target": "string", "steps": [{ "waitTimeSeconds": number, "value": number }, { "waitTimeSeconds": number, "value": number }] }] }

大型相符項目的規則集綱要

下列結構描述記錄規則集的所有可能屬性和允許的值,這些規則集用來建立超過 40 位玩家的相符項目。如果規則集中所有專案團隊的總maxPlayers值超過 40,則FlexMatch程序會比對使用大型比對準則下使用此規則集的要求。

{ "name": "string", "ruleLanguageVersion": "1.0", "playerAttributes":[{ "name": "string, "type": <"string", "number", "string_list", "string_number_map">, "default": "string" }], "algorithm": { "strategy": "balanced", "batchingPreference": <"largestPopulation", "fastestRegion">, "balancedAttribute": "string", "expansionAgeSelection": <"newest", "oldest">, "backfillPriority": <"normal", "low", "high"> }, "teams": [{ "name": "string", "maxPlayers": number, "minPlayers": number, "quantity": integer }], "rules": [{ "name": "string", "type": "latency", "description": "string", "maxLatency": number, "partyAggregation": <"avg", "min", "max"> }, { "name": "string", "type": "batchDistance", "batchAttribute": "string", "maxDistance": number }], "expansions": [{ "target": "string", "steps": [{ "waitTimeSeconds": number, "value": number }, { "waitTimeSeconds": number, "value": number }] }] }