Exclude sessions with PlayerAcceptionPolicy set to Deny from search_game_sessions method

1

I have a game that can accomodate as much as 50 players. However, the loby window is for 2 minutes and match starts with whoever joined in the match and there are possibilities that the total players in game when match starts is less than 50. To stop further player acceptation, I am setting playeracceptionpolicy to Deny. However, When I use game_lift.search_game_sessions(FleetId = GAMELIFT_FLEET_ID, FilterExpression = "hasAvailablePlayerSessions=true") to search for available sessions, the result still returns those sessions with playeracceptpolicy set to deny. Hoe can I exclude those sessions with playerpolicy set to Deny from the result?

1개 답변
0

Hello, When working with the search_game_sessions api you should be careful not to call it to track game session status. Instead, you must configure configure an Amazon Simple Notification Service (SNS) topic to receive notifications from FlexMatch or queues. see more here

Also please consider that returned values for playerSessionCount and hasAvailablePlayerSessions change quickly as players join sessions and others drop out. Results should be considered a snapshot in time. Be sure to refresh search results often, and handle sessions that fill up before a player can join.

Remember that the sessions that are created have a timeout of acceptance, that means if the session is still within those 60 seconds you will probably will get some information missmach.

AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