Improve the goto lines

Contribute, display and discuss art and tilesets for use in Freeciv here.
Post Reply
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Improve the goto lines

Post 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 9015 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 9015 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.
jwrober
Posts: 35
Joined: Thu Jul 11, 2019 2:05 pm

Re: Improve the goto lines

Post 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.
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Improve the goto lines

Post 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.
XYZ
Elite
Posts: 432
Joined: Fri Jan 31, 2014 12:00 pm

Re: Improve the goto lines

Post 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.
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Improve the goto lines

Post 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.
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: Improve the goto lines

Post 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.
jwrober
Posts: 35
Joined: Thu Jul 11, 2019 2:05 pm

Re: Improve the goto lines

Post 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:
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Improve the goto lines

Post 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-)
Post Reply