Author Topic: Combat Logging  (Read 1219 times)

Offline BobTheJanitor

  • Master Member Mark II
  • *****
  • Posts: 1,689
Combat Logging
« on: February 25, 2011, 06:12:10 pm »
I've been thinking about posting something about this on mantis as a suggestion, but I can't really work out entirely how it would function. So I thought I'd post it up here first to see if anyone else had any ideas. And also to give the devs a chance to preemptively tell me how impossible it is.

Basically, I'd like to have some sort of combat log. Anyone who's played various MMORPGs will probably know exactly the sort of thing I'm thinking of. A list, possibly with timestamps, of 'you hit monster with fireball for 50 damage, monster hits you with claws for 100 damage, you die, etc.' Having a log to go through in the post-mortem of a big battle would greatly appeal to the stats nerd in me. I assume that all this data is being tracked in the game somewhere already, while battles are being resolved (but again, I don't know if it's being done in such a detailed or readable fashion). It would also help with those random situations where a ship disappears while you're doing something else and you have no clue what just happened to it when you go back to look at the planet it was on.

The obvious problem, of course, is that the log for even a small fleet vs. fleet battle would be absolutely massive. From a technical standpoint, it might well be impossible to do this. Being an uneducated neophyte, it seems to me that it would be possible to take the internal numbers on what's shooting what for how much and just dump it out to a rolling text log somewhere, and then limiting that to only show what's happening on the planet you're looking at, and then allowing you to filter by ship type and/or mark. Or even letting you select just one ship, or a group of ships, and only show the log filtered for just what they've been shooting at or have been shot by. But this is all guessing from ignorance, and like I said I fully expect Chris and/or Keith to tell me just how impossible this is.

Still, never hurts to throw it out there. Anyone else think this would be a great tool to have, or have any idea of how to make it work better?

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Combat Logging
« Reply #1 on: February 25, 2011, 06:21:18 pm »
Well, it's technically possible, I'd just keep an output buffer somewhere and at each relevant calculation I'd do something like

if(Game.Instance.GameSettings.IsInsaneCombatLoggingEnabled)
    Game.Instance.CombatLogOutputBuffer.Add("ship foo's shot did ").Add(damageDone).Add(" damage to ship bar.\n");

And then at the end of each frame or whatever dump the buffer to a CombatLog.txt file and clear the buffer.

And it would work fine.  I'd probably make it more of a csv or tab-delimited format for easy spreadsheeting, etc.

This is basically what I did with the wave computation logs, and those have been invaluable for getting past anecdotal confusion to what's actually going on.

The problem in this case is that even checking "if(Game.Instance.GameSettings.IsInsaneCombatLoggingEnabled)" (or some shortcut flag to avoid the dereferencing chain) in the more critical-path code branches  is a very significant increase in cpu overhead for everyone, not just those using the logging.  And for the folks using the logging, combat performance would probably drop by a factor of 10, even with our buffer implementation being pretty efficient.

So it wouldn't ever make it into a for-everyone release, and we really don't have the resources to maintain multiple "branches".
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Combat Logging
« Reply #2 on: February 25, 2011, 06:22:33 pm »
That said, if you wanted something like exacting details on who actually killed who, "ship death" is a sufficiently uncommon case that it could stand an extra if(bool) for everyone and whatever it cost to actually do the logging would be your own lookout.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Zhaine

  • Jr. Member Mark II
  • **
  • Posts: 85
Re: Combat Logging
« Reply #3 on: February 25, 2011, 06:26:51 pm »
This would be very cool and, I agree, probably completely unfeasible!

Maybe something like a per-planet (plus one galaxy wide) log of how many of each ship type have been killed and which ship types were the main damagers.

E.g. 300 bombers have died here. 200 had most damage done by fighters, 75 by bombers and 25 by frigates.

Then you can see what's roughly been going on and which ships have had the most impact. . .

Edit: Ninjad :p so maybe ships killed and what ship type made the killing blow is both feasible and useful?
« Last Edit: February 25, 2011, 06:29:46 pm by Zhaine »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Combat Logging
« Reply #4 on: February 25, 2011, 06:28:28 pm »
E.g. 300 bombers have died here.
That's relatively easy.

Quote
200 had most damage done by fighters, 75 by bombers and 25 by frigates.
That's unspeakably hard ;)  Because that requires doing some sort of check on every shot hit, to track the damage per type, etc.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Zhaine

  • Jr. Member Mark II
  • **
  • Posts: 85
Re: Combat Logging
« Reply #5 on: February 25, 2011, 06:31:51 pm »
E.g. 300 bombers have died here.
That's relatively easy.

Quote
200 had most damage done by fighters, 75 by bombers and 25 by frigates.
That's unspeakably hard ;)  Because that requires doing some sort of check on every shot hit, to track the damage per type, etc.

Hah, stop replying while I'm typing!  ;D

Thought that might be the tricky bit. . . See my edit  :P

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Combat Logging
« Reply #6 on: February 25, 2011, 06:35:00 pm »
Yea, "death logging" could log dying ship ID number, what type of ship, what player controlled it, what planet it was on, ship ID of what killed it, what type killed it, what player controlled that ship... not sure what else.  Basically most of that is already logged in the in-game stats, just only at a summary level.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BobTheJanitor

  • Master Member Mark II
  • *****
  • Posts: 1,689
Re: Combat Logging
« Reply #7 on: February 25, 2011, 06:53:43 pm »
Mockup example of what I'm thinking of. Let's say in this scenario I just select my MkI Bombers, so I want to see everything they hit and everything that hit them. So I click on 'combat log' and it brings up a handy little list for me for the last X minutes or whatever seems best. Formatting could be whatever, in this example I'm just going with [ship type] [damage] [target] and then an extra notation if that was the kill shot. Numbers not at all accurate, just made up on the spot.

Bomber I 3,000 damage Fighter II
Bomber I 3,000 damage Fighter II
Bomber I 3,000 damage Fighter II
Bomber I 6,000 damage Forcefield I
Fighter III 15,000 damage Bomber I (destroyed)
Bomber I 3,000 damage Fighter II (destroyed)
Botnet Golem 10,000,000 damage Bomber I (destroyed)
Botnet Golem 10,000,000 damage Bomber I (destroyed)
Botnet Golem 10,000,000 damage Bomber I (destroyed)
Botnet Golem 10,000,000 damage Bomber I (destroyed)
Botnet Golem 10,000,000 damage Bomber I (destroyed)
Botnet Golem 10,000,000 damage Bomber I (destroyed)
Botnet Golem 10,000,000 damage Bomber I (destroyed)
Botnet Golem 10,000,000 damage Bomber I (destroyed)
Botnet Golem 10,000,000 damage Bomber I (destroyed)
Bomber I 3,000 damage Botnet Golem
Bomber I 3,000 damage Fighter II
Bomber I 3,000 damage Fighter II
Bomber I 3,000 damage Fighter II (destroyed)

...and so on.

Hopefully that gets the idea across pretty well.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Combat Logging
« Reply #8 on: February 25, 2011, 06:56:36 pm »
I'll think about it ;)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline KingIsaacLinksr

  • Master Member
  • *****
  • Posts: 1,332
  • A Paladin Without A Crusade...
Re: Combat Logging
« Reply #9 on: February 26, 2011, 01:14:01 am »
I'm all for this as long as it doesn't put more strain on the CPU.  :) 

King
Casual reviewer with a sense of justice.
Visit the Arcen Mantis to help: https://www.arcengames.com/mantisbt/
A Paladin's Blog. Long form videogame reviews focusing on mechanics and narrative analyzing. Plus other stuff. www.kingisaaclinksr.com