Create client in Unity

0

Hello, I am trying to integrate GameLift into my Unity game, and I have gotten the server to start through GameLift, but can't seem to find the methods to call in Unity to connect from a client. I have "using Aws.GameLift.Server;", which gives me access to all the methods for setting up a server, but there doesn't seem to be a namespace for the client side methods. Thanks for any help!

質問済み 7年前299ビュー
18回答
0
承認された回答

Hi @REDACTEDUSER

You are right, the GameLift Server SDK does not have client side methods. However, you can still include them by building the AWS .NET SDK [1]. Build the Net35 project and move the DLLs to your Plugins folder in Unity. This is very similar to how you imported the server DLLs [2]. The client DLLs you are interested in are AWSSDK.GameLift.dll, AWSSDK.Core.dll, AWSSDK.CognitoIdentity.dll, and AWSSDK.SecurityToken.dll.

Hope that helps, let us know if you have more questions! We will definitely look into ways to make this process more user friendly.

[1] https://aws.amazon.com/sdk-for-net/ [2] http://docs.aws.amazon.com/gamelift/latest/developerguide/integration-engines-unity-using.html

回答済み 7年前
0

It seems that although there is Unity support in the GameLift Server SDK, the AWS .NET SDK, as indicated at here, does not yet include GameLift in its list of supported modules.

Not sure if this is an oversight at the moment given this is all very newly announced. I suspect we will see support for GameLift get included in the Unity SDK shortly.

回答済み 7年前
0

Hi.

My company is looking for a network solution for a Unity game.

We looked for the GameLift service and it seem interesting, but we're not sure to correctly understand what the service can provide us.

We tried the sample app and followed the "get started" section but without being able to go further.

The documentation indicated that the cpp-aws-sdk must be used for unity client integration, but it appears that the Unity-Net-sdk must be used and the gameLift service is missing in this sdk.

We understand that the GameLift service is for create gameSessions and scale game servers, but what about the client-server communication? Can we use the Unity multiplayer functionalities? Can we use GameLift for all platforms in unity (iOS, Android, WebGL).

Thanks for clarifications.

回答済み 7年前
0

I think at this point you will have to manage the GameLift sessions outside of the Unity client attempting to connect to them.

A solution might be to use the the .NET Core SDK through an AWS Lambda service that the client can communicate with either directly or through an AWS API Gateway. The Lambda service, with the GameLift api available to it, can then initialize and manage game sessions and pass this information back to the Unity client.

I think ultimately this is how you would may want to structure your network backend, as you might not want to give the client direct access to the GameLift resources. It is a bit cumbersome for testing purposes though.

I'm in the process of trying to put something like this together for my own understanding and will share it here if I make any decent head way.

回答済み 7年前
0

Thanks for the reply. Hopefully they add it to the Unity SDK soon, would really like to switch over to GameLift from our current hosting solution.

回答済み 7年前
0

Could you expand a bit more on why structuring it this way may be better than integrating GameLift directly into the Unity client?

回答済み 7年前
0

@REDACTEDUSER

回答済み 7年前
0

Sorry for the late reply.

I think depending on the auxiliary services around your game you may want to restrict session creation and initialization to control of an authoritative server.

This would let you modify game initialization behaviour without issuing updates to the client.

Your service would also be a little more secure against potential attacks that might abuse open access to your GameLift resources.

回答済み 7年前
0

Thanks Andrew, I really appreciate it!

回答済み 7年前
0

I think AWSSDK.GameLift.dll, AWSSDK.Core.dll is enough for client side.

回答済み 7年前
0

Hi @REDACTEDUSER

I have read a lot of posts saying how using another service on top of the GameLift service would make it more secure, but I just don't see how.

Since you can give IAM users access only to certain actions, that means that a malicious user could only spam the CreateGameSession or StartMatchmaking calls, which is bad, sure. But what's stopping that user from spamming your intermediate service with those same requests ?

How could the intermediate service can be made more "DDOS-proof" ?

What am I missing ?

回答済み 6年前
0

Bump. This never got any clarification and it still isn't clear what the intended approach is when it comes to Unity and Gamelift Client.

回答済み 6年前
0

Hey there - apologies for the delay getting back to you. We do not recommend game clients connect directly to GameLift. Brendon above has a lot of the main points covered - lack of control over how often game clients call CreateGameSession or StartMatchmaking means your game can "fill up" quickly if even one client starts to misbehave. Instead our recommended approach is to proxy client-side requests through something that can authenticate your player connections - AWS Lambda is a good choice here coupled with Cognito.

Here's a high-level diagram from our documentation that shows our best-practice deployment for GameLift servers in relation to your game client:

https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-architecture.html

回答済み 6年前
0

Hi @REDACTEDUSER

回答済み 5年前
0

Hi @hoover_song , I have the same problem here. I am trying to integrate client DLL into a Unity3d project, and I put prebuilt AWSSDK.Core.dll(3.3.29.12 .net35) into the Assets/Plugin directory. However, I failed to create AmazonGameLiftClient. It seems the reason is that Unity3d project is lack of app.config.

I have asked a question about the error but get no answer.

Had you find a way to integrate GameLift client into Unity3d, or you used the separate game service approach?

Thank you very much.

回答済み 5年前
0

Hi! Sorry to bump this after this time... But Here's the only place for this topic. When you say(And the diagram) "Client Service", I don't know what you want us to do. I can explain: In the API, only a client can request to create a session. You want us to make a "Fake client" (That is the service) to request this type of things and connects the "Real" Clients with the info from the service, without be a GameLift Client?

Thanks in advance

回答済み 3年前
0

@REDACTEDUSER

  1. Your clients request actions in AWS services directly - Means your clients have to know about and have permissions to call and take action on AWS resources directly. This could work for your game but if clients are compromised, have bugs or you need to make changes to your backend you have fewer options to control. Basically it would be fine for development where your client base is limited.

  2. You clients request actions via a proxy service - You know have a trusted place to make requests, its easier to make changes to the backend and it gives you a place to build game service logic to support FlexMatch etc. However this is more complex and something you could build later esp as your game needs to expand its testing base or is getting ready for release.

@REDACTEDUSER

回答済み 3年前
0

Hello! The doubt is: I can make a "Fake client" (Instance of GameLiftClient) and send requests from a trusted place then send the "real clients" to connect to the session created from the "Fake Client"?

回答済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