GithubHelp home page GithubHelp logo

dnd's People

Contributors

manojprasad11 avatar nkprasad12 avatar reidanderson avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

dnd's Issues

Nest menus

The context menu is getting really long - we should add nested menus to increase usability.

Active board needs to update the saved board

The active board updates needs to update the board sent out on board-get-response.

Possible strategy here is:

On the first request, load the board into memory.
On updates, update the board in memory.

Add line drawing feature

SHIFT+click puts down an anchor point, hold SHIFT, click again to end line, line becomes independent token that can be moved (probs cant move the same as you have tokens now cuz they snap tho); if shift is released after anchor point, then it drops the "draw line mode"

Cache the active board state in memory

Currently we write to file on each change. Ideally we would handle this in memory until a new active board is selected, or after (say, 1 minute without updates)

Make tokens independent from boards

Currently, tokens are tightly linked with boards and there's no way to get a token from a different board. We need to:

  1. Rethink what a token is (currently, TokenModel has a location baked in).
  2. Update the storage model (we need to have a separate DB of tokens)
  3. Figure out a UI for managing tokens / adding tokens

Scrolling away from context menu causes issues

Steps:

  1. Load a large board
  2. Click on a tile to open context menu
  3. Scroll away from the context menu so it's out of reach
  4. Try to click again

First click dismisses the context menu
Second click selects a tile, but the context menu doesn't appear

Add password protection

We don't need a user model, but since this offers file upload we need to have some passcode before people can make requests.

Add smarter "complete" functionality

I went through and basically rerolled everything from the last session for Eberk. Everything looks like it was working, the only thing that I found is that Avrae in discord was able to identify which rapier I was talking about when I did !attack rapier, but dnd could not.

image

Deploy app to the internet

Need to get a domain, and either figure out how to expose my local machine publically or figure out how to containerize and deploy it

Make the context menu more contextual

For example - when right clicking a token, don't show FOW options or create token options, only edit. Or for tiles that are all clear, don't show clear FOW

Add Area-of-Effect toggle

Exactly the same as add fog but not black nor opaque, so as to highlight areas such as spell effect ranges.

Add more robust synchronization mechanism

Currently, there's no way for clients to check that their initial board state matches the server state. One problem is that between a join board and when the board is set up, the client may miss some updates.

One idea is to add a simple version counter with each diff so the client can request intermediate diffs between the first join request and when they were able to register for updates.

Add spell lookups

We can find DnD spell data (e.g here: https://github.com/jcquinlan/dnd-spells) and add a command (say !spell or !lookup) to get spell information right in the chat window.

This will probably require smarter searching (better than just prefix completing) to be useful, though.

Get server configuration from config file

In particular, the secret key needs to be moved out of version control. In addition to this, it would also be good to move out some of the other variables that are - hardcoded to my dev machine.

Make BoardModel immutable

We end up having to make a lot of defensive copies anyways, and this would make reasoning about it much more straightforward.

Defer cloud backups for background

Currently, we block each image POST on the cloud backup completing. However, we can do that on a schedule (or even just immediately after the image is served)

Image uploads require credentials

All HTTP requests except login now require credentials to prevent abuse. However, we need username / password for image upload.

From the login form, we need to pass the credentials on to the rest of the app. We may be able to do this in the http response and save it on the client side as we pass objects around.

Add zoom feature

One option here would be to use the Canvas Context scale function. However, we would need to be careful to make sure the tile calculations remain correct.

Crash during gameplay

2021-03-07T00:58:47.980945+00:00 app[web.1]: Attempting to upload /app/data/images/test.jpg to DenJonver/data/images/test.jpg
2021-03-07T00:59:09.009533+00:00 app[web.1]: [board-update] [object Object]
2021-03-07T00:59:09.012777+00:00 app[web.1]: webpack://test/./src/common/board/remote_board_model.ts?:98
2021-03-07T00:59:09.012778+00:00 app[web.1]: if (!['0', '1', '2'].includes(maybeModel.fogOfWar[0][0])) {
2021-03-07T00:59:09.012779+00:00 app[web.1]: ^
2021-03-07T00:59:09.012779+00:00 app[web.1]:
2021-03-07T00:59:09.012780+00:00 app[web.1]: TypeError: Cannot read property '0' of undefined
2021-03-07T00:59:09.012780+00:00 app[web.1]: at Function.isValid (webpack://test/./src/common/board/remote_board_model.ts?:98:58)
2021-03-07T00:59:09.012781+00:00 app[web.1]: at Function.isValid (webpack://test/./src/common/board/remote_board_model.ts?:225:35)
2021-03-07T00:59:09.012781+00:00 app[web.1]: at eval (webpack://test/./src/server/routes/socket/board_socket.ts?:51:55)
2021-03-07T00:59:09.012781+00:00 app[web.1]: at Socket.eval (webpack://test/./src/server/routes/socket/board_socket.ts?:117:13)
2021-03-07T00:59:09.012782+00:00 app[web.1]: at Socket.emit (events.js:315:20)
2021-03-07T00:59:09.012783+00:00 app[web.1]: at /app/node_modules/socket.io/dist/socket.js:435:32
2021-03-07T00:59:09.012783+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:75:11)
2021-03-07T00:59:09.032261+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-03-07T00:59:09.032629+00:00 app[web.1]: npm ERR! errno 1
2021-03-07T00:59:09.040340+00:00 app[web.1]: npm ERR! [email protected] start: node -r dotenv/config build/server.bundle.js
2021-03-07T00:59:09.040487+00:00 app[web.1]: npm ERR! Exit status 1
2021-03-07T00:59:09.040639+00:00 app[web.1]: npm ERR!
2021-03-07T00:59:09.040764+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script.
2021-03-07T00:59:09.040909+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-03-07T00:59:09.046067+00:00 app[web.1]:
2021-03-07T00:59:09.046223+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-03-07T00:59:09.046227+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-03-07T00_59_09_041Z-debug.log

Improve tile experience in board tools

  1. We need to make this interactive, so the user can enter a tile size and see the effect
  2. We need to add an offset for grids that don't have tiles starting at 0,0

Move RemoteX models into X

This will reduce the duplicate fields and make adding new features easier. It'll also cut down on unneeded memory allocations for the FOW and highlight arrays.

Determine how to handle hardcoded localhost

We have localhost hardcoded everywhere for server requests.

  1. We should move it all to one place (possibly under BoardServer)

  2. Determine how to get the actual address from the server.

Add peek mode

Peek mode should should fog at low opacity and be visible only to user (not shared state). In the main board, this should appear in the context menu for foggy tiles. In board tools,we want this to auto-enabled (P2)

Add "Active Board" concept

On Board Tools, we should be able to see existing boards and mark one as Active. This should be served on the main page.

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.