Skip to content
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

Automap Line Thickness Option #1933

Open
OpenRift412 opened this issue Oct 1, 2024 · 7 comments
Open

Automap Line Thickness Option #1933

OpenRift412 opened this issue Oct 1, 2024 · 7 comments

Comments

@OpenRift412
Copy link

In the Kex remaster, there's an option that allows you to adjust the thickness of lines displayed in the automap. I think this would be a nice feature to have for those playing at higher resolutions that want better automap visibility.

There are essentially two ways that this could be implemented:

  1. Depending on the multiplier, the automap screen resolution will be lowered, thus resulting in thicker lines.
  2. Apply a sort of integer scale to automap line thickness. This is how the Kex version does it.

In both cases, the max factor in which you can increase line thickness should be dependent on the set resolution. For example, at 200p, you're stuck at 1x thickness, at 400p, you can max out at 2x thickness, etc.

@NightFright2k19
Copy link

If there should be a manual way to adjust this, the steps should have .1 intervals since you quickly end up with the lines being too thick.

@fabiangreffrath
Copy link
Owner

Proof of concept:

--- a/src/am_map.c
+++ b/src/am_map.c
@@ -1471,7 +1471,40 @@ static void AM_drawMline
     color=0;
 
   if (AM_clipMline(ml, &fl))
+  {
     AM_drawFline(&fl, color); // draws it on frame buffer using fb coords
+
+    if (abs(fl.a.y - fl.b.y) > abs(fl.a.x - fl.b.x))
+    {
+      if (fl.a.x > 0 && fl.b.x > 0)
+      {
+        fl.a.x--;
+        fl.b.x--;
+        AM_drawFline(&fl, color);
+      }
+      else if (fl.a.x < f_w - 1 && fl.b.x < f_w - 1)
+      {
+        fl.a.x++;
+        fl.b.x++;
+        AM_drawFline(&fl, color);
+      }
+    }
+    else
+    {
+      if (fl.a.y > 0 && fl.b.y > 0)
+      {
+        fl.a.y--;
+        fl.b.y--;
+        AM_drawFline(&fl, color);
+      }
+      else if (fl.a.y < f_h - 1 && fl.b.y < f_h - 1)
+      {
+        fl.a.y++;
+        fl.b.y++;
+        AM_drawFline(&fl, color);
+      }
+    }
+  }
 }
 
 //

@rfomin
Copy link
Collaborator

rfomin commented Oct 4, 2024

This is how KEX automap lines look when the thickness is set to "auto" and the resolution is 3x:

image

So I guess we have to draw several lines to achieve the same effect? They also have a nice new player_arrow.

@OpenRift412
Copy link
Author

So I guess we have to draw several lines to achieve the same effect? They also have a nice new player_arrow.

Maybe? Not sure how that would be done while preventing gaps between the "thickening lines".

Personally not a fan of the new player_arrow lol

@bangstk
Copy link

bangstk commented Oct 5, 2024

This is just an opinion, but I think kex's "auto" setting is too thick, targeting the approximate thickness of 320x200. it makes more complex maps hard to read. If woof adds an auto setting I think it should shoot for the approximate thickness of 640x400 or 960x600 instead.

@JNechaevsky
Copy link
Collaborator

Agreed with @bangstk. Just have a look at NERVE's Map01 or any other heaviliy detailed maps, such bold lines are doing bad job rather than good one. Probably Fabian's approach is the most optimal one, even with MAX resolution 2x lines are giving neat and clean view of the map structure.

@NightFright2k19
Copy link

You could go for 1.5x in 1080p, possibly a bit lower, and 2x for 1600p and higher. I can't see it in front of me now, though. The distinction could be made earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants