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 🙏

© 2024 – Pkg Stats / Ryan Hefner

dankdomain

v3.2.7

Published

Ɗaɳƙ Ɗoɱaiɳ: the return of Hack & Slash

Downloads

392

Readme

🏰 Ɗaɳƙ Ɗoɱaiɳ :: the return of Hack & Slash


screenshot

Player's Manual

Read the Manual to play the online game

Ɗaɳƙ Ɗoɱaiɳ is the re-imagined classic Amiga bulletin board, Hack & Slash, built around a medieval role-playing atmosphere. Your character kills, steals, brawls, and jousts other PCs, NPCs, and BOTs to gain levels and fortune. Successful ventures into the deep dank dungeon are key to immortality.

Original Commodore Amiga Hack & Slash enthusiasts can visit Absinthe BBS by Anachronist.


sudo systemctl start dankdomain-portal

%%{init: {'theme':'dark'}}%%
stateDiagram-v2
  direction TB
  Local : 👤 Local Player
  Local --> main : npm run play
  Remote : 🌐 Remote Players
  Remote --> Firewall : telnet
  Remote --> Apache : https
  Firewall : 🛡️ Firewall
  Firewall --> tty : 1986
  state "🕸️ Apache (optional)" as Apache {
    state "SSL Proxy (localhost:1939)" as proxy {
      state "🖧 Ɗaɳƙ Ɗoɱaiɳ portal service (DDnet)" as DDnet {
        app --> tty : telnet-socket
        app --> bot : timer
        app --> websocket : http/ws
        app --> rest : express
        app --> static : express
        fork: node-pty
        tty --> fork
        bot --> fork
        websocket --> fork
        fork --> main : fork
      }
      --
      state static {
        assets
        images
        sounds
      }
    }
  }

  state "🏰 Ɗaɳƙ Ɗoɱaiɳ (DDplay)" as DDplay {
    main --> lib
    lib --> items
    lib --> runtime
    lib --> xvt
    main --> sys
    main --> init
    init --> db
    init --> pc
    init --> npc
    init --> player
    state login <<choice>>
    init --> login : login id?
    login --> taxman : bot or user
    login --> newuser
    state newuser {
      email
    }
    state taxman {
      state "💰" as taxes
      taxes --> battle : refuse
      taxes --> menu : paid
      menu --> library
      menu --> sysop
      menu --> arena
      menu --> dungeon
      menu --> naval
      menu --> party
      menu --> tavern
      menu --> casino
      menu --> square
      arena --> battle
      dungeon --> battle
      naval --> battle
      party --> battle
      tavern --> battle
      casino --> taxes
      square --> taxes
      tavern --> taxes
      state "🏦" as bank
      casino --> bank : atm
      square --> bank : bank
    }
  }

NPM

Code Preview ... or just press dot (.) on your keyboard

npm version Libraries.io dependency status for latest release GitHub milestones

Installation

Project development on Chrome OS and Linux with the Node.js runtime. To run a local game copy, click the VS Code icon above or manually install:

# fetch this package source:
$ git clone https://github.com/theflyingape/dankdomain
# ... or via Node.js
$ npm install dankdomain

# cd into package source folder:
$ npm install

# 1) play it as standalone:
$ npm run play

# modify for your server networking preferences:
$ cp etc/network.json_inet etc/network.json
$ vim etc/network.json

# 2) run it as a local multiuser server:
$ npm run net &
$ npm run term
$ npm stop

# 3) other ways to play online:
$ npm run mame
$ npm run term play.ddgame.us
$ telnet play.ddgame.us
Connected to play.ddgame.us.
Escape character is '^]'.
CARRIER DETECTED
PC emulation enabled
            ...........|\...................../|................. Welcome to
             ........./  \..|\__  __/|......./  \............... Dank Domain
            ........./ /  \.\ _ \/ _ /....../    \.............
      _  .........../ / /  \.(-)\/(-)....../  / \ \.............
     (_)  ..........| | | / \\/(oo)\/...../  // |\ \.............
          ..........| | | |  \|v--v|\..../  / | || \|...........
        ............| | | | / \_^^_/ \../  / || || ||.............
           ......../ / /  | |   \/    \/  /| || || ||/\../\....
            /\..../ / /  / /  |______/   /| \ \ || ||  \/  \    /\        /\
 /\      /\/  \../ / /  / /  /\_____/  |/ /__\ \ \ \ \ /    \  /  \  /\  /  \
/  \/\  / /    \.| | | / /  /\______/    \   \__| \ \ \      \/    \/  \/    \
    \ \/        \| | | | | |\______       \_    \__|_| \     /      \  /
     \/          | | ____ /\______ ____     \_       \  |   /         /
      \          | |/    /\_____  /    \      \__     \ |
       \         |/ |   |\______ |      |        \___  \|
                    |   |\______ |      |            \_
            _   ___/|   |\______ |      |          /\  \   ___
           / \_/     \   \________\_    _\____/   /  \__\_|   \
       ___/ __     __/   /       __/   /__    \__/      __     \__
     _/    /  \   /  ___/       /  ___/   \            /  \       |__
    |     |      |/|/          |/|/        \__    \        \         |

Who dares to enter my dank domain <or NEW>?

NOTE: my "public" access packages are published on GitHub and it requires your Personal Access Token authentication to fetch/install them from this alternative npm registry. Read GitHub's Working with the npm registry to learn more details.

# setup local Node.js package
$ npm config set @theflyingape:registry https://npm.pkg.github.com
$ npm login --scope=@theflyingape
$ npm install @theflyingape/dankdomain

... or use Docker (convenient and uses the latest commits):

$ docker pull theflyingape/dankdomain
$ docker run --rm -it -p 1939:1939/tcp -p 1986:1986/tcp theflyingape/dankdomain

Dank Domain (DDnet) started on linux #661
cwd /usr/games/dankdomain/game → /usr/games/dankdomain/game/portal
initializing Deeds
initializing Online
initializing Rings (unique)
 + adding ⚛️ Atomic
 + adding ✝️ Faith
 + adding ♾️ Infinity
 + adding 🐍 Medusa's
 + adding 🕳️ Mystic Portal
 + adding 👹 Ogre
 + adding 🖤 Undying
 + adding ⚪ White Wizard
initializing Players
initializing Gangs
 + adding AB Original with BOT+NPC members
 + adding (the) Monster Mash
ENOENT: no such file or directory, open '/usr/games/dankdomain/game/etc/network.json'
→ listening on telnet 0.0.0.0:1986
→ listening on https://0.0.0.0:1939/
↔ WebSocket endpoints enabled

Supports running as a BBS door (as Amiga-only BBSes did for Hack & Slash in 1994) by allowing a passed user numeric ID paired with a compatible Mystic door.sys file format launched from its BBS node startup directory. Here is how to freshly unit-test that app startup mode:

[~/dankdomain]$ npm run clean
[~/dankdomain]$ cd game
[~/dankdomain/game]$ cp door-example.sys door.sys
[~/dankdomain/game]$ node main 0

For example, configure to call-out to a script with two (2) parameters: userId and the path with filename to door.sys

#!/bin/sh
pwd; [ -s "$2" ] || exit 1
cp "$2" /usr/local/games/dankdomain/door.sys
node /usr/local/games/dankdomain/main "$1"

FAQ

  • What does etc/sysop.json do? How do you assign sysop privileges?

This file simply regulates some of the game features loaded at runtime. The first Player (non-NPC) to register is automatically entitled as the Ruler off the last object entry in files/items/title.json which is packaged here as either the (M) King or (F) Queen access role. The Ruler alone is granted with minor "favor" over their domain, but aligned with the game play & spirit if not abused. Other roles can have sysop: true enabled to gain access to "@" and some overlapping favor with the Ruler as you'd expect from a minion.

NOTE: in users folder, edit a hidden (dot) export file to carefully modify any Player's record and save as save.json whereas a running DDnet app.js portal service (npm run net) will automatically consume and apply it to the dankdomain.sql Players table.

  • What's the best way to modify Player time limits and timeouts throughout the game?

Refer to files/items/title.json for player runtime values based on their access role -- assigned or achieved by reaching the next promote level. There are no soft-coded values for the timeouts assigned to the various prompts. Those have been specially tweaked to keep turn-play moving along -- appropriately. That said, try modifying vt.defaultTimeout seconds in main.js to your liking.

Files directory structure

For the Portal, consider downloading media packs: 📷 images and 🔉 sounds into the appropriate game/portal/static folder:

$ pwd
/usr/games/dankdomain
.vscode           Visual Studio Code: settings & debug profiles
game
  etc             sysop support files
  files           game, menu & player support files: ANSI and/or text formats
    arena         ASCII art & menu files
    casino        menu files
    dungeon       ASCII art
    items         game artifacts
    library       deeds & menu files
    main          about system & menu files
    naval         ASCII art & menu files
    party         instruction & menu files
    player        ASCII art
    square        menu files
    tavern        all player events logged for the day
    user          each player’s events logged since last visit
  pcs             user object type templates for BOTs, NPCs, and PCs
  play            game modules for each main menu item
    battle.js     support module for player engagements
    init.js       support module for initial login
    runtime.json  game play runtime values
    sysop.js      support module for the system operator - main menu "@" command
  portal
    static        UI html/css/js using bundle.js: client.js & xterm.js
      assets      app install, fonts, etc.
      images      visual media for artifacts, creatures, and players
      sounds      audio media for event notifications
    app.js        DDnet for optional web and/or telnet services to run DDplay remotely
  users           player runtime database & current game files
  db.js           net & play module for player runtime database & files
  email.js        support module for (optional) dispatching email notifications
  interfaces.js   TypeScript object types
  items.js        support module for loading item artifacts & coin
  lib.js          support module for common I/O functions
  main.js         DDplay client node
  npc.js          support classes for BOTs & NPCs with arena, dungeon, and naval denizens
  pc.js           support classes for PCs with Deeds
  player.js       support module for common PC functions
  runtime.js      global runtime variables to govern play
  sys.js          support module with discrete functions to dependencies
  telnet.js       telnet client using websocket and XT emulator handling
  types.js        TypeScript template literals
mame              player - MAME VT240 terminal + socat startup script
node_modules      Node.js support libraries
package.json      Node.js manifest

🇺🇸 ©️1991 - 2023 Robert Hurst

Gallery

Node.js dependency tree

DDnet portal

app

  • chokidar, dns, express, fs, http, https, net, node-pty, ws
  • sys: fs, got, path, romanize, sprintf-js, title-case
  • items: sys
  • db: better-sqlite3, items, sys
  • network service options
    • telnet: net-keepalive, telnet-socket
    • web: url

client

  • animate.css, browserify, xterm, xterm-addon-fit, xterm-addon-unicode11, xterm-addon-web-links, xterm-addon-webgl

DDplay game

main

  • sys: country-flag-emoji, fs, fast-geoip got, path, romanize, sprintf-js, title-case
  • lib: items, runtime, sys, xvt
    • items: sys
    • runtime: sys
  • init: db, items, lib, npc, pc, player, runtime, sys
    • db: better-sqlite3, items, sys
    • pc: db, items, lib, runtime, sys
    • npc: db, items, lib, pc, runtime, sys
    • player: db, items, lib, npc, pc, runtime, sys
    • email: db, items, lib, nodemailer, nodemailer-smtp-transport, pc, runtime, sys
    • newuser: db, email, init, items, lib, pc, runtime, sys
    • taxman: db, items, lib, pc, player, runtime, sys
      • battle: db, items, lib, npc, pc, player, runtime, sys
      • menu: battle, db, items, lib, npc, pc, player, runtime, sys
        • arena: battle, db, items, lib, npc, pc, player, runtime, sys
        • casino: db, items, lib, npc, pc, player, runtime, sys
        • dungeon: battle, db, items, lib, npc, pc, player, runtime, sys
        • library: db, items, lib, npc, pc, runtime, sys
        • naval: battle, db, items, lib, npc, pc, player, runtime, sys
        • party: battle, db, items, lib, npc, pc, player, runtime, sys
        • square: battle, db, items, lib, npc, pc, player, runtime, sys
        • sysop: battle, db, dungeon, email, lib, pc, player, runtime, sys
        • tavern: battle, db, items, lib, npc, pc, player, runtime, sys, taxman