# n3d-gamecore

> 3D multiplayer core functionality game engine component.

Latest version **0.0.3-alpha** (published 2013-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install n3d-gamecore
pnpm add n3d-gamecore
yarn add n3d-gamecore
bun add n3d-gamecore
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3-alpha |
| Published | 2013-09-06 |
| First published | 2013-08-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 12 |
| Author | joates |
| Maintainers | joates |
| Keywords | 3D, multiplayer, HTML5, websockets, game server, game engine, mmog, three.js |

## Links

- npm: https://www.npmjs.com/package/n3d-gamecore
- Repository: git@github.com:joates/n3d-gamecore
- Issues: https://github.com/joates/n3d-gamecore/issues
- npm.io page: https://npm.io/package/n3d-gamecore

## Dependencies (6)

- [express](https://npm.io/package/express.md) 3.3.x
- [domready](https://npm.io/package/domready.md) 0.2.x
- [node-uuid](https://npm.io/package/node-uuid.md) 1.4.x
- [socket.io](https://npm.io/package/socket.io.md) 0.9.x
- [n3d-controller](https://npm.io/package/n3d-controller.md) 0.0.x
- [socket.io-browserify](https://npm.io/package/socket.io-browserify.md) 0.9.x

## 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

- 0.0.3-alpha (latest) — 2013-09-06
- 0.0.2-alpha — 2013-08-26
- 0.0.1-alpha — 2013-08-15
- 0.0.1-alpha1 — 2013-08-14
- 0.0.0-alpha1 — 2013-08-14

## README

## n3d-gamecore (0.0.3-alpha)

the codebase is considered **ALPHA quality** only, should be OK to use but is 'unstable' because the API will probably change without notice. If you pull updates from 'dev' branch and it breaks your code, its on you, *that* is your warning. _Use at own risk_.

You also need to install the *Three.js* library wherever you are hosting the server because it is not bundled with this component.


####3D WebGL Multi-Player Game Engine (Node.js / Three.js / HTML5)
This is a Node.js websockets application which provides the core functionality of a 3D multi-player game engine, most of  the original 2D code remains, it has been re-purposed to provide the player mini-map overhead view, the client and server messaging subsystem implements client prediction and responds to client input with authoritative server update packets using socket.io (Express is included but its only doing basic routing to serve the 'public/' folder files at the moment) and all of the 3D scene rendering in the browser is provided by Three.js, all connected clients will need to be running a modern WebGL/HTML5 compatible browser (such as Chrome or Firefox)

This is **not** a fully functional game, it is intended to be a scalable realtime massively multi-player component to incorporate into your game project, my goal is to support up to 512k concurrent connections (at a future stage of the project). The concept will be to keep this core component as lean and efficient as possible without adding many additional features (i.e. sophisticated collision physics) but to also include a stable API so that those extra features can easily be provided by other Node.js modules.


#### Change history
* _Aug.2012_  Original Source by [Sven Bergström](https://github.com/underscorediscovery)
* _Apr.2013_  Forked and updated by [Asad Memon](https://github.com/asadlionpk)
* _Aug.2013_  Forked and extended to support 3D (as well as 2D) by [joates](https://github.com/joates)


## Realtime Multiplayer In HTML5

Read the original article here (2D only): 
http://buildnewgames.com/real-time-multiplayer/

#### Getting started
* Grab the most recent release bundle from [here](https://github.com/joates/n3d-gamecore/releases)
* extract all the files (from the zip/tarball)
* _rename_ `n3d-gamecore-<release_name>` to just `n3d-gamecore`
* type `cd n3d-gamecore/public/`
* Grab the latest three.js release from [here](https://github.com/mrdoob/three.js/releases)
* extract all the files (from three.js zip/tarball)
* check that the links in `n3d-gamecore/public/index.html` can access `three.min.js`
  (& `dat.gui.min.js` is optional)
  * you will probably just need to _rename_ the `three.js-r??` folder to `three.js`
* type `cd ..` to get back to the `n3d-gamecore` root folder
* run `npm install` (to download the node module dependencies)
* run `npm start` (to start the game server running)
* Visit `http://localhost:8000` with your browser
  * use `http://localhost:8000/?debug` as the URL if you want to enable the debug interface.


NOTE: the movement controller is designed for a device with a touchscreen,
if you have a normal (non-touch) screen you can either

1. enable the `Emulate touch events` setting in the browser ( _and use the mouse_ ) or
2. change `mouseSupport: false` to `true` in `public/js/main.js` ( _and use the mouse_ )


MIT Licensed.

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