Page 1 of 1

Improve the goto lines

Posted: Wed Aug 07, 2019 10:54 pm
by louis94
I implemented some changes for the Freeciv client. One of them allows tilesets to customize the goto lines, so we can have something richer than the traditional blue lines. I changed the Trident lines to be smoother and feature small arrows:

Screenshot_20190808_003948.png
Screenshot_20190808_003948.png (109.17 KiB) Viewed 2782 times

I also gave a try at specific goto lines for wheeled units. Here we have a cannon selected (without arrows this time):

Screenshot_20190808_004151.png
Screenshot_20190808_004151.png (97.37 KiB) Viewed 2782 times

In this thread I'd like to collect ideas on how to improve the display of goto lines. This is valid for all tilesets, not only Trident.

Note: this feature has a long way to go and will probably only make it to 3.1.

Re: Improve the goto lines

Posted: Mon Aug 12, 2019 2:39 pm
by jwrober
Is this only a graphic thing or a functionality request? Reason I ask is one pet peeve I have is when I have two sea units stacked (e.g. a transport and a destroyer) and want both to goto the same location "together", the game will send on different paths to same location via two goto lines drawn on the map. Is there a way to "fix" this issue along with how they look?

I like the arrows view on first picture. Really helps to show where the units are headed. Especially if you come back to them a couple turns later to middle click to see where they are going.

Re: Improve the goto lines

Posted: Mon Aug 12, 2019 2:52 pm
by louis94
jwrober wrote:Is this only a graphic thing or a functionality request?

The code is working (not submitted yet), this is basically a request for comments/contributions on the graphics. I may change the code based on comments I get.

jwrober wrote:Reason I ask is one pet peeve I have is when I have two sea units stacked (e.g. a transport and a destroyer) and want both to goto the same location "together", the game will send on different paths to same location via two goto lines drawn on the map. Is there a way to "fix" this issue along with how they look?

With the smoothed corners it looks a bit better, but I agree it's weird:
Screenshot_20190812_164952.png

I have no idea how to improve the path finding code to avoid this situation.

jwrober wrote:I like the arrows view on first picture. Really helps to show where the units are headed. Especially if you come back to them a couple turns later to middle click to see where they are going.

I was afraid they would catch attention too much. I got used to them very quickly but others may not.

Re: Improve the goto lines

Posted: Sat Aug 17, 2019 9:42 am
by XYZ
I like the arrows view on first picture. Really helps to show where the units are headed. Especially if you come back to them a couple turns later to middle click to see where they are going.


One of them allows tilesets to customize the goto lines, so we can have something richer than the traditional blue lines.


I like it very much!

Is there a way also to implement an arrow indicating where an enemy unit came from for Trident and Amplio? With Cimpletoon you have the advantage to know which direction the unit came.

Re: Improve the goto lines

Posted: Sat Aug 17, 2019 10:47 am
by louis94
XYZ wrote:Is there a way also to implement an arrow indicating where an enemy unit came from for Trident and Amplio? With Cimpletoon you have the advantage to know which direction the unit came.

If you're OK with them being visible all the time, it can already be done by using oriented unit sprites, just like Cimpletoon does. It shouldn't be too difficult to show something on middle click, I'll look into it.

Re: Improve the goto lines

Posted: Sat Sep 14, 2019 6:37 pm
by Ignatus
jwrober wrote:Reason I ask is one pet peeve I have is when I have two sea units stacked (e.g. a transport and a destroyer) and want both to goto the same location "together", the game will send on different paths to same location via two goto lines drawn on the map. Is there a way to "fix" this issue along with how they look?

I may guess that it is somehow connected to the function prefer_short_stacks() that is a part of goto advisor. Maybe this function is also responsible for the infaous inability of AI to move units in reasonable attacker-defender stacks.

Re: Improve the goto lines

Posted: Thu Sep 19, 2019 1:58 pm
by jwrober
Ignatus wrote:I may guess that it is somehow connected to the function prefer_short_stacks() that is a part of goto advisor. Maybe this function is also responsible for the infamous inability of AI to move units in reasonable attacker-defender stacks.


I was poking through bugs on HRM but can't seem to locate anything related to this. Maybe its a feature :lol:

Re: Improve the goto lines

Posted: Thu Sep 19, 2019 2:12 pm
by louis94
jwrober wrote:
Ignatus wrote:I may guess that it is somehow connected to the function prefer_short_stacks() that is a part of goto advisor. Maybe this function is also responsible for the infamous inability of AI to move units in reasonable attacker-defender stacks.


I was poking through bugs on HRM but can't seem to locate anything related to this. Maybe its a feature :lol:

The code can be found in a branch of my Github repo. It needs some cleaning up before I can send patches. I'll start sending them once I'm done with rally points since this is somewhat connected 8-)