I've take the liberty of writing a patch that makes the movelines follow the height of the map. That way they won't disappear into mountains or other high objects.
Here's what it looks like:
And here's the diff file.
It doesn't work for the commander yet; I guess his commands are drawn somewhere else. And only the move command is drawn this way. But extending it to other commands should only be a matter of copy-and-paste.
Its drawn in CBuilderCAI instead of CMobileCAI for commanders and other build vehicles. Otherwise it looks good although it might become a bit slow with many units selected maybe.
When many units are selected and they share a common destination, they shoudltn all ahve their own line, instead a polygon should be drawn around then and then a single line from the group polygon to the destination
or in the case fo simple formation polgyon to polygon. The polygon should be either a circle or rectangle.
You're right SJ. I've just tested it with 250 jeffies going from one corner of the map to another. When I didn't hold down shift I got 31 fps, but with shift pressed only 7 fps remained. Mind you I have a slow pc (P3 866Mhz).
The only obvious way to speed up the algorithm I wrote is to make the numbers of divisions lower, i.e. change
Thats probably the easiest way gnome. Just need to turn of depth testing and writing while drawing. Only question is if one should let it draw above units and particles or only above terrain.
To save my work from perishing I tweaked the algorithm a bit. The diff file has been updated appropriately. I now only drop from 31 to 15 fps instead of 7 :).
And for the curious among us I've uploaded a custom exe.
You're right SJ. I've just tested it with 250 jeffies going from one corner of the map to another. When I didn't hold down shift I got 31 fps, but with shift pressed only 7 fps remained. Mind you I have a slow pc (P3 866Mhz).
Did you test it with the old algorithm when holding down shift with 250 jeffies? It's drawing the lines that takes time not the algorithm itself, I believe.
I prefer having individual lines for units, because often my selection groups are very wide, or perhaps I have groups from numerous directions. It is likely that the selection would become increasingly inaccurate as my forces spread out.
A way to include your idea is perhaps to allow group lines for units in formations, or set to hotkey groups
-------------
On a different tangent, I'd personally like to see ETA values displayed on the shift lines. This doesn't necesserily have to be an actual clock function that counts down the seconds until a unit arrives at its target; it could be the colour of the line. You could have two primaries at either end of the spectrum, and as the line goes from one to the other, it indicates that the unit is closer (ETA wise) to its target. For example, say a yellow line indicates a unit is still 2+ minutes from its location, an orange line indicates that the unit is near its location, and a red line indicates that the unit's arrival is imminant. Useful for coordinating attacks from different points, keeping track of your units progress, making sure your units arrive at the same time (for example, launch your bulldogs, and when their line is yellow, launch the flashes), as well as being particularly useful with faster units (aircraft especially), whose ETA is difficult to estimate.
Although, if it chews into the CPU, disregard the idea.
Warlord, that can eb fixed by allowing multiple boxes. So lets say the box is hgue and there's a wide range of units, or two main clumps far apart both selected, then that box should be split into 2 boxes/circles and re-orientated so it fits better. And if units are randomyl spread and selected over a large area then perhaps the old way should go though it'd likely slow down.
So rephrasal. Units selected that're close to eachother should have a box or circle drawn around them with their line coming from the face of that box that faces the target rather than a line for each. Units tht are sparsely placed that're selected should use the current system. Both box/circled untis and ordinary sparsely placed units would have the patch above applied to them so they dotn dip below the terrain.
Does that suit better?
And I like the ETA and coloured lines thing, if ti does eat into cpu then it should be on offable. It would work well with the above suggestion too, and could be made to work specifically for those untis that are clumped together and selected and have the circle/box around them.
I can't test the patch right now but still I have a comment.
Can the lines follow the actual path the unit is going to use?
I mean around obstacles like water, buildings and hi ground?
ETA is a great idea imo.
Why not have a dynamic line divisions relative to the FPS?