Unit statistics

Unit statistics

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
Blechbuechse
Posts: 6
Joined: 20 Aug 2006, 20:02

Unit statistics

Post by Blechbuechse »

Hello there.

I've noticed a nice statistics window popping up after the game is over, containing information about units under my controll, units killed and stuff.
Two short questions concerning this:

1) Is there a way to view this window during play? Is it intended that it's not possible to view it (in case it's not possible only, and, of course only one's own statistics - everything else would be stupid).

2) Where in the code is this infomation created/stored? I'd be cool to have the possibility to export it or access it. It could be used to command a integrated music player or a winamp plugin. Matching music for events like growth of #kills > growth #losses and #units under control constant or raising, whatever combination is possible with the obtainable information.
Where in the source do I have to look? Filename, Object/Methodname would help.

I must admit I haven't had a closer look at the code till yet, so i must ask for excuse if the answer to my question is quite obvious if I just had looked before asking.

Thanks,
Tin Can.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

It'd be useful for Ai development too
Blechbuechse
Posts: 6
Joined: 20 Aug 2006, 20:02

Post by Blechbuechse »

[offtopic]
Indeed, but I'd be unfair to give an AI access to information about the enemy it can't reach otherwise and I guess the AI interface would open possiblities to cheat by accessing this classified information %)
[offtopic]
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Considering how KAI acts the AI can already access more information than the player.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

The AI can already gain this information about itself however it's a waste doing it for every single instance of the AI and in spring.

Also AI's cant see explosions or projectiles and can tell if a unit is cloaked....
Blechbuechse
Posts: 6
Joined: 20 Aug 2006, 20:02

DoxyGen Doc...

Post by Blechbuechse »

I found the doxygen documentation online. But it seems there's nowhere a hint that it exists, expect for the Glossary in the wiki?

Anyway, the statistic window is created in GUIendgameDialog.cpp (class GUIendgameDialog), the statistic is saved in CTeam::currentStats which gets pushed to a list every 16 seconds to a statHistory List.

Thanks anyway,
Tin Can.
Post Reply

Return to “Engine”