pinus is a free, open source gaming project written in JavaScript and released under MIT. It has 1,932 GitHub stars, 392 forks and 34 open issues, and was last pushed 2 months ago. On this registry it ranks #27 of 28 tracked projects in Gaming, with 5 head-to-head comparisons available.

What is pinus?

Pinus is a fast, scalable, distributed game server framework for Node.js, written in TypeScript and intended for developers building multiplayer games and real-time applications such as chat and message push.

What it is

Pinus is an open-source, MIT-licensed distributed game server framework for Node.js, written in TypeScript and published from the node-pinus organisation on GitHub, with its own website at pinus.io. It provides the basic development framework together with related components, libraries and tools, and serves both multiplayer games and real-time web applications; its distributed architecture is presented as scaling better than other real-time web frameworks.

The project began as a TypeScript rewrite of pomelo, described in its own README as the TS version of pomelo, with the earlier framework's internal callbacks converted to Promises. Because the protocols are unchanged, existing pomelo client code can connect to a pinus server directly, and pomelo tutorials remain applicable. The concrete gap it fills is stated plainly: unlike the web, finding an open-source game server framework is difficult, so pinus is offered as a complete solution for building one rather than a loose set of parts. In practice it stands in for the callback-based pomelo stack in a Node.js game server deployment.

Key capabilities

  • A distributed, multi-process architecture that can be scaled up, with flexible server extension for adding capacity or new server roles.
  • A Promise-based programming model over a simple API of request, response and broadcast, replacing the callback style inherited from pomelo.
  • Protocol compatibility with pomelo, so existing pomelo clients connect unchanged and pomelo documentation still applies.
  • A plugin architecture with ready-made plugins for online status and master high availability, plus support for custom network protocols and custom components.
  • Client coverage for JavaScript, Flash, Android, iOS, cocos2d-x and C.
  • A command line tool providing pinus init for project scaffolding, alongside an admin tool, a performance test tool, and AI and path-finding libraries.
  • Convention over configuration, described as almost zero config, with reference material including the examples/simple-example project and the open-source MMO RPG demo, Lord of Pinus.

Who uses it and how

  • Teams building middle-size MMO RPGs and mobile, social or web multiplayer games that need multiple server processes rather than a single instance.
  • Developers of real-time applications such as chat and message push, where broadcast is a core operation.
  • Existing pomelo users who keep their clients and tutorials while moving the server side to TypeScript.
  • Contributors building the framework from source: clone the repository, run yarn, run yarn run build, then link it into a project with yarn link, npm link or a yarn workspace.

Getting started

Install the framework globally with npm install pinus -g, then create a directory, change into it and run pinus init to initialise the project. A worked example is kept in the repository at examples/simple-example.

How it compares

Pomelo is the one comparable tool named in the project's own material, and pinus positions itself as its TypeScript version rather than a competitor: the framework and protocols are the same, so tutorials and clients carry over, while callbacks become Promises. Anyone already invested in pomelo therefore has a low-cost route to TypeScript, and anyone starting fresh gets the same architecture on a modernised Node.js implementation.

When to use it — and when not to

Self-hosting means operating a distributed, multi-process Node.js server yourself, since no hosted or managed option is described anywhere in the material. It is a poor fit for teams wanting a managed backend or extensive English-language, pinus-specific documentation: much of the README is written in Chinese and readers are pointed to pomelo tutorials for framework detail, so prior familiarity with pomelo or Node.js is effectively assumed.

project readme (upstream, from github) — read inline

Actions Status

官方网站:https://pinus.io 欢迎加Pinus官方QQ群:102530089

示例工程请参见:https://github.com/node-pinus/pinus/tree/master/examples/simple-example

手动安装: npm install pinus -g

mkdir testProject cd testProject 初始化项目 pinus init

与Pomelo的关系

  1. pinus是pomelo的TS版本,框架内部把回调改为了Promise。
  2. 框架与pomelo一样,所以可以看pomelo的相关教程。
  3. 协议与pomelo一样,所以pomelo的客户端代码可以直接对接上pinus服务端。

框架编译方法

git clone https://github.com/node-pinus/pinus.git
cd pinus
yarn
yarn run build

编译好以后可以使用 yarn link 或者 npm link 软链接到自己的项目。 也可以用 yarn 的 workspace

查看pinus CHANGELOG

Pinus -- a fast, scalable game server framework for node.js

Pinus is a fast, scalable game server framework for node.js. It provides the basic development framework and many related components, including libraries and tools. Pinus is also suitable for real-time web applications; its distributed architecture makes pinus scale better than other real-time web frameworks.

Features

Complete support of game server and realtime application server architecture

  • Multiple-player game: mobile, social, web, MMO rpg(middle size)
  • Realtime application: chat, message push, etc.

Fast, scalable

  • Distributed (multi-process) architecture, can be easily scale up
  • Flexible server extension
  • Full performance optimization and test

Easy

  • Simple API: request, response, broadcast, etc.
  • Lightweight: high development efficiency based on node.js
  • Convention over configuration: almost zero config

Powerful

  • Many clients support, including javascript, flash, android, iOS, cocos2d-x, C
  • Many libraries and tools, including command line tool, admin tool, performance test tool, AI, path finding etc.
  • Good reference materials: full docs, many examples and an open-source MMO RPG demo

Extensible

  • Support plugin architecture, easy to add new features through plugins. We also provide many plugins like online status, master high availability.
  • Custom features, users can define their own network protocol, custom components very easy.

Why should I use pinus?

Fast, scalable, real-time game server development is not an easy job, and a good container or framework can reduce its complexity. Unfortunately, unlike web, finding a game server framework solution is difficult, especially an open source solution. Pinus fills this gap, providing a full solution for building game server frameworks.

Frequently asked questions

Is pinus free to use?

pinus is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does pinus do?

A fast,scalable,distributed game server framework for Node.js, Powered by TypeScript. 一个TypeScript写的node.js分布式游戏/应用服务器框架(原型基于pomelo)。

What is pinus written in?

pinus is primarily written in JavaScript. Its source is publicly available at https://github.com/node-pinus/pinus, and it has 1,932 GitHub stars.