Giter Club home page Giter Club logo

amazon-gamelift-ultrafrogroyale-large-match-sample's Introduction

amazon-gamelift-largematch-sample-ultrafrogroyale

A small game built with Unity to demonstrate how to use the new Amazon GameLift large match features.

Requirements

Contents

├── AWS                     # Lambda functions, IAM policies, rulesets, etc.
└── UltraFrogRoyale         # The root of the Unity project
    ├── Assets              # Editable assets, source files
    │   ├── Scenes          # Unity scene definition files
    │   ├── Prefabs         # Player prefab for networking
    │   └── Textures        # Images used by the game
    ├── Packages            # Unity packages folder
    └── ProjectSettings     # Unity project folder

Building and using the sample

Step 1: Build the Unity project

  1. Open the project in Unity
  2. Build and add the Amazon GameLift Server SDK to the project following the instructions here (specifically for .Net 4.5): https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-engines-unity-using.html
  3. Add the AWS Mobile SDK for Unity to the project. https://docs.aws.amazon.com/mobile/sdkforunity/developerguide/what-is-unity-plugin.html
  4. Create a client and server build from Unity. A server build can be created by selecting "Server Build" from the Build Settings dialog.

Step 2: Upload server build to GameLift

  1. Make sure you have the latest AWS command line installed.
  2. Upload the server build to GameLift. For example:
aws gamelift upload-build --operating-system WINDOWS_2012 --build-root "C:\amazon-gamelift-largematch-sample-ultrafrogroyale\UltraFrogRoyale\ServerBuild" --name "Demo Build" --build-version "build 1" --region us-east-1

Step 3: Pepare GameLift

  1. Create a new fleet.
    • Select the build uploaded in step 2.
    • c4.large works well and is in the free tier
    • Fleet type: On-Demand
    • Binary type: Build
    • Set the launch path to UltraFrogRoyale.exe with 1 concurrent process
    • Add port range 7000-8000, protocol UDP, IP address range 0.0.0.0/0
    • Add port range 7000-8000, protocol TCP, IP address range 0.0.0.0/0
  2. Create a queue, adding the fleet just created. Don't set up autoscaling for the purpose of this demo.
  3. Create matchmaking ruleset using the file AWS/UltraFrogRoyaleFreeForAll-debug_MatchmakingRuleSet.json
  4. Create matchmaking configuration using the ruleset and queues created earlier. Make sure "acceptance required" is set to "no".

Step 4: Create client service

Refer to the instructions found in step 2 of the article https://aws.amazon.com/blogs/gametech/creating-servers-for-multiplayer-mobile-games-with-amazon-gamelift/ with the following differences: * Call the Lambda ConnectUltraFrogRoyaleClient * Use Node.js 8, the default is 10, but it doesn't support UUID. * Set the Lambda IAM role using the rules found in AWS/ConnectUltraFrogRoyaleClient_LambdaIAMRole.json (this differs from step 15-17, you can skip the action editor and just paste in the json) * Use the Lambda source code found in AWS/ConnectUltraFrogRoyaleClient_Lambda.js

Step 5: Run the game

At this point, you'll be able to run the game client and hit the "Start A Match" button. Note that the way the matchmaking rules are configured, you'll need to connect at least 3 clients before you get a match. You can run these clients on the same machine.

For more information or questions

License Summary

This sample code is made available under the Apache-2.0 license. See the LICENSE file.

amazon-gamelift-ultrafrogroyale-large-match-sample's People

Contributors

amazongametech avatar jamesiri avatar squidbot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.