Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@socialgorithm/game-server
Advanced tools
Creates a socket server (default port 5433) that serves games. To use this server, you provide functions that will be called on game or player actions, and call functions to communicate with players or to broadcast game state to spectators.
Install the dependency:
npm install @socialgorithm/game-server
Start the game server and supply a new game function:
new GameServer({ name: "My Game Name" }, newGameFunction, { port: 5433 });
The new game function must accept game start parameters and can take an output channel on which to communicate with players/spectators. It must return an implementation of the Game
interface (i.e. must implement callback to listen for player communication).
newGameFunction(gameStartMessage: GameStartMessage, outputChannel: GameOutputChannel): Game {
debug("Started new game");
return new MyGame(gameStartMessage.players, outputChannel);
}
In your game, you can then use GameOutputChannel
to communicate with players or spectators (e.g. the Tournament Server).
See tic-tac-toe for an example of integration.
The rest of this guide is for contributors.
To publish to NPM, make sure you've incremented the version number (e.g. npm version patch
) and run:
npm publish
FAQs
JS Game Server library
We found that @socialgorithm/game-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.