Tremulous Forum

Mods => Modding Center => Topic started by: sptx on November 07, 2007, 04:03:48 pm

Title: Screen Capture and Player Position Output
Post by: sptx on November 07, 2007, 04:03:48 pm
I am interested in modifying the source so that on a 1 second timer, the game will take a screen capture, save the image to a directory, and then create a string with the file path to the image, and the player position (in x,y or lat,lon) and send the message over a TCP port.  

EG:  <img="C:\Program\Tremulous\images\0000001.jpg" posX = 42.0948 posY= -12.02931>

I just downloaded the src this morning and have been wading through it, but any help as to where a good place to drop this bit of code in would be very much appreciated. Thanks.
Title: Screen Capture and Player Position Output
Post by: Caveman on November 07, 2007, 11:36:30 pm
not doable w/o a lot of rewrite.
your best chance is, if you don't really know the source, to ask Punkbuster how they did it :)
Title: Screen Capture and Player Position Output
Post by: imperiumZero on November 08, 2007, 12:41:20 am
I may be wrong, but aren't entity positions exported via VM? some entitypos_t struct or something....

/mumbles off into the distance...
Title: Screen Capture and Player Position Output
Post by: cyrri on November 08, 2007, 04:43:36 pm
put this in a config file and exec it every second (see trap_SendConsoleCommand)
Code: [Select]

clear;viewpos;condump coordinates_filename.txt;screenshotJPEG screenshot_filename

and do the rest outside the game.
Title: Screen Capture and Player Position Output
Post by: sptx on November 09, 2007, 02:33:35 pm
Thanks for your tips.

Who/What is Punkbuster? =)
Title: Screen Capture and Player Position Output
Post by: Caveman on November 09, 2007, 02:52:49 pm
http://www.google.de/search?hl=en&q=Punkbuster
Title: Re: Screen Capture and Player Position Output
Post by: robhamilton on January 02, 2008, 05:45:58 pm
pix and delire did this with q3apd using UDP  to export position. Check out their code, its all in there: http://pix.test.at/blog/pivot/entry.php?id=11 (code is linked at: http://pix.test.at/pd/q3apd/ )