# lance-gg

> A Node.js based real-time multiplayer game server

Latest version **5.0.2** (published 2024-05-11) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install lance-gg
pnpm add lance-gg
yarn add lance-gg
bun add lance-gg
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.2 |
| Published | 2024-05-11 |
| First published | 2017-03-15 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 15 |
| Unpacked size | 2.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1716 |
| Author | Opher Vishnia |
| Maintainers | namel |
| Keywords | pixijs, pixi, socket, canvas, WebGL, HTML5, AFrame, physics, engine, game, realtime, multiplayer |

## Links

- npm: https://www.npmjs.com/package/lance-gg
- Repository: https://github.com/lance-gg/lance
- Homepage: https://github.com/lance-gg/lance#readme
- Issues: https://github.com/lance-gg/lance/issues
- npm.io page: https://npm.io/package/lance-gg

## Dependencies (15)

- [p2](https://npm.io/package/p2.md) ^0.7.1
- [jsdoc](https://npm.io/package/jsdoc.md) ^4.0.2
- [tslib](https://npm.io/package/tslib.md) ^2.6.2
- [cannon](https://npm.io/package/cannon.md) ^0.6.2
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [@types/p2](https://npm.io/package/@types/p2.md) ^0.7.44
- [socket.io](https://npm.io/package/socket.io.md) ^4.7.5
- [bufferutil](https://npm.io/package/bufferutil.md) ^4.0.1
- [typescript](https://npm.io/package/typescript.md) next
- [@types/three](https://npm.io/package/@types/three.md) ^0.163.0
- [@types/cannon](https://npm.io/package/@types/cannon.md) ^0.1.12
- [event-emitter](https://npm.io/package/event-emitter.md) ^0.3.5
- [utf-8-validate](https://npm.io/package/utf-8-validate.md) ^5.0.2
- [socket.io-client](https://npm.io/package/socket.io-client.md) ^4.7.5
- [@types/event-emitter](https://npm.io/package/@types/event-emitter.md) ^0.3.5

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 5.0.2 (latest) — 2024-05-11
- 5.0.1 — 2024-05-06
- 5.0.0 — 2024-05-04
- 4.0.9 — 2021-05-03
- 4.0.8 — 2019-07-04
- 4.0.6 — 2019-05-07
- 4.0.5 — 2019-04-22
- 4.0.4 — 2019-04-22
- 4.0.3 — 2019-04-09
- 4.0.2 — 2019-03-16
- 4.0.0 — 2019-03-15
- 3.1.1 — 2019-02-23
- 3.1.0 — 2019-02-22
- 3.0.14 — 2019-02-09
- 3.0.13 — 2019-01-15
- … 32 more at https://npm.io/package/lance-gg/versions

## README

<img src="https://cloud.githubusercontent.com/assets/3951311/24590344/0b7748b8-17f4-11e7-84fc-d24c44c7a27a.jpg" style="width: 100%" alt="Lance logo">

# [Lance](https://lance-gg.github.io/) is a real-time multiplayer game server

It provides an extendible Node.JS based server, on which game logic runs, as well as a client-side library
which synchronizes the client's game state with the server game state.  In order
to provide a smooth visual experience for each connected client, Lance implements
efficient networking methods, position interpolation and extrapolation, user input
coordination, shadow objects, physics and pseudo-physical movement, automatic
handling of network spikes.

Lance aims to optimize the player's visual experience, while providing
a simple development model which is highly configurable and easy to analyze
and debug.

## Features:

* Focus on writing your game. Lance takes care of the netcode
* Can support any type of game or genre  
* Optimized networking
    * TCP via websockets
    * Communication is packed and serialized into binary
    * Automatic handling of network spikes with step correction
* Intelligent sync strategies for lag handling
    * Extrapolation (client side prediction) with step re-enactment or:
    * Interpolation for optimal object motion
* Tools for debugging and tracing

More features in the pipeline:

* UDP via WebRTC
* Full-stack testing suite
* Replay saving
* More physics engines

## That's so neat! Where do I start?

The official [Lance documentation](https://lance-gg.github.io/docs_out/index.html) contains articles on theory and rationale, as well as the structure and architecture of the project.

## Something went wrong! I need help!

If you're not exactly sure how to do something, [Stack Overflow](http://stackoverflow.com/questions/tagged/lance) is your friend.

If you've encountered a bug and it's not already in the [issues page](https://github.com/lance-gg/lance/issues), open a new issue.

---
_Source: https://npm.io/package/lance-gg · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
