News:

Come Chat with us live! Learn how HERE!

Main Menu

Screen Capture and Player Position Output

Started by sptx, November 07, 2007, 04:03:48 PM

sptx

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.

Caveman

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 :)

imperiumZero

I may be wrong, but aren't entity positions exported via VM? some entitypos_t struct or something....

/mumbles off into the distance...
lt;kevlarman> because microsoft's drivers are absolutely horrible that couldn't accelerate glxgears if they tried

cyrri

put this in a config file and exec it every second (see trap_SendConsoleCommand)

clear;viewpos;condump coordinates_filename.txt;screenshotJPEG screenshot_filename

and do the rest outside the game.

sptx

Thanks for your tips.

Who/What is Punkbuster? =)


robhamilton

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/ )
rob hamilton
Center for Computer Research in Music and Acoustics (CCRMA)
Stanford University