Digital Paint Discussion Board

Development => General Development => Topic started by: Eiii on August 15, 2007, 03:41:28 AM

Title: Demo Browser
Post by: Eiii on August 15, 2007, 03:41:28 AM
I made a demo browser, as the auto-recorded demos' filenames are hard to decipher at first glance.

It's pretty simple. They're organized by year, then month. Double-click to view. Only works with auto-recorded demos, as they're the only ones that are hard to play/read and that I can get the date/time of. Be warned, this is my first project in C++ so for all I know it'll destroy your freaking computer or something. Suggestions welcome.

Linklinklinklink (http://eri3ch.googlepages.com/DemoBrowser-GUI.exe)
Last update: Aug. 17, 4:26PM PST
Title: Re: Demo Browser
Post by: KnacK on August 15, 2007, 07:18:07 AM
Bravo Eiii,

I applaud anyone who has taken the jump to try coding and turning it in to a contribution to DP.

Good Job.
Title: Re: Demo Browser
Post by: T3RR0R15T on August 15, 2007, 08:17:13 AM
The Windows comes, but there is no menu. Everythink is white.

My paintball is at: I:\Paintball 2 (Build 19)\
U use the complete location or only pball\demos\ ?
Title: Re: Demo Browser
Post by: Eiii on August 15, 2007, 08:23:11 AM
Mm, sorry. Released too late at night, and I didn't remember to implement that. It assumes your paintball is in C:\games\paintball2, but I'll get right on having it read from registry.
Title: Re: Demo Browser
Post by: KnacK on August 15, 2007, 08:25:19 AM
Eiii,

Don't get it to read from the registry, have a user entered folder option, or perhaps both wit hthe user being able to change the install location.
Title: Re: Demo Browser
Post by: Eiii on August 15, 2007, 08:50:05 AM
Okay, done. It now reads from the registry, provided you don't supply a path in the command line argument(s).

For example, in T3RROR15T's case:
Code: [Select]
"*path*DemoBrowser-GUI.exe" I:\Paintball2 (Build 19)in the shortcut path or whatever would make his work, if that data wasn't reflected in the registry.

Everything should work, and to the extent I've tested it, it does. But who knows.
Title: Re: Demo Browser
Post by: Zorchenhimer on August 15, 2007, 10:51:02 AM
This happens right when I start it up. :/
Title: Re: Demo Browser
Post by: Eiii on August 15, 2007, 10:56:12 AM
What's in your registry for pb2's install directory? Current user and local machine.
Title: Re: Demo Browser
Post by: Zorchenhimer on August 15, 2007, 11:01:43 AM
"C:\paintball2b19" for both of them.
Title: Re: Demo Browser
Post by: Eiii on August 15, 2007, 11:13:10 AM
Huh. I don't know, then. To sort!
Title: Re: Demo Browser
Post by: T3RR0R15T on August 15, 2007, 12:05:17 PM
Works fine for me. thx
Title: Re: Demo Browser
Post by: Apocalypse on August 15, 2007, 07:19:32 PM
I put it in pball/demos and it isn't working I get an error no auto demos.
Title: Re: Demo Browser
Post by: Eiii on August 15, 2007, 07:37:18 PM
Where you put it doesn't matter. You probably got that error because you have no automatically recorded demos. OR, you installed paintball and then moved it so that the registry is wrong. See my comments above on command-line arguments.
Title: Re: Demo Browser
Post by: Apocalypse on August 15, 2007, 07:51:11 PM
Oh yes I did move it how would I fix it?
Title: Re: Demo Browser
Post by: Eiii on August 15, 2007, 07:52:27 PM
See my comments above on command-line arguments.
Okay, done. It now reads from the registry, provided you don't supply a path in the command line argument(s).

For example, in T3RROR15T's case:
Code: [Select]
"*path*DemoBrowser-GUI.exe" I:\Paintball2 (Build 19)in the shortcut path or whatever would make his work, if that data wasn't reflected in the registry.

Everything should work, and to the extent I've tested it, it does. But who knows.
Title: Re: Demo Browser
Post by: Apocalypse on August 15, 2007, 07:56:31 PM
So should I insert that except with my location into the code or would you have to do that.
Title: Re: Demo Browser
Post by: Eiii on August 15, 2007, 08:05:23 PM
Put it here.
Title: Re: Demo Browser
Post by: Apocalypse on August 15, 2007, 08:10:40 PM
Ahh.... it works like a dream thanks Eiii and great job.
Title: Re: Demo Browser
Post by: Eiii on August 15, 2007, 08:11:25 PM
Thanks, good to know that that works. :D
Title: Re: Demo Browser
Post by: Apocalypse on August 15, 2007, 08:12:44 PM
Sorry to say this but if I double click on anything I get an error I can still sort through to look at what month they were all recorded in though.
Title: Re: Demo Browser
Post by: Eiii on August 15, 2007, 08:24:32 PM
Hmmm. I can't think of any reason that would be... what OS are you running?

I made some tiny changes that might make it work or something.
Title: Re: Demo Browser
Post by: Apocalypse on August 15, 2007, 08:31:11 PM
It still does it and I'm using XP.
Title: Re: Demo Browser
Post by: Eiii on August 15, 2007, 08:40:58 PM
Try removing any trailing slashes you put in the path. What path is it in, specifically?
Title: Re: Demo Browser
Post by: jitspoe on August 16, 2007, 02:54:19 PM
Nice.  If you wanted to expand that even further, you could get the date and time from the file properties and list non-auto demos.
Title: Re: Demo Browser
Post by: Eiii on August 16, 2007, 11:02:05 PM
I thought about that, but I want this to be only for auto-recorded stuff, as they're usually used for matches, and they're the ones that are hard to identify/play.
Title: Re: Demo Browser
Post by: Apocalypse on August 17, 2007, 07:01:55 PM
It is C:\Documents and settings\CINJO\Paintball2\pball\demos.
Title: Re: Demo Browser
Post by: Eiii on August 17, 2007, 07:04:43 PM
You need to put the path that the paintball2.exe executable is in- in this case, C:\Documents and Settings\CINJO\Paintball2
Title: Re: Demo Browser
Post by: Apocalypse on August 17, 2007, 07:18:17 PM
It works now also though if you double click on dates like 2007 or whatever then it will bring up Paintball and just try to open a non-existent demo.
Title: Re: Demo Browser
Post by: Eiii on August 17, 2007, 07:26:01 PM
Haha, I could swear I fixed that. Well, it's fixed now. Re-upped.