How to implement unity client to get notification from game session placement?

0

I'm making multiplayer game using Unity Mirror and GameLift. I have uploaded my build, create gamefleet, create queue and want to create game session using StartGameSessionPlacementAsync method. In the documentation, I have to set up event notification for game session placement. ( link: https://docs.amazonaws.cn/en_us/gamelift/latest/developerguide/queue-notification.html ) so following this guide, I have set up an SNS topic. But then? How my unity client subscribe to that topic and get notification when game session placement state is changed to FULFILLED ? I can't find any tutorial about that. Please help me! Thank you very much!

질문됨 3년 전322회 조회
8개 답변
0

Hi @REDACTEDUSER

This should be exactly what you need: https://github.com/aws-samples/aws-gamelift-and-serverless-backend-sample (It uses FlexMatch events as an example but it should apply similarly to Queue events)

Let me know if you have questions when trying to understand the samples.

Thanks, James

답변함 3년 전
0

Thank you, I'll check this project. I'll ask you when I have a problem with running or understanding this project :D

답변함 3년 전
0

I've seen the sample project. The method use in sample project is after send match making request, client using a loop to check status of match making until it get success. It's similar with Queue that I can use DescribeGameSessionPlacementAsync to get status of game session placement. This is not what I'm looking for because in documentation: REMOVEDUPLOAD

So I'm still looking for how to get status of game session placement with SNS.

답변함 3년 전
0

Do you have anything subscribed to the topic currently? Perhaps a Lambda function that triggers a web socket API that the client is listening on or writes info to a DynamoDB table that a client is reading from.

Here's a link of what can subscribe to a topic but I personally think Lambda would be the easiest.

답변함 3년 전
0

So does it mean I need a backend? Because currently, my game doesn't have backend service. It only use Unity + mirror for connection, and Firebase as backend for Login, Save user data. Is there anyway I can use SNS with Firebase?

답변함 3년 전
0

I haven't tried it myself, but it seems that it is possible to create a Lambda function that writes to FireBase according to this.

답변함 3년 전
0

Hi @REDACTEDUSER

Please checkout https://github.com/aws/amazon-gamelift-plugin-unity/releases. This Unity plugin contains a example backend with GameLift Queue + SNS. (See Multi-Region Fleets with Queue and Custom Matchmaker in doc)

This would help you deploy a working backend with a few simple clicks.

I wasn't able to share this with you in my last answer since it wasn't launched, but now I can! Hopefully this helps!

Thanks, James

답변함 3년 전
0

Thank you very much, I'll check it now :D

답변함 3년 전

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

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

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

관련 콘텐츠