doodlezucc / dungeonclub

A cool little website for playing Dungeons & Dragons together!
https://dungeonclub.net
MIT License
66 stars 11 forks source link

Additional Movable Commands #8

Closed DerinGoulartUlcay closed 1 year ago

DerinGoulartUlcay commented 1 year ago

Greetings!

First of all, thank you for developing and sharing this awesome website with the world!

I briefly attempted to contribute some features on my own but seem to lacking an understanding of how to navigate the dart file ecosystem. Would you be so kind as to either reply with a brief explanation on how to alter movable token commands or help implement the following features?

User submitted feature request #1: Movable Token Rotations

Possible implementations: (preferred) When token selected, make Alt+Left Mouse Click rotate the token character (originally the bottom side) towards the pointer position or When mouse pointer on movable token, make Ctrl or Shift + Left Mouse Drag rotate the token

User submitted feature request #2: User Movement Sequencing Similar to the Measurement Tool

Possible implementation: When moving a token, make Right Mouse Click leave a point that becomes the new next measurement origin, the cumulative distance is displayed

Thanks again for this beautiful tool!

Best regards, Derin

doodlezucc commented 1 year ago

Hi there, thanks for your feature request!

Right, so token rotation is something I hadn't thought of before but which is actually a great addition to the VTT. Kudos for your proposed implementations :) Regarding the second request, I agree distance pins really should be possible when moving tokens across the board to further consistency and overall ease of use.

I'll admit the source code may be a mess to get into right now due to a lack of inline documentation (:trollface:) - sorry about that. I'll have a look at implementing your preferred proposals for the next update and maybe work out some code comments on the way.

Cheers!

DerinGoulartUlcay commented 1 year ago

Thank you very much for the quick reply, I appreciate your hard work!

doodlezucc commented 1 year ago

Hi, your features have been implemented and can be tested at dungeonclub.net right now :) If you've got ideas on how to improve them, let me know.

Cheers!

DerinGoulartUlcay commented 1 year ago

Hello!

Thank you for implementing the changes promptly, right on time for the holiday season :)

The distance pin implementation feels great! As for token rotation, I think it is also a fine addition. I checked it on all the grid types and I like that you have chosen a snapping rotation for the gridded maps and to pointer position for the ungridded map. I have a few questions:

Thank you and happy holidays!

doodlezucc commented 1 year ago

Hi, regarding your questions:

Fortunately, these changes are only frontend related, which means that you can expect to see them on the website later today :)

doodlezucc commented 1 year ago

Come to think of it, how do you think tokens that aren't snapped to the grid should be rotated? Should the rotation still snap towards an actual center of a grid cell, or should we fallback to the way rotations are currently done (e.g. simply snapping to any 45° angle on a square grid)?

Unsnapped token inbetween to grid cells

DerinGoulartUlcay commented 1 year ago

This is a great question! I see value in both your propositions: I think being able to face a grid cell makes more sense while story telling but alligning the token with the grid would indeed be a bit circuitous (first allign position, then rotate, then position back). A few ways you could approach this would be: (with my opinion in parenthesis)

doodlezucc commented 1 year ago

Hey, I've given your first proposed approach a try and it does feel pretty good in my opinion. The changes are visible on the website right now. What are your thoughts?

DerinGoulartUlcay commented 1 year ago

Feels great! Thank you!