nkprasad12 / dnd Goto Github PK
View Code? Open in Web Editor NEWWeb application for TTRPGs.
License: MIT License
Web application for TTRPGs.
License: MIT License
The context menu is getting really long - we should add nested menus to increase usability.
FR from Kali - we'd like to be able to do limited drawings on the canvas
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.
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"
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)
Currently, tokens are tightly linked with boards and there's no way to get a token from a different board. We need to:
Currently there's no way to select boards for editing. It's also messy AF
Currently we save to a parent directly that's hardcoded, but ideally we can write to some directory controlled by flask. See https://stackoverflow.com/questions/36649703/get-root-path-of-flask-application
Not a big deal now but a malicious client could easily make everyone fetch arbitrary blobs with the current setup by changing an imageSource
Steps:
First click dismisses the context menu
Second click selects a tile, but the context menu doesn't appear
We don't need a user model, but since this offers file upload we need to have some passcode before people can make requests.
The green selection highlight is problematic on some boards we tried.
Currently, there's no visual feedback when a token is "picked up". We already pass the right information to the View, but don't do anything with it.
Allow people to roll initiative through the chat box
We want to show how far each token can move on a particular turn.
With real time editing now enabled, we may run into some unexpected behavior if everything is sending messaged on the board namespace. It would be cleaner if each board only sends updates on the namespace that it specific to it.
This is more convenient if there's already an offset, and it's also confusing because the form won't submit until an offset is entered (though the button is green).
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
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
Especially for images, it would likely save a lot of server load to request these (and save files) from elsewhere.
For example, for tracking a fog cloud we might want to highlight a particular area with 10% opacity blue to track this
Exactly the same as add fog but not black nor opaque, so as to highlight areas such as spell effect ranges.
Make a way to place an icon (from here mayhaps https://game-icons.net/) to show status of a token. For example, a skull to show that token is dead, a bullseye to show it has hunter's mark applied, etc.
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.
Currently, fog of war state is a local only concept. We need to send fog of war changes on board updates
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.
On Board Tools, we should be able to see existing boards and mark one as Active
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.
Currently, the selection state is tightly coupled with context menu. However, in the future we may have other types of selections.
We can use the Google Sheets API to link tokens to characters and add features like run distance or dice checks
We end up having to make a lot of defensive copies anyways, and this would make reasoning about it much more straightforward.
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)
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.
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.
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
To speed up board load times, we can request images / board data from the server as soon as someone goes to the login page.
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.
Currently, this requires switching pages
We need to add a 1 tile buffer at the edges if we have a grid offset, which is not currently supported
Currently !check dexterity
or similar is not supported. The data is already present, because !save dexterity
etc works - just need to add the extra ability.
Currently we're sending JSON back and forth, but Protobufs are safer, more efficient, and have less maintenance on both sides.
We have localhost hardcoded everywhere for server requests.
We should move it all to one place (possibly under BoardServer)
Determine how to get the actual address from the server.
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)
On Board Tools, we should be able to see existing boards and mark one as Active. This should be served on the main page.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.