View Issue Details

IDProjectCategoryLast Update
0019555AI War 2GUIAug 22, 2018 12:20 pm
ReporterBadgerBadger Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version0.718 
Fixed in Version0.759-0.760 Only The Start of Discovery 
Summary0019555: Stats window
DescriptionI really want some numbers on "I killed 500 Mark 1 fighters, 200 Mark III bombers. I lost 250 mark 1 missile corvettes but only 100 mark II bombers" that I can see. It doesn't need to be super pretty. I think collecting the data should be pretty straightforward. What I'd ideally want is to have a "Stats" button I could activate (say next to "Save Game" or "Setting"), which I could populate with data.

Ideally I'd take a tabs (one per faction, then for each faction a "Ships Built" and a "Ships Killed" toggle), then also the ability to generate a grid for each one. I could probably generate the grid myself as long as I could place suitable text.

The "Ships built" grid would look something like
Human Player
                  | Number Built | Metal spent Building
Ship Type:


The Casualties type would look like

Human Player

                                     Number Killed | Total metal cost to build those ships
Ship Type For Faction A
Ship Type For Faction B
....
Ship Type Total

I think it should be straightforward to generate those totals. I think I see how I might have done this in the old UI regime, but I don't really know the new one...
TagsNo tags attached.

Activities

etheric42

Mar 30, 2018 12:00 am

manager   ~0047334

I think something like this if it were to be added to be actionable information would be best handled like those info metal production popup, showing a line graph of metal history... a line graph of ships created/destroyed? Otherwise how do you know if you lost X ships last fight versus this fight. If it is just a "fun facts" section, it wouldn't need it. But it would be useful to look at graph and see "there's where I lost all my bombers...".

Chris_McElligottPark

Mar 30, 2018 10:09 am

administrator   ~0047335

I have graphing middleware that I can easily plug in that is AWESOME. However, for that to work we have to have the data, and tracking data that is graphable without overloading the save file would be hard.

My suggestion, after thinking about this the last few weeks, is that we do the following (pseudocode):

public class TemporalDataStuff
{
  int UnitsKilled, CorvettesBuilt, CorvettesKilled, MetalSpent, MetalGained, Etc
}

Then basically we have a List<TemporalDataStuff>(), and every time one of those things happens, we write to the most recent one.

A new one gets created on the following milestones:
- When there isn't one at all (aka second one of loading an existing save or starting a new game).
- Every minute after that for the first 5 items.
- Every 5 minutes after that for the next... 5 items? Something like that.
- Every 10 minutes after that for the next 3 items.
- Every 15 minutes after that for the next 8 items.
- Every 20 minutes after that for the next 9 items.
- Every 30 minutes after that for the next 10 items.
- Every 60 minutes after that from then on.

So basically the early game will have much more detailed snapshots, but the total numbers at game end will be accurate either way. The graph will get progressively more coarse as it moves from left to right, though.

etheric42

Mar 30, 2018 12:49 pm

manager   ~0047339

That sound good, another idea would be to compact older information.

Move to the new line every 5 (or 10) minutes. After 90 minutes (18 records) take the first 60 minutes (12 records) and sum them down to a single record. Do this every 60 minutes from then on. Giving you the most recent 30 minutes of detailed data plus course older data throughout your playthrough.

BadgerBadger

Mar 30, 2018 1:17 pm

manager   ~0047340

Last edited: Mar 30, 2018 1:21 pm

The first thing I can get is ships killed/lost totals for the whole game. That seems like a place to start, and it would generalize nicely (I could keep a list of "total so far" snapshots at time intervals, which gets you the data you want reasonably enough); would that be enough to make using your middleware interesting?

Chris_McElligottPark

Mar 30, 2018 7:53 pm

administrator   ~0047341

Eric: I like the compacting of old info idea, that would work even better -- thanks for that. :) The extra weighting on more recent stuff is better for sure.

Badger: As far as ships killed/lost, either totals or by type: sure, I can work with that. I was thinking of curved line graphs for the time-based things, but then we can also do some nice bar graphs (sorted or not) for things like what you are describing. Doing both is definitely a thing we can do with a fair bit of ease.

BadgerBadger

Mar 30, 2018 8:38 pm

manager   ~0047342

I can get you data for a bar graph for "Things you killed" sorted by faction (so it can track AI 1 vs AI 2 vs other faction), "Things you killed overall, regardless of faction", as well as "Ships you lost". I can get the numbers and the total metal costs.

I'll get that working with some sample "Here's how to access all of it", then you can generate the graphs at your leisure.

Chris_McElligottPark

Apr 2, 2018 10:33 am

administrator   ~0047343

Sounds perfect to me. Thanks!

And to me, this is something that we should be able to access at any time, not just game end. It's the sort of thing that provides important decision-making abilities earlier on in. We had this back in the pre-4.0 days of AI War Classic, but never ported it to unity because it was very hard at the time. It was always one of those things I really liked.

BadgerBadger

Apr 2, 2018 11:56 am

manager   ~0047344

Yeah, what's checked in now is code that can tell you Total Casualties Inflicted and Total Losses for each faction at any time. So if (say) you wanted to know how many ships the Devourer has eaten, you'll be able to find out.

I agree that it would be useful (or at least fun/interesting/cool) to see whenever you want in game. There's some example code showing how to access it, but I can give you a better interface if you tell me what exactly what you want.

I'll eventually get some stuff in for stats in a given time window, but that's somewhat lower priority. I might also add the ability to track things on a per-planet basis, so you can say "Wow, battles on Murdoch have cost me 1 million metal so far"

BadgerBadger

Aug 22, 2018 12:20 pm

manager   ~0048282

We now show a bunch of stats in the Escape menu

Issue History

Date Modified Username Field Change
Mar 29, 2018 11:43 pm BadgerBadger New Issue
Mar 29, 2018 11:43 pm BadgerBadger Status new => assigned
Mar 29, 2018 11:43 pm BadgerBadger Assigned To => Chris_McElligottPark
Mar 30, 2018 12:00 am etheric42 Note Added: 0047334
Mar 30, 2018 10:09 am Chris_McElligottPark Note Added: 0047335
Mar 30, 2018 12:49 pm etheric42 Note Added: 0047339
Mar 30, 2018 1:17 pm BadgerBadger Note Added: 0047340
Mar 30, 2018 1:19 pm BadgerBadger Note Edited: 0047340
Mar 30, 2018 1:20 pm BadgerBadger Note Edited: 0047340
Mar 30, 2018 1:21 pm BadgerBadger Note Edited: 0047340
Mar 30, 2018 7:53 pm Chris_McElligottPark Note Added: 0047341
Mar 30, 2018 8:38 pm BadgerBadger Note Added: 0047342
Apr 2, 2018 10:33 am Chris_McElligottPark Note Added: 0047343
Apr 2, 2018 11:56 am BadgerBadger Note Added: 0047344
Aug 22, 2018 12:20 pm BadgerBadger Status assigned => resolved
Aug 22, 2018 12:20 pm BadgerBadger Resolution open => fixed
Aug 22, 2018 12:20 pm BadgerBadger Fixed in Version => 0.759-0.760 Only The Start of Discovery
Aug 22, 2018 12:20 pm BadgerBadger Note Added: 0048282