Giter VIP home page Giter VIP logo

theflyingape / dankdomain Goto Github PK

View Code? Open in Web Editor NEW
41.0 41.0 9.0 96.82 MB

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

Home Page: https://www.DDgame.us

License: MIT License

TypeScript 94.85% Shell 0.96% HTML 0.69% CSS 1.33% GLSL 2.07% Dockerfile 0.09% JavaScript 0.01%
bbs dungeon dungeon-crawler-game multiplayer-game-server multiplayer-online-game node-js telnet terminal-game web xterm-js

dankdomain's Issues

npm install failing on dependency @theflyingape/xvt@^1.4.6

Hello,

On a fresh Ubuntu 20.04 with node v16.2.0, npm v7.14.0, with a fresh clone of this repo, I can't run 'install.sh' since it clearly depends on fedora, but attempting a manual install currently fails as well. 'npm install' in the root of the project results in the following error:

npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR!     https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR!     npm login

According to logs, it looks like package @theflyingape/xvt is either private or requires some sort of authentication to install. Can you please advise? Thanks!

refactor UI from using iframes

It's time to converge main index with info frame into a single app, but also move the disparate support code in each HTML file into client.ts -- the browser needs only a single bundle.

Entering as a door doesn't init user properly

When entering DD as a door, the user doesn't get initialized properly, sending straight to the main menu with 5 minutes remaining, nearly no menu options function, re-roll doesn't do anything, and hitting option Y for your statistics causes a crash:

/home/sbbs/sbbs/xtrn/dankdomain/game/pc.js:640
i = 30 - items_1.Access.name[profile.user.access][sex].length;
^
TypeError: Cannot read properties of undefined (reading 'length')
at _pc.status (/home/sbbs/sbbs/xtrn/dankdomain/game/pc.js:640:68)
at Object.choice [as cb] (/home/sbbs/sbbs/xtrn/dankdomain/game/play/menu.js:445:29)
at _xvt._read (/home/sbbs/sbbs/xtrn/dankdomain/node_modules/xvt/lib/xvt.js:518:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

lib_1.vt.tty is being set as 'door' appropriately in main.js

But I suspect something is running afoul in init.js, I haven't yet understood what.

Questions about game management

Howdy, Robert! Figured I'd ask here if you don't mind:

  1. Is sysop.json just meant to be defined as the user you'd like to have sysop privileges? ie - change the 'name' to an actual user's name and it will match that user?

  2. What's the best way to modify the time limits in the game for users? There's actually a few things I'd like to do here - a) Remove (or increase greatly) the timeout on the prompts so the game isn't interested in booting one off so quickly if they've gone afk for a minute, b) Increase the number of plays per day, and c) Increase the amount of time a user is allowed to spend in the game.

I guess on Question 2 there's a bunch of hard coded items around?

Is it because I'm an awesome Titan?

+------------------=:)) Mcmlxxix ((:=------------------+
(node:102335) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined
at Character.stats (/usr/local/games/dankdomain/common.js:203:67)
at Object.cb (/usr/local/games/dankdomain/tty/main.js:397:34)
at session. (/usr/local/games/dankdomain/node_modules/xvt/xvt.js:229:19)
at Generator.next ()
at fulfilled (/usr/local/games/dankdomain/node_modules/xvt/xvt.js:5:58)
(node:102335) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:102335) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
WebSocket close

bots

Introduce automated RPCs identified with access 'Elemental'.
Created two bot JSON files upon startup creation and game board reset. Eligible now for other players to engage.

Failing to find smtp.json

On a new install, after the initial run of install.sh while creating my first user, I'm presented with the dialog during user creation to enter an email address. This is required for user email validation. After entering the email address twice, I receive the following error:

for Ryan <[email protected]> (node:1004) UnhandledPromiseRejectionWarning: Error: Cannot find module './etc/smtp.json'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /usr/local/games/dankdomain/email.js:125:31
    at Generator.next (<anonymous>)
    at /usr/local/games/dankdomain/email.js:11:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/local/games/dankdomain/email.js:7:12)
    at Message (/usr/local/games/dankdomain/email.js:124:16)
