Opened 7 years ago

Closed 3 years ago

#4554 closed enhancement (fixed)

Show current simulation values in summary graphs

Reported by: Imarok Owned by: Toonijn
Priority: Should Have Milestone: Alpha 24
Component: UI – Miscellaneous Keywords: simple
Cc: Patch: Phab:D3395

Description (last modified by Imarok)

It would be nice to see a graph of some current simulation values in the summary, mainly population count and resource counts.

Creating a patch contains of two steps:

  1. Capture the new simulation values each times UpdateSequences is called in binaries/data/mods/public/simulation/components/StatisticsTracker.js
  2. display the values in binaries/data/mods/public/gui/summary in a way, that it gets shown in the graphs, but not in the normal summary (probably a bool like property like 'onlyShowInGraphs' needed in layout.js

Attachments (1)

resource_graph.patch (62.6 KB ) - added by Toonijn 3 years ago.
A first implementation of the resource graph and unit count

Download all attachments as: .zip

Change History (12)

comment:1 by Imarok, 6 years ago

Description: modified (diff)
Keywords: simple added

comment:2 by Imarok, 5 years ago

Component: UI & SimulationMisc. UI

Move tickets to Misc. UI as "UI & Simulation" got some sub components.

comment:3 by Toonijn, 3 years ago

I've already implemented resource count, but I'm having trouble getting population count to work.

There are two possible solutions:

  • In each statistics tick count all entities (but this is slow)
  • Keep track of all trained units and lost units (but then destroyed units are not counted)

I prefer the second solution, but don't know how to get the destroyed units as well. Does anyone has suggestions?

comment:4 by Imarok, 3 years ago

We already know the current population. (We even show it on the top bar.) So just log this in the statistics tracker and you are fine. The description of this ticket already contains some hints on how to do that. :)

If you need more feel free to ask.

(Maybe I missed it, but do you have a link to where you implemented the resource count for the summary graphs?)

comment:5 by Toonijn, 3 years ago

Not yet, I'll post a patch soon.

For the total population count, this statistic could be used. But it does not seem to contain a breakdown by unit type.

by Toonijn, 3 years ago

Attachment: resource_graph.patch added

A first implementation of the resource graph and unit count

in reply to:  5 comment:6 by Imarok, 3 years ago

Replying to Toon Baeyens:

Not yet, I'll post a patch soon.

For the total population count, this statistic could be used. But it does not seem to contain a breakdown by unit type.

I don't think we'll need to break that up by type.

And please upload your patch at https://code.wildfiregames.com

comment:7 by Toonijn, 3 years ago

Milestone: BacklogWork In Progress

I added a patch that adds these new graphs (available resources and population count): Phab:D3395

I would like to see the unit beakdown, but for now I think this fixes this issue.

comment:8 by Imarok, 3 years ago

Patch: Phab:D3395

comment:9 by Silier, 3 years ago

Owner: set to Toonijn

comment:10 by Freagarach, 3 years ago

Milestone: Work In ProgressAlpha 24

Also refs. #5940.

comment:11 by Freagarach, 3 years ago

Resolution: fixed
Status: newclosed

In 24721:

Add resource and population counts to the summary screen.

Patch by: @toonijn
Differential revision: D3395
Fixes: #4554
Reviewed by: @Freagarach, @wraitii
Comments by: @Angen, @Imarok, @Stan

Note: See TracTickets for help on using tickets.