Loading...
  OR  Zero-K Name:    Password:   

Suggestion- highlight your line in the end-of-game graphs

10 posts, 685 views
Post comment
Filter:    Player:  
sort
3 years ago
For the results of large team games where there can be up to 32 lines close-together on the graph, you have to squint and look for your line. To make it harder because there are only so many basic colours there will be other lines the same colour but a different shade.

What if your line could be highlighted some way? Maybe flash a little, or flash if you press a key on the keyboard if you want help finding it quicker?
+6 / -0
Probably the easiest way would be to have a white outline around your line. Doesn't require any animations or anything, just provides a bit of extra contrast on the black background to highlight your line. Likely implementation would be drawing your line an extra time with more thickness in white, before the teamcoloured line.

I'm experimenting a bit with an implementation of this, it works fine to highlight the line, but I've been trying to also make one's own line be always on top, which I haven't figured out how to do yet (it should be simple, but it's not working out).
+2 / -0
3 years ago
As a colorblind player, it takes me a lot of time to associate each player to it's color on the graphs. Highlighting feature would be very helpfull. Another possibility is to differ similar colors by using, for example, dotted lines instead of the usual continuous ones.
+2 / -0
The ability to select a player and highlight their line is probably more generally useful. More work, though.
+2 / -0
Well, if selecting the player just means clicking on their name in the player list that would probably simply a matter of having an MouseClick handler associated with the chili label (though I'm not entirely sure how to do that), that sets the to-be-highlighted player id. If selecting the player means clicking on their line in the graph, then it would be a lot harder, and probably require some work just to set up the data structures in a way that doing the hit tests on the graph lines isn't ludicrously expensive.
+1 / -0

3 years ago
I was definitely thinking of the first of those options.
+2 / -0
Well, that's entirely a question of figuring out how to have it know when the name has been clicked on, and which one it is. Everything else is just a question of setting fields that my current PR has already defined as file-local.

Update: It took some doing, but the current PR now has the ability to select player names in the stats graph, and have their line highlighted.
+1 / -0


3 years ago
Sounds good. Registering MouseClick for a label should work. See how the resource bars do it for reserve.
+2 / -0


3 years ago
It would be nice if it was like in Age of Empires 2 where holding the mouse over a line would show the y-value of that x-coordinate for the closest line to the mouse cursor.
+1 / -0
That would be nice, and I thought about that myself, but I also don't currently have the time to set that up, since I expect that would involve a lot of work to do the hit tests/stat array search at a reasonable speed.

EDIT: on second thought, there is an O(1) way to do this, at least for the selected player (O(n) for any player): Since the values are stored in an array that gets entries with a fixed time interval between them, you could take the mouse x coordinate relative to the graph, divide by width (to get a value between 0 and 1), multiply by the number of entries in the array used to populate the graph to get an index and a fractional part. Use the index and the index + 1 to get the two bounds of the desired point, and interpolate between them with the fractional part to get the value of the graph at the given time/mouse x coord.

It's a bit involved, but it should scale optimally with graph length/game time.

If it isn't limited to the selected player, then you'd have to do this for every line, and compare the resulting values with the mouse y coordinate to find the nearest one, which becomes a possible dev time sink if we want it to scale better than linearly with number of players, but it would only be doing at most 30 or 40 comparisons every time the user moves the mouse (average case would be 2 or 3 if we order the lines by y value and do the same trick as the x-axis thing above and ditch early once y values get further away from the mouse than what we've currently found, though ordering the lines by y value would be the tricky part optimization-wise), so that's not the worst performance loss
+1 / -0