Author Topic: Screen Capture and Player Position Output  (Read 4867 times)

sptx

  • Posts: 2
  • Turrets: +0/-0
Screen Capture and Player Position Output
« 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.

Caveman

  • Guest
Screen Capture and Player Position Output
« Reply #1 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 :)

imperiumZero

  • Posts: 118
  • Turrets: +0/-4
Screen Capture and Player Position Output
« Reply #2 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...
lt;kevlarman> because microsoft's drivers are absolutely horrible that couldn't accelerate glxgears if they tried

cyrri

  • Posts: 25
  • Turrets: +3/-1
Screen Capture and Player Position Output
« Reply #3 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.

sptx

  • Posts: 2
  • Turrets: +0/-0
Screen Capture and Player Position Output
« Reply #4 on: November 09, 2007, 02:33:35 pm »
Thanks for your tips.

Who/What is Punkbuster? =)

Caveman

  • Guest

robhamilton

  • Posts: 4
  • Turrets: +0/-0
    • my ccrma homepage
Re: Screen Capture and Player Position Output
« Reply #6 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/ )
rob hamilton
Center for Computer Research in Music and Acoustics (CCRMA)
Stanford University