(node:1004) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:1004) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

It would probably be good to fix this, but optionally is there a way to disable email verification completely? Thanks!

Build issues

Can't install fxvt (401 error)

The docker pull command isn't working for me either.

logins.sh failing with SqliteError: no such table: Rings

Hi,

I'm trying to host dankdomain myself but am running into issues. I should mention I'm on 64 bit debian sid. I followed all the steps in install.sh and got the service to run with systemd. Everything appears to be fine. However, when I try to telnet in, launching the logins.sh script, I get the following errors:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
[_BAR]
?Unexpected SQL error: SqliteError: no such table: Rings -- retrying

?Unexpected SQL error: SqliteError: no such table: Rings -- retrying

?Unexpected SQL error: SqliteError: no such table: Rings
?FATAL SQL operation: UPDATE Rings set bearer = "" WHERE name = "Atomic"Connection closed by foreign host.

Do I need to manually create this table somewhere? And how do I do so?

Thanks!

As a door, need to be able to specify a path to the drop file

Hi there,

If this is to be setup as a door, and multiple players play, I'm confused as to how DD is going to look a hard-coded path for door.sys (or door32.sys) when it should be able to accept the path on the command line to the drop file.

It seems like it would continually look at the same file when each instance is going to need to be able to look for a different file that the BBS software generates.

SqliteError: UNIQUE constraint failed: Players.handle

I grabbed the current source (git clone) and ran 'npm install'. When running 'npm run play' and entering the new user information, I get:

Your user ID (BLI) was saved, pilgrim.
Your password: "local"
 ? unexpected error: SqliteError: UNIQUE constraint failed: Players.handle
        SQL defect: INSERT INTO Players
            ( id, handle, name, email, password
            , dob, sex, joined, expires, lastdate
            , lasttime, calls, today, expert, emulation
            , rows, access, remote, pc, gender
            , novice, level, xp, xplevel, status
            , blessed, cursed, coward, bounty, who
            , gang, keyseq, keyhints, melee, backstab
            , poison, magic, heal, blast, steal
            , hp, sp
            , str, maxstr, int, maxint, dex
            , maxdex, cha, maxcha, coin, bank
            , loan, weapon, toWC, armor, toAC
            , spells, poisons, realestate, rings, security
            , hull, cannon, ram, wins, immortal
            , plays, jl, jw, killed, kills
            , retreats, steals, tl, tw
            ) VALUES
            ('BLI', 'Blinky', 'No Way', 'email@address', ?
            , 720887, 'M', 717884, 0, 717884
            , 1234, 1, 0, 1, 'PC'
            , 49, 'Stranger', '', 'Spirit', 'M'
            , 1, 1, 0, 1, ''
            ,'', '', 0, '0c', ''
            ,'', 'GSPC', ',,,,,,,,,,,', 0, 0
            , 0, 0, 0, 0, 0
            , 15, 0
            , 50, 50, 50, 50, 50
            , 50, 50, 50, '1c', '10c'
            , '0c', '0', 0, '0', 0
            ,'', '', 'Alley', ?, 'Whiskey bottle'
            , 50, 0, 0, 0, 0
            , 0, 0, 0, 0, 0
            , 0, 0, 0, 0
            )

I've tried two users now and they dump out at this point.

I've just tried 'npm run game' again and I can login with the userID 'BLI' and the password 'local' as given, and it seems to continue on OK.

But, I was wondering if I've discovered a bug or if something is off on my system.

Won't parse a door.sys file appropriately if EOLs aren't \r\n

On my system, linux-based, I was struggling to figure out why I couldn't get values from user[] in main.js. I guess the array wasn't being built properly because lib.js was looking for \r\n in the split.

I modified line 141 to:

