1.0.0 • Published 5 years ago

game-server-stream v1.0.0

Weekly downloads
3
License
ISC
Repository
-
Last release
5 years ago

Game-Server-Query

Tool for sending -> receiving -> extacting answer from multiplayer game server using stream

Introduction

This module is meant to help with help with multi-packet server response design and much more than that xD

Say you have a multiplayer game server with detailed information from which you need to get using game-server-stream. All you need to do is to know the address of the server and the protocol by which it works (for more information see Usage). Also you can create line-delimited JSON readable stream, example can be found at examples folder.

Supported games

GamenamePrototypeSupported
Half-lifesourceyep
Half-life 2sourceyep
Couter-Strike 1.6sourceyep
Couter-Strike Sourcesourceyep
Couter-Strike Global Offensivesourceyep
Team Fortress 2sourceyep
Lead 4 Deadsourceyep
Lead 4 Dead 2sourceyep
Rustsourceyep
Garry's modsourceyep
ARK: Survival Evolvedsourceyep
San Andres Multiplayersampyep
San Andres Criminal Russia Multiplayersampyep
Minecraftminecraftnope :(

To Install

$ npm install --save game-server-stream

Usage

const GameServerStream = require("game-server-stream");
const gstream = new GameServerStream(); // Initialization

/**
 * result -> buffer
 * result.toString() -> JSON
 */
gstream.on("data", result => {
    const { error, info, players, rules } = JSON.parse(result.toString());
    // ...do smth with this xD
});

// using standart .write method
gstream.write({ address: "127.0.0.1", port: 7777, game: "samp" });

License

ISC

Thank's, have fun :)