Skip to content

Add square highlights and arrow drawing on the chessboard #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tsevasa opened this issue Jul 31, 2024 · 6 comments
Open

Add square highlights and arrow drawing on the chessboard #149

tsevasa opened this issue Jul 31, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@tsevasa
Copy link
Contributor

tsevasa commented Jul 31, 2024

Right-clicking on a square should highlight it, while dragging right-click should draw an arrow from the destination to the end, like on chess.com.

@Naviary2 Naviary2 added the enhancement New feature or request label Jul 31, 2024
@Naviary2
Copy link
Member

Yes! My thoughts are there would be 2 modes for the right-click drag action. The first mode as you described above will draw arrows. The 2nd mode will draw "rays". Those are basically infinite lines of highlighted squares, which would be very useful for analyzing positions and diagonals!

@Naviary2
Copy link
Member

Naviary2 commented Aug 2, 2024

I had another idea, what if by default the mode for right-click drag was to draw arrows, but double-right-click-drag drew rays? That would avoid having us to add a UI button for toggling your mode!

And on top of that, what if triple-right-click just auto-drew rays coming out of all directions centered on the square! Maybe not the most useful.. but I imagine lining up hippogonals with knightriders would be so much easier if on demand you could highlight all lines that you can check a piece on.

@BF5258
Copy link
Contributor

BF5258 commented Aug 17, 2024

Chess.com stores highlighted squares separately for each move, allowing the move history to be annotated. This could be useful for analyzing games, but personally, I've never used it.

Should past highlights be stored or only present?

Screen.Recording.2024-08-17.104214.mp4

@Naviary2
Copy link
Member

Should past highlights be stored or only present?

That's a good question... My thoughts are lining up attacks may take several moves, so deleting them every move may be troublesome. Highlighting squares in Infinite Chess serves more to help you line up attacks, vs in classical chess, highlights more-so helps when speaking/streaming to an audience?

@BF5258
Copy link
Contributor

BF5258 commented Aug 19, 2024

If the user tries to highlight a square with a second color, should it mix or be overridden?

The colors might need adjusting though. The blue + yellow doesn't look so great.

@Naviary2
Copy link
Member

If the user tries to highlight a square with a second color, should it mix or be overridden?

I think multiple highlight lines intersecting should mix, because it will emphasize the intersection squares! I'm all for having toggle-able colors on say local, or an analysis mode, since it could be quite creative to make art with this! 🎨 Let's make it compatible with multiple colors. For online mode though we should probably stick with 1 color, determined by the theme.

@Naviary2 Naviary2 mentioned this issue Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants