npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kontest/gamelift

v0.2.2

Published

NodeJS bindings for AWS Gamelift server SDK

Downloads

42

Readme

gamelift

Build Status codecov Known Vulnerabilities

AWS GameLift SDK implemented in TypeScript for Node.js.

API Documentation

Installation

npm install @kontest/gamelift

Or if you prefer yarn:

yarn add @kontest/gamelift

Getting Started

A barebones example of how to use this library is coming soon.

Also coming soon is an example of how to create GameLift builds that uses this library and Node.js.

Use case

This library enables a Node.js process to act as a GameLift compatible backend game server. Node.js is not a popular choice to implement realtime multiplayer servers because of the performance requirements of those games. However, it's still a valid use case for many multiplayer games and this library allows developers whom are more familiar with Node.js and web development the ability to use a managed service like GameLift without having to develop their backend server in C++ or Unity/Unreal Engine.

Development

This library provides the interface for using gamelift-pb via socket.io in communication with the GameLift service.

Alternatives

There is a project that accomplishes the same goal that this one does. It is written in TypeScript and shares many similarities.

However, it relies on a handwritten .proto file which did not contain the level of control and documentation that I preferred.

It also is a closer emulation of the original SDK from C++/C# whereas with this library I took liberties in making the code more like a native TypeScript/JavaScript project.

This project is also heavily documented and doesn't rely solely on AWS's docs.

Contributing

The following guide describes how to get setup for testing and working on the gamelift library.

Requirements

In order to successfully fix bugs or add new features to this library you will need to be able to run the test suite. The integration tests rely on GameLiftLocal and require that the JAR file be located at a certain filepath relative to the project's directory.

Currently the GameLift SDK version is 2020-11-11 and the integration tests run the JAR file at the following path:

GameLift_11_11_2020/GameLiftLocal-1.0.5/GameLiftLocal.jar

You can get this file easily with wget and the following commands:

$ wget https://gamelift-release.s3-us-west-2.amazonaws.com/GameLift_11_11_2020.zip
$ unzip GameLift_11_11_2020.zip

The rest of the development dependencies can be conveniently installed like any other NodeJS project:

$ npm install

Or with yarn

$ yarn install

Testing

This project utilizes Mocha.js as its test runner. Simply run npm test.

The integration tests (in tests/test-index.ts) will start a GameLiftLocal subprocess which binds to several ports. It takes a minute or two for these ports to become available again so running the integration tests in quick succession will usually result in the second invocation timing out during the integration test suite's before hook. This Mocha.js hook starts up the GameLiftLocal process using Java and attempts to attach to its ports and will retry when the process exits with EADDRINUSE errors.

Linting

This project utilizes eslint for code quality. The script to run to lint your changes is npm run lint.

Formatting

prettier is used for formatting TypeScript. npm run prettier will automatically format the source code.

Generating documentation

To generate the user-visible documentation run npm run docs. The generated docs are stripped down and only include documentation for the public API.

To generate more developer-friendly documenation you can run npm run docs:internal. The previously mentioned stripped internal members are included in the output.