$.door = sys_1.fs.readFileSync(user).toString().split('\n');

And that helped, at least parsing the initial arguments it was looking for (comparing userID, GR for graphics mode, etc.). So I suspect there's something missing that helps DD figure out what sort of envionment it's in and how to split up the door.sys file.

DD starts as a door but seems to crash with an unhandled promise rejection

Right after seeing the Auto Message, DD gives me this:

node: (node:25000) UnhandledPromiseRejectionWarning: /home/sbbs/sbbs/xtrn/dankdomain/game/play/menu.js:78
node: if (mainmenu[choice]?.description) {
node: ^
node: SyntaxError: Unexpected token '.'
node: at wrapSafe (internal/modules/cjs/loader.js:915:16)
node: at Module._compile (internal/modules/cjs/loader.js:963:27)
node: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
node: at Module.load (internal/modules/cjs/loader.js:863:32)
node: at Function.Module._load (internal/modules/cjs/loader.js:708:14)
node: at Module.require (internal/modules/cjs/loader.js:887:19)
node: at require (internal/modules/cjs/helpers.js:74:18)
node: at Object.cityguards (/home/sbbs/sbbs/xtrn/dankdomain/game/play/taxman.js:142:9)
node: at Object.cb (/home/sbbs/sbbs/xtrn/dankdomain/game/play/init.js:429:41)
node: at _xvt._read (/home/sbbs/sbbs/xtrn/dankdomain/node_modules/xvt/lib/xvt.js:518:11)
node: (node:25000) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
node: (node:25000) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Odd issue when trying to run as a door from Synchronet

I am trying to get DD to run from Synchronet, and when launching from it, there's an issue with setEncoding, as per:

node: /home/sbbs/sbbs/xtrn/dankdomain/node_modules/xvt/lib/xvt.js:109
node: process.stdout.setEncoding(this.encoding);
node: ^
node: TypeError: process.stdout.setEncoding is not a function
node: at _xvt.set emulation [as emulation] (/home/sbbs/sbbs/xtrn/dankdomain/node_modules/xvt/lib/xvt.js:109:24)
node: at new xvt (/home/sbbs/sbbs/xtrn/dankdomain/node_modules/xvt/lib/xvt.js:96:24)
node: at new _xvt (/home/sbbs/sbbs/xtrn/dankdomain/game/lib.js:288:13)
node: at /home/sbbs/sbbs/xtrn/dankdomain/game/lib.js:341:14
node: at Object.<anonymous> (/home/sbbs/sbbs/xtrn/dankdomain/game/lib.js:342:3)
node: at Module._compile (internal/modules/cjs/loader.js:999:30)
node: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
node: at Module.load (internal/modules/cjs/loader.js:863:32)
node: at Function.Module._load (internal/modules/cjs/loader.js:708:14)
node: at Module.require (internal/modules/cjs/loader.js:887:19)

Over at pouchdb-community/pouchdb-dump-cli#12 I see a comment that says: "process.stdout.setEncoding exists when process.stdout is of type 'tty', but not when it is of type 'fs'." I'm not sure if this is the sort of thing going on here or not...

DD is being fired up with the following:
Start-up Directory is ../xtrn/dankdomain (fairly common setup in Synchronet - doors are generally in subfolders of it's 'xtrn' folder)
Command line is: node /sbbs/xtrn/dankdomain/game/main %1
(I put in the full path to try and be sure node was doing the right thing)
And there is the Mystic-style door32.sys being generated - I have altered door.sys to door32.sys in main.js

Code refactoring

In order to move forward not only with the new goals assigned for the next milestone release but also for coding sustainability issues caused by sprawl and other programming inefficiencies, this code base requires a major overhaul by separating out and regrouping classes and functions and also reducing circular dependencies. This will incur much more regression testing.

Bank depositing bug

When visiting the bank and using 'D' to deposit money, if you just hit "enter" and fail to specify a deposit amount, nothing gets deposited and all money on hand is lost.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.