Version:

FlexMatch 脚本编程

AWS GameLift 提供 Script Canvas 节点,这些节点可向 Amazon GameLift 发出请求以启动、停止和接受对战请求。

每个操作都有同步和异步版本。异步节点在 AZ JobFunction 中执行其操作,并在将来的某个时间点完成。这些操作通过 AWS HTTPS 请求或 TCP/UDP 数据包通过网络进行通信。每个异步节点都有相应的通知处理程序节点。

StartMatchmaking

要查找一组玩家的对战并创建会话来托管对战,请使用 ‘StartMatchmaking’ 节点。 使用此节点,您可以通过“AWSGameLiftStartMatchmakingRequest”传入属性configuration nameplayersticket id

StartMatchmaking 案例图表

StartMatchmaking sample graph

StartMatchmakingAsync 案例图表

StartMatchmakingAsync sample graph

StopMatchmaking

要取消当前正在处理的对战票证,请使用 ‘StopMatchmaking’ 节点。 使用此节点,您可以通过“AWSGameLiftStopMatchmakingRequest”传入属性“ticket id”。

StopMatchmaking 案例图表

StopMatchmaking sample graph

StopMatchmakingAsync 案例图表

StopMatchmakingAsync sample graph

AcceptMatch

要注册玩家接受或拒绝建议的匹配,请使用 ‘AcceptMatch’ 节点。 使用此节点,您可以通过“AWSGameLiftAcceptMatchRequest”传入属性accept match, player idsticket id

AcceptMatch 案例图表

AcceptMatch sample graph

AcceptMatchAsync 案例图表

AcceptMatchAsync sample graph

StartPolling

请求启动本地进程,以根据给定的票证 ID 和玩家 ID 轮询对战票证。

StartPolling sample graph

StartPolling sample graph

StopPolling

请求停止轮询对战票证的本地进程。

StopPolling sample graph

StopPolling sample graph

Matchmaking notifications

要侦听的对战通知,用于根据对战票证事件执行所需的操作。

OnMatchAcceptance node

OnMatchAcceptance 在找到匹配项并等待接受时触发。使用此通知接受找到的匹配项。

OnMatchAcceptance node

OnMatchComplete node

OnMatchComplete 在匹配完成时触发。

OnMatchComplete node

OnMatchError node

OnMatchError 在处理 match 时触发错误。

OnMatchError node

OnMatchFailure node

OnMatchFailure 在匹配无法完成时触发。

OnMatchFailure node