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 🙏

© 2026 – Pkg Stats / Ryan Hefner

mochi-engine

v1.0.0

Published

The Mochi Engine is a JavaScript game engine that can be used to write single or multiplayer games.

Readme

Mochi Game Engine

The Mochi Game Engine written in JavaScript. Included alongside games in any way that it can be accessed.

Setup

Setting up the Mochi engine from source is easy. Just download the source and place it alongside or inside of the game you wish to make with the engine.

Our engine uses requirejs for imports/exports since ES6 modules are not yet fully implemented in all browsers. Simply include the engine's top level package to use all its components.

// Assumes Mochi is set up alongside the game directory in a directory called engine
requirejs(['../engine/Mochi' ..... );

Networking Setup

If you plan to use the Mochi engine for networked games, you will need to install additional dependencies. The Mochi engine is set up to be used within Node, but doesn't come pre-downloaded with all the necessary components.

Network setup requires that nodejs has been installed with the node package manager.

Simply use the node package manager to install the dependencies within the engine:

// From within the engine directory
npm install

This command will download all the node components needed for network functionality. You can now write a simple game server just by including the MochiServer top level package:

var Mochi = require('../engine/MochiServer');

This module contains all of the Mochi engine along with additional server-only components.

Architecture

The Mochi engine uses the Entity-Component-Manager architecture and is structured accordingly. Most subdirectories (such as graphics, events, physics) contain a component (sprite, behavior, body) and a manager (the ones that end in manager).

Unlike Entity-Component-System (ECS), ECM is a slight variation where components are not purely data-driven, but can instead have simple logic and operations embedded. Additionally, components can technically use the event system inside each entity to gain whatever information from other components. Thus, the term is manager instead of system since they are managing components that have logic instead of performing all available operations.

Libraries Used

RequireJS

Source

This library was included because ES6 import/export modules have not been standardized in all browsers.

Node JS

Source

This library was included to allow for networked games. We use additional dependencies with node: