Writing game statistics to a file

Moderator: GZDoom Developers

Karl Murks
Posts: 19
Joined: Sat Sep 18, 2010 2:53 am

Writing game statistics to a file

Post by Karl Murks »

First let me tell you that ZDoom is the greatest Doom port ever created.

However, there is one thing that has been bugging me since the original Doom was released:

Even though the game keeps track of the time spent in a level and the amount of kills and secrets these are forgotten as soon as you finish the game. So to remember these things I had to resort to pen and paper which to say, is more than inconvenient.

I was wondering if an option could be added to ZDoom to write these things to an external file, to keep the statistics fanatics like me happy.
User avatar
Per-Scan
Posts: 180
Joined: Tue Sep 20, 2005 5:12 pm
Location: One Year in the Future
Contact:

Re: Writing game statistics to a file

Post by Per-Scan »

I quite like this idea. It would be nice to see your own personal par times etc at the end of a level. It gives you something to beat other than just the built in par. A nice addition to the gameplay and replayability of a level. :)
User avatar
Nash
 
 
Posts: 17494
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Writing game statistics to a file

Post by Nash »

Can't you just record your stats using Notepad or whatever? Put the text file on your desktop for easy access... whenever you finish a map, Alt Tab out of ZDoom, update your stats, rinse and repeat.
Karl Murks
Posts: 19
Joined: Sat Sep 18, 2010 2:53 am

Re: Writing game statistics to a file

Post by Karl Murks »

Please tell me, in which way would that be better than a piece of paper and a pen?

A computerized scratch pad is still a scratch pad.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Writing game statistics to a file

Post by Graf Zahl »

Just...

Why do so many people fail to use that word in a proper context... :?
User avatar
Nash
 
 
Posts: 17494
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Writing game statistics to a file

Post by Nash »

Graf was that directed at me? I really don't see what's so hard in writing down your end level stats in a text file.

There are also many more ways to do this. Grab a screenshot of the intermission screen, code in your own stat tracker with a globally loaded ACS...
Karl Murks
Posts: 19
Joined: Sat Sep 18, 2010 2:53 am

Re: Writing game statistics to a file

Post by Karl Murks »

Don't you think that other people would like such a feature, too, so that they can compare their achievements with previous efforts or other users?

For god's sake, why does everything have to be so complicated? All the necessary information is already there, all that's missing is a way to store it in some list that can be written out to a text file that can be looked at in a text editor.

Why should I write this stuff down each time a level ends? As long as an intermission screen pops up it's at least doable but what about mods that don't - like Hexen, for example?
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: Writing game statistics to a file

Post by XutaWoo »

Image
Karl Murks
Posts: 19
Joined: Sat Sep 18, 2010 2:53 am

Re: Writing game statistics to a file

Post by Karl Murks »

And then what? I still have to grab paper and pen (or notepad) to write them down in a usable manner.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Writing game statistics to a file

Post by Graf Zahl »

Ok, people, I don't know what's going on here but there have been 2 posts now which blissfully ignored the OP's motivation for this feature (namely the hassle of manually maintaining this data) and provided absolutely worthless 'workarounds'.

So, luckily I had written something similar for testing purposes years ago. (you can even still find the stubs for that in g_level.cpp) It only collects the time spent in a level but it shouldn't take too long to make the necessary adjustments to turn it into a usable feature. Just don't expect miracles here. It will be rather simple and feature restricted but should be enough for someone who wants this data handy after finishing a game.
Gez
 
 
Posts: 17945
Joined: Fri Jul 06, 2007 3:22 pm

Re: Writing game statistics to a file

Post by Gez »

I was going to suggest a console variable that, if set, would log the statistics when changing level (even if they aren't shown, as in Hexen or Strife).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Writing game statistics to a file

Post by Graf Zahl »

Ok, I just managed my old code to get working. But I don't really feel like fully polishing it into a super-user-friendly feature so I'll leave it as it is for now and won't expose it to the menu.

Here's the deal:

- set the 'savestatistics' CVAR to 1 to enable it
- the 'statfile' CVAR contains the file name to save to.
- It will currently only work for proper episode starts so it can't yet be used to save info for pistol-starting a level. The original code was not designed for that and it'll require a bit more of work.

Some test output (2 sessions of cheating myself through Doom's E2):

Code: Select all

DOOM.E2M1 "The Shores of Hell"
{
	 1. 18.09.2010 "  96/ 336,   2/ 51,  8" 00:01:24 0
	{
		E2M1     "  15/  15,   0/  4    " 00:00:04
		E2M2     "  52/  52,   0/ 12    " 00:00:16
		E2M3     "  28/  28,   0/  6    " 00:00:05
		E2M4     "   0/  46,   2/ 10    " 00:00:16
		E2M5     "   0/  70,   0/ 10    " 00:00:09
		E2M6     "   0/  60,   0/  3    " 00:00:10
		E2M7     "   0/  64,   0/  6    " 00:00:14
		E2M8     "   1/   1,   0/  0    " 00:00:06
	}
	 2. 18.09.2010 " 220/ 336,   2/ 51,  8" 00:01:23 0
	{
		E2M1     "  15/  15,   0/  4    " 00:00:04
		E2M2     "  52/  52,   0/ 12    " 00:00:16
		E2M3     "  28/  28,   0/  6    " 00:00:05
		E2M4     "   0/  46,   2/ 10    " 00:00:16
		E2M5     "   0/  70,   0/ 10    " 00:00:09
		E2M6     "  60/  60,   0/  3    " 00:00:13
		E2M7     "  64/  64,   0/  6    " 00:00:12
		E2M8     "   1/   1,   0/  0    " 00:00:04
	}
}

Karl Murks
Posts: 19
Joined: Sat Sep 18, 2010 2:53 am

Re: Writing game statistics to a file

Post by Karl Murks »

Thanks. That's perfect. :)

But it would be even better if you could make the necessary changes to handle pistol-started levels, too.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: Writing game statistics to a file

Post by XutaWoo »

Karl Murks wrote:And then what? I still have to grab paper and pen (or notepad) to write them down in a usable manner.
...You're going to write down a screenshot you just took? What?

But yeah, sorry; I misread that you were using that for contests or something. Making fake DOOM intermission screens is easy, but not as easy as, say, just cracking open Notepad and filling it with misinformation.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Writing game statistics to a file

Post by Graf Zahl »

Here's one good piece of advice: If you can make your computer do the number crunching for you, don't bother with manual workarounds. :P
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”