A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-testing.html below:

Set up local testing with Amazon GameLift Servers Anywhere

Set up local testing with Amazon GameLift Servers Anywhere

Use an Amazon GameLift Servers Anywhere fleet and your own hardware to iteratively build and test your game components in a simulated hosted environment. Set up an Anywhere fleet and register a local device to establish a connection to the Amazon GameLift Servers service. Install your game server build onto the device, start a game server process, and test game functionality as needed. You can update your game server build as often as needed to test each new build iteration.

With an Anywhere fleet, you can test using the AWS CLI or with test scripts. If you've integrated a game client with Amazon GameLift Servers, you can run the client on the same local device or on a different device.

Testing locally with an Anywhere fleet is particularly useful for testing your game server integration with Amazon GameLift Servers. You have full visibility into all hosting activity on the local machine, as well as events and logging data.

Set up a local Anywhere fleet

Follow these steps to create an Anywhere fleet for your local workstation. For detailed instructions using either the AWS CLI or the AWS Management Console for Amazon GameLift Servers, see Create an Amazon GameLift Servers Anywhere fleet.

To create the Anywhere fleet
  1. Create a custom location for your local workstation. (AWS CLI or console). A custom location is simply a label for the compute resource you plan to include in your Anywhere fleet. Custom location names must start with custom-. For example: custom-my_laptop. See Create a custom location.

  2. Create an Anywhere fleet (AWS CLI or console). In this step, create the fleet resource with the custom location for your local workstation. See Create an Anywhere fleet.

    Make a note of the new fleet's ID or ARN value. You'll need this value for the next step.

  3. Register your local workstation as a fleet compute (AWS CLI only). An Anywhere fleet must have at least one compute resource to host your game servers. See Add a compute to the fleet. To add a compute to the fleet, you need the following information:

    Make a note of the GameLiftServiceSdkEndpoint return value. You'll need this value when you update your game server to run on an Anywhere fleet.

Update and install your game server

This task assumes that you've already integrated a game server build with Amazon GameLift Servers server SDK 5.x. The integration process involves adding code to your game server so that it can interact with the Amazon GameLift Servers service to start and manage game sessions.

For an Anywhere fleet, you need to manually configure certain game server settings. On an Amazon GameLift Servers managed fleet, these settings are configured automatically.

To prepare your game server for an Anywhere fleet
  1. Get an authentication token. Your game server must include an authentication token with every communication with the Amazon GameLift Servers service. Amazon GameLift Servers auth tokens are short-lived and must be regularly refreshed.

    As a best practice, create a script to complete the following tasks:

    Install the script with your game server on the compute. Set the script to run before starting the first game server process. While game server processes are active, run the script regularly to maintain a valid auth token. All game server processes on the compute can use the same auth token.

  2. Update your Amazon GameLift Servers game server code. When you integrated your game server code with the server SDK for Amazon GameLift Servers, you added a call to the action InitSdk(). When the game server runs on an Anywhere fleet, this call requires additional server parameters. For more information, see Initialize the server process and the Server SDK 5.x for Amazon GameLift Servers for your development language. The server parameters are:

    The server parameter values that each game server process uses needs to be specific to the Anywhere fleet compute where the process is running. For details on how to get the appropriate values for a compute, see Add a compute to the fleet. As a best practice, set webSocketUrl, hostId, fleetId, and authToken as environment variables on the local compute. All server processes that run on the compute will use these values.

  3. Install the game server build on the local compute. Include all dependencies needed to run the game server.

  4. Start one or more game server processes running on the local compute. When the game server process calls the server SDK action ProcessReady(), the process is ready to host a game session.

Test game session activity

Test your game server integration by working with game sessions. If you don't have a game client integrated with Amazon GameLift Servers functionality, you can use the AWS CLI to start game sessions. Try the following scenarios:

Iterate on your game server

You can use the same Anywhere fleet and compute to test other versions of your game server build.

  1. Clean up your existing GameSession. If the game server process crashes or won't call ProcessEnding(), Amazon GameLift Servers cleans up the GameSession after the game server stops sending health checks.

  2. Generate a new game server build. Make changes to your game server and package an revised build.

  3. Update the game server build on your local compute. Your previous Anywhere fleet is still active and your laptop is still registered as a compute resource in the fleet.

  4. Get an updated authorization token. Call the get-compute-auth-token CLI command and store the token on the local compute.

  5. Start one or more game server processes running on the local compute. When the game server process calls ProcessReady(), it's ready to be used for testing.

Transition your game to Amazon GameLift Servers managed fleets

After you've completed development testing and you're ready to prepare for launch, this is a good time to switch over to Amazon GameLift Servers managed fleets. Use managed fleets to fine-tune and test your game hosting resources. Implement your game session placement solution (queues and matchmakers), select optimum hosting hardware (including Spot fleets) and locations, and choose a strategy for scaling capacity. You might also want to start using AWS CloudFormation to more efficiently manage the life cycles of all your game hosting resources, including fleets, queues, and matchmakers.

You need to make a few minor modifications to transition from a local Anywhere test fleet to an Amazon GameLift Servers managed fleet. You can reuse the same queues and matchmakers. Do the following tasks:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4