Skip to content

Tactical Paint #6725

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
wants to merge 64 commits into
base: develop
Choose a base branch
from
Open

Tactical Paint #6725

wants to merge 64 commits into from

Conversation

4z0t
Copy link
Member

@4z0t 4z0t commented Apr 9, 2025

This feature adds ability to draw lines in the worldview which teammates can see. (I'm bad and describing things xd)
It is possible thanks to this binary patch.
tp

Description of the proposed changes

  • Adds canvas mode where you can draw lines with color of player's army.
  • These drawings are shared between teammates.
  • When in paint mode you can draw lines holding left mouse button and erase them holding right mouse button.
  • You can mute specific player if one annoys you.
  • Can be turned off completely (it is by default)
  • These drawings are left in replays, so, mind what you draw.
  • You can adjust duration of your drawings with maximum of 1 minute.
  • Observers see these between each over and can draw their own.

Testing done on the proposed changes

  • With setup of 4 players 2 for team.
  • With replay of previous game.

Checklist

  • Changes are annotated, including comments where useful
  • Changes are documented in the changelog for the next game version
  • Add replay sync
  • Add mute ability
  • Allow hiding all drawings
  • Optimize network usage
  • Make lines decay

@4z0t 4z0t marked this pull request as draft April 9, 2025 16:09
@4z0t 4z0t requested review from Garanas, lL1l1, speed2CZ and Basilisk3 April 9, 2025 16:10
@4z0t 4z0t added area: ui Anything to do with the User Interface of the Game feature: painting related to the painting ability labels Apr 9, 2025
Copy link
Member

@Garanas Garanas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall - looks exciting!

Overall a few code style suggestions:

  • Classes should reside in their own files. If you do not do this they can become impossible to hook properly (hello collection of unit, weapon and projectile classes files).
  • There's some hooks directly into the worldview class in the Main function. Probably best to just add the logic to the worldview class itself.

And it appears (based on your video) that besides painting, you can also remove lines. I understand the idea, but does it not make it needlessly complex from all directions? More complex to implement. More complex to sync. More complex to maintain. More complex to moderate in case people make weird drawings...

What if instead we just only provide the ability to draw lines and then they fade out relatively quickly?

@4z0t
Copy link
Member Author

4z0t commented Apr 9, 2025

And it appears (based on your video) that besides painting, you can also remove lines. I understand the idea, but does it not make it needlessly complex from all directions? More complex to implement. More complex to sync. More complex to maintain. More complex to moderate in case people make weird drawings...

What if instead we just only provide the ability to draw lines and then they fade out relatively quickly?

I think it may cause some unwanted cases when you draw something important and It disappears. I understand that logic may become overcompilcated, but it is worth to do for such feature.

@Garanas
Copy link
Member

Garanas commented Apr 10, 2025

I think it may cause some unwanted cases when you draw something important and It disappears. I understand that logic may become overcompilcated, but it is worth to do for such feature.

I don't agree. A lot of features in FAF are too complicated for what they need to be. And it reduces the ability to maintain it and the ability make improvements based on feedback.

As an example, this is all that you can do in Dota 2:

Of course, in Dota it only lingers for seconds. We could keep it for 10-20 seconds.

@4z0t
Copy link
Member Author

4z0t commented Apr 15, 2025

This is also related.

@4z0t 4z0t marked this pull request as draft April 16, 2025 07:30
@4z0t 4z0t marked this pull request as ready for review April 17, 2025 12:46
Copy link
Contributor

@lL1l1 lL1l1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minimum distance is too low so it's hard to draw with precision. For example I find it difficult to draw an arrow head, or to circle a mex spot when zoomed in
I had to take some time to find what the actual minimum distance is calculated from in Canvas.lua

local offset = zoom / 100

I would make that 100 value a local variable so it can be adjusted easily just like minDist. Same for the 50 value used for the eraser radius.
It would also be nice to have a line connecting to your cursor while you are drawing. The line would be "placed" once it is longer than minDist or when drawing ends.

4z0t and others added 11 commits April 18, 2025 12:21
@Garanas Garanas linked an issue Apr 18, 2025 that may be closed by this pull request
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ui Anything to do with the User Interface of the Game feature: painting related to the painting ability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project - Painting feature
3 participants