3.2.7 • Published 1 year ago

dankdomain v3.2.7

Weekly downloads
7
License
MIT
Repository
github
Last release
1 year ago

🏰 Ɗ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
3.2.7

1 year ago

3.2.6

1 year ago

3.2.5

2 years ago

3.2.4

2 years ago

3.2.3

2 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

3.0.4

3 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.9.0

4 years ago

2.8.2

4 years ago

2.8.1

4 years ago

2.7.0

4 years ago

2.6.4

4 years ago

2.6.3

4 years ago

2.6.2

4 years ago

2.6.1

4 years ago

2.6.0

4 years ago

2.5.3

4 years ago

2.5.2

4 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.2

5 years ago

2.4.1

5 years ago

2.4.0

5 years ago

2.3.6

5 years ago

2.3.5

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.4

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

6 years ago

1.8.2

6 years ago

1.8.1

6 years ago

1.8.0

6 years ago

1.7.3

6 years ago

1.7.2

6 years ago

1.7.1

6 years ago

1.7.0

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.6

6 years ago

1.5.5

6 years ago

1.5.4

6 years ago

1.5.3

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.9.21

7 years ago

0.9.20

7 years ago

0.9.19

7 years ago

0.9.18

7 years ago

0.9.17

7 years ago

0.9.16

7 years ago

0.9.15

7 years ago

0.9.14

7 years ago

0.9.13

7 years ago

0.9.12

7 years ago

0.9.11

7 years ago

0.9.10

7 years ago

0.9.9

7 years ago

0.9.8

7 years ago

0.9.7

7 years ago

0.9.6

7 years ago

0.9.5

7 years ago

0.9.4

7 years ago

0.9.3

7 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago

0.8.12

7 years ago

0.8.11

7 years ago

0.8.10

7 years ago

0.8.9

7 years ago

0.8.8

7 years ago

0.8.7

7 years ago

0.8.6

7 years ago

0.8.5

7 years ago

0.8.4

7 years ago

0.8.3

7 years ago

0.8.2

7 years ago

0.8.1

7 years ago

0.8.0

7 years ago

0.7.6

7 years ago

0.7.5

7 years ago

0.7.4

7 years ago

0.7.3

7 years ago

0.7.2

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.4

7 years ago

0.6.3

7 years ago

0.6.2

7 years ago

0.6.1

7 years ago

0.6.0

7 years ago

0.5.12

7 years ago

0.5.11

7 years ago

0.5.9

7 years ago

0.5.8

7 years ago

0.5.6

7 years ago

0.5.5

7 years ago

0.5.4

7 years ago

0.5.3

7 years ago

0.5.2

7 years ago

0.5.0

7 years ago

0.4.6

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.5

7 years ago

0.3.0

8 years ago

0.2.14

8 years ago

0.2.13

8 years ago

0.2.12

8 years ago

0.2.11

8 years ago

0.2.10

8 years ago

0.2.9

8 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.0

8 years ago