![eloa gameguard error eloa gameguard error](https://i.ytimg.com/vi/iy7XnNaWr3o/maxresdefault.jpg)
env file with a sample connection file provided as. The database connection info has a default value of mongodb://localhost:27017/gameguard but you can configure the connection credentials in a.
![eloa gameguard error eloa gameguard error](https://i.ytimg.com/vi/ekyM36evU2U/maxresdefault.jpg)
The GameGuard server uses the MongoDB to manage players with the mongoose package to manage the schemas and other operations. Since GameGuard is not a linear app and it's hard to go in order with what to document, we'll just go over the general aspect of each part of GameGuard and then link to the documentation for that module that goes in detail about it. The player can be kicked, banned, messaged, or put into rooms. Otherwise, the client is accepted and their player profile is created locally and updated in the database.Įverything is set up now. Now, the GameGuard server waits for a WebSocket connection from a page using the GameGuard client and in specific it waits for the client to send a message that contains the id of the player that connected.īefore the client becomes a player, the GameGuard server checks to see if the id of that client corresponds to a player in the database that is banned and if so their connection gets reject. The GameGuard server instance is created with a http server instance. Now let's talk about the operation of GameGuard: const gg = new GameGuard ( server, ) Operation log ( 'Listening on port 3000' ) ) // Set the GameGuard server to use a latency check interval of 1000ms. 'use strict' const path = require ( 'path' ) const express = require ( 'express' ) const GameGuard = require ( 'gameguard' ) const app = express ( ) // Have the server listen on port 3000. The connection string to use to connect to mongodb.Ī basic example of initializing GameGuard this with my personal favorite http server, fastify, is as follows: The maximum latency, in milliseconds, the player can have before being kicked. The interval at which each player's latency is calculated, in milliseconds.
![eloa gameguard error eloa gameguard error](https://i.ytimg.com/vi/4mI2Y30b6x0/maxresdefault.jpg)
![eloa gameguard error eloa gameguard error](https://i1.wp.com/mundowin.com/wp-content/uploads/2019/06/tools-2.jpg)
The interval at which each player is pinged, in milliseconds. paramĪ reference to the http server instance to bind to. To initialize GameGuard, you have to initialize it with a reference to a http or https server and an optional set of options. Note: The documentation for gameguard-client will not be covered here but you can head over to the gameguard-client documentation for client side usage. Currently only gameguard-client is supported but in the future there will be guides on creating your own client side solution to communicate with the GameGuard server.
#Eloa gameguard error install
To install GameGuard you need the server side package (this one) and then a client-side package. I've gone back and forth about implementing logging but I've found it to be so customizable it would be much easier for the end user to implement using signals but if there's enough requests then logging can be implemented to be a core part of GameGuard. Note About Logging: For now, GameGuard has no logging capability. GameGuard can now be used on it's own but it has been simplified in order to be able to be extended further to suit your needs. All of the previous features still exist but the API has changed to be more simple and streamlined. Note: This is the post 1.0.0 version of GameGuard that has lots of breaking changes from the last version due to major simplification.