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

d-zone

v0.1.68

Published

An ambient life simulation driven by the user activity within a Discord server

Downloads

35

Readme

D-Zone

An ambient life simulation driven by the user activity within a Discord server

D-Zone

Concept

D-Zone is a graphical simulation meant to abstractly represent the activity in your Discord server.

This is not meant for any actual monitoring or diagnostics, only an experiment in the abstraction of chatroom data represented via autonomous characters in a scene.

Hopefully the simulation is interesting to watch. You can see the current (uninteresting) client version simulating the discord.io server here: pixelatomy.com/dzone

Installation

Deploy

If you don't want to use Heroku, proceed below.

If you're an absolute beginner or want more detailed instructions, read the beginner-friendly guide

git clone https://github.com/vegeta897/d-zone.git
cd d-zone
npm install --no-optional

Set your token environment variable to your bot's token. Alternatively, create a file called .env in the project root and put token="your_token" in it. If you are hosting on HTTPS (recommended), you need to also set your cert and key variables to the full paths of your certificates (e.g. /etc/letsencrypt/live/example.com/fullchain.pem and /etc/letsencrypt/live/example.com/privkey.pem). These can also be set in the .env file.

Rename discord-config-example.json to discord-config.json and insert the info for your Discord server(s). You must specify one default Discord server. You can include multiple servers here, and as long as your bot can connect to them, they will be available for clients to view.

If your server has thousands of members, you will probably want to hide offline users by adding hideOffline: true to your server options.

You can password-protect a server from being viewed by a client by using the password property. Check the Configuration reference for more info.

Rename socket-config-example.json to socket-config.json and insert the address and port you want to run the websocket on. If you are using HTTPS, set secure to true. Make sure the address matches your certificate name if using HTTPS. An IP address won't work with your certificate.

Start the server with npm start or just node index.js. You may need to run this as admin to access the cert files, if you're using them.

The client files are all contained within the web folder, and need to be built into /static/bundle.js with npm run-script build or npm run-script watch. Upload everything in the web folder except the script folder. Do not remove the web folder from the package; the server component requires it.

Remember, if you're running the server without HTTPS, then the web files must be accessible via HTTP.

If everything works, the client should connect to the default server, generate a world, and receive live updates via websocket from the server.

You can tweak the message box parameters by editing misc-config.json. Check the Misc Config reference for details.

Don't forget to rebuild bundle.js and re-upload the web files after making changes to your config files.

Design

The game engine architecture is currently loosely based on crtrdg.

It consists of both a server and client component:

Server Component

The server runs a Discord bot which monitors the activity and user statuses in the server(s) of your choice. This data is sent to clients in real time via websockets.

Client Component

The client (also designed with node via browserify) runs a graphical simulation in a canvas depicting an isometric scene populated by objects and autonomous characters. The activity in the scene is dictated and influenced by the data received from the server component. Clients are able to change which Discord server they are viewing with in-game UI.

Core client modules such as the renderer and input controller are loosely based on implementations found in playground.js.

Disclaimer: I cannot be held responsible for anything that happens to your computer, your server, your bot, or anything else as a result of using this package.

Please consider the privacy of the users on your server. D-Zone will allow anyone with the URL (and password, if used) to monitor the chat of anyone in any channel that your bot has permission to see.