Modifications for game research

Questions or HOWTOs about the above? Post 'em here...
Post Reply
catcha
Private First Class
Private First Class
Posts: 22
Joined: Tue Nov 17, 2009 8:24 pm

Modifications for game research

Post by catcha »

Hi all. I'm planning to use bzflag in a psychology related game experiment, and I'm doing some minor modifications to the game for this purpose. Basically I need to synchronize the start of the game with an external command given via serial port, and to save relevant game events along with time stamps to a log file. I was thinking of writing a modified command similar to /countdown for the synchronization and modifying the replay server for the log file writing. Would you have any recommendations or tips for either one? This is not a trivial task, especially since my programming skills are a bit out of use. Thank you for any comments :D
"There's no such thing as stupid questions. There's just stupid people." - Mr. Garrison
temporal distraction
Sergeant
Sergeant
Posts: 250
Joined: Wed Jan 05, 2005 3:12 pm

Re: Modifications for game research

Post by temporal distraction »

FYI there is a timestamp option that can be added to the config file: -ts
you get a line like this in the log

Code: Select all

2009-02-25 19:49:35: MSG-COMMAND 20:temporal distraction banlist
Writing the log to a file can be done by using >> after your start command

Code: Select all

bzfs -conf ./your.conf  >> /path/to/logfile.txt

or piping the tee command

Code: Select all

bzfs -conf ./your.conf | tee -a /path/to/log.txt
catcha
Private First Class
Private First Class
Posts: 22
Joined: Tue Nov 17, 2009 8:24 pm

Re: Modifications for game research

Post by catcha »

Thank you very much. I'm working with version 2.0.12 in windows, should this option work with it? (It didn't)

Edit: Ok, you also have to enable debugging. This is a great feature, but I would like to get more accurate resolution (tens of ms), so some modification is still needed.
"There's no such thing as stupid questions. There's just stupid people." - Mr. Garrison
User avatar
blast
General
General
Posts: 4933
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Modifications for game research

Post by blast »

There is the 'micros' option that can be passed to -ts to also show microseconds, but it doesn't seem to do anything on Windows, and it segfaults on my 2.0.13 build on Linux... but still something to look at in the code.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
Post Reply