GithubHelp home page GithubHelp logo

aws-samples / aws-gamelift-sample Goto Github PK

View Code? Open in Web Editor NEW
236.0 36.0 64.0 39.78 MB

A simple full-stack game sample using GameLift and AWS services.

License: Apache License 2.0

C++ 67.49% C 2.16% Batchfile 0.01% Python 1.88% HTML 6.43% CSS 14.51% JavaScript 7.51%
gamelift aws game-development multiplayer-game matchmaking

aws-gamelift-sample's Issues

Key Error on ConnectionInfo

I was trying to put up the Gomoku Demo. While the set up is completed, when testing the 2 player game play .... my game-match-status lambda is returning following error

[ERROR] KeyError: 'ConnectionInfo'
Traceback (most recent call last):
File "/var/task/index.py", line 25, in lambda_handler
connection_info = json.loads(match_response['Item']['ConnectionInfo'])

ConnectionInfo Key does not exist in DDB, is it expected to be there ...am I missing any step?

NetworkProtocol Receive method may not buffer all bytes

While testing on the Oculus Quest device it was discovered that the Receive method was not buffering all bytes in some cases. The addition of the following code fixes the issue.

int bytesRead = 0;
while (bytesRead < msgSize)
{
      bytesRead += stream.Read(readBuffer, bytesRead, readBuffer.Length - bytesRead);
}
public static string[] Receive(TcpClient client)
{
        NetworkStream stream = client.GetStream();
        var messages = new List<string>();
        while (stream.DataAvailable)
        {
            byte[] bufferLength = new byte[4];
            stream.Read(bufferLength, 0, bufferLength.Length);
            int msgSize = IPAddress.NetworkToHostOrder(BitConverter.ToInt32(bufferLength, 0));
            byte[] readBuffer = new Byte[msgSize];
            int bytesRead = 0;
            while (bytesRead < msgSize)
            {
                bytesRead += stream.Read(readBuffer, bytesRead, readBuffer.Length - bytesRead);
            }
            string msgStr = System.Text.Encoding.ASCII.GetString(readBuffer, 0, readBuffer.Length);
            messages.Add(msgStr);
        }
        return messages.ToArray();
}

Make Cloud9 as a standard environment for the workshop

There are many unclear description that request the user to do a work depending on the environment. (like file download, or AWS CLI installation, python installation, etc.).

It can make the workshop to be disturbed by the diversity of the user environment.

Like other workshop, let's make Cloud9 as a standard workshop environment for simplicity and clearance.

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.