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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@inglorious/server

v11.0.2

Published

A real-time, lightweight server designed to enable multiplayer experiences for games built with the Inglorious Engine.

Downloads

536

Readme

Inglorious Server

A real-time, lightweight server designed to enable multiplayer experiences for games built with the Inglorious Engine. This server is built on Node.js and uses WebSockets to handle real-time communication, ensuring low-latency updates for all connected clients.

Features

  • Real-Time Communication: Uses WebSockets to provide bidirectional, low-latency communication between the server and clients.
  • Server-Authoritative Game State: Manages a central game state using the @inglorious/store and acts as the single source of truth for all clients.
  • Scalable Architecture: The server's logic is modular and split into dedicated files for handling game loading, the main game loop, and WebSocket events.
  • Dynamic Game Loading: Supports loading game data from a specified JavaScript module, allowing you to easily run different game worlds without changing the server code.
  • Production-Ready Logging: Uses pino for fast, structured logging, making it easy to monitor and debug in a production environment.

Getting Started

Prerequisites

  • Node.js (version 22 or higher)
  • pnpm (used for package management)

Installation

  1. Clone the Inglorious Engine repository:
git clone https://github.com/IngloriousCoderz/inglorious-engine.git
  1. Navigate to the @inglorious/server directory:
cd packages/server
  1. Install the dependencies:
pnpm install

Usage

The server can be started using the start or dev scripts. You can optionally provide a path to a game module to load a specific game state.

Running in Development Mode

To run the server with automatic restarts on file changes, use the dev script.

pnpm dev

Running in Production Mode

To run the server in a production environment, use the start script.

pnpm start

Loading a Specific Game

By default, the server will attempt to load a ./default-game.js file. To load a different game, provide the file path as a command-line argument.

pnpm start ./path/to/your-game.js

Project Structure

The server's code is split into several files to maintain a clear separation of concerns.

  • src/index.js: The main entry point for the server. It orchestrates the setup of the HTTP and WebSocket servers and initializes the game store and its core handlers.
  • src/game-loader.js: Handles the dynamic loading of the initial game state from a JavaScript module. It also includes a fallback state if the game file is not found.
  • src/game-loop.js: Contains the core setInterval loop that drives the game logic by calling the store.update() function at a fixed tick rate (60 updates per second).
  • src/websocket-handler.js: Manages all WebSocket events, including new connections, incoming messages, and disconnections. It dispatches client events to the store and broadcasts changes to all clients.

Dependencies

  • @inglorious/store: The state management solution for the game engine.
  • ws: A simple and fast WebSocket library.
  • pino: A highly performant logger for Node.js.

License

MIT License - Free and open source

Created by Matteo Antony Mistretta

You're free to use, modify, and distribute this software. See LICENSE for details.