Modifications for game research
Modifications for game research
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
"There's no such thing as stupid questions. There's just stupid people." - Mr. Garrison
-
- Sergeant
- Posts: 250
- Joined: Wed Jan 05, 2005 3:12 pm
Re: Modifications for game research
FYI there is a timestamp option that can be added to the config file: -ts
you get a line like this in the log
Writing the log to a file can be done by using >> after your start command
or piping the tee command
you get a line like this in the log
Code: Select all
2009-02-25 19:49:35: MSG-COMMAND 20:temporal distraction banlist
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
Re: Modifications for game research
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.
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
Re: Modifications for game research
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.