Pages: [1]
  Print  
Author Topic: How can I record and replay a game trace in multi-player scenarios?  (Read 8168 times)
nrz
Nub


Cakes 1
Posts: 13


« on: November 13, 2014, 12:57:35 AM »

I am trying to quantify device and network performance under different gaming settings. For example, keeping all the rest the same, what is the difference between using bluetooth and wifi-direct (I am running Android-port)? Thus it is best to have the same trace running each time. Anybody can help me to know how to record and replay a trace?
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #1 on: November 13, 2014, 01:33:29 AM »

Excuse me, what do you mean with "trace"? A log of network usage? I don't know if there is something built-in (I'm not a dev). I can guess there may be some external third-party tools which may monitorate network usage from each process...

And what are you doing exactly with bluetooth? Did you somehow set up a WLAN using bluetooth instead of wifi? I can guess in theory wifi should be better than bluetooth for that (having being appositely created for that), but I haven't tried neither wifi-direct nor bluetooth lan (I'm for the old school Access Point-based wifi)...
« Last Edit: November 13, 2014, 01:37:35 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
nrz
Nub


Cakes 1
Posts: 13


« Reply #2 on: November 13, 2014, 05:34:56 AM »

Hi Gig, nice to see you again. By trace I mean a fixed gameplay. Say 3 people play together for 5 minutes. Then the trace includes each player's all actions (firing, trajectory...). Each time I replay this trace, all situations happen the same as those in the original play. Hope this is clear.
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #3 on: November 13, 2014, 07:50:54 AM »

Something like a server-side demo?

"Serverside demos" were an enhancement made by GrosBedo (see http://openarena.ws/board/index.php?topic=4437.0 and (DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Manual/Demos#Server-side_demos), which used customized binaries. I have no idea if Fromhell or Sago did incorporate that stuff OA git repository or not. Probably, "official" 0.8.8 baseoa does not include serverside demos... I don't know if Android port does.

I don't know if demos playing can be used to show those additional console outputs one can usually obtain with debugging commands like g_debug* (which need "devmap", IIRC..), or like "developer 1".
« Last Edit: November 13, 2014, 07:59:07 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #4 on: January 25, 2015, 12:53:54 AM »

I don't know if demos playing can be used to show those additional console outputs one can usually obtain with debugging commands like g_debug* (which need "devmap", IIRC..), or like "developer 1".

No, the code explicitly disables debug commands during a demo playback (both in the native client-demo facility or my server-side demos patch) to avoid tampering the content of the demo (and also probably because some debug commands are not meant to be used in a non-interactive replay, and thus can probably lead to big bugs and maybe even game crash). This is simply because, as you said Gig, when a demo is launched, the map will be called with the "map" command (which prevents any debug command), and not the "devmap" command, but you can easily fix that in the code I guess (there's no other way around editing the code, there's just no way to change the commands used by demo playback at runtime to my knowledge).

Anyway, I hardly see why you would need to use debug commands in a demo. If you want more data anyway, you will probably need to inject your own logging code inside the engine/gamecode. If you use the server-side demo patch, you can easily place your logging code inside the functions you want, the main ones for your purpose being:

- SV_DemoWriteAllPlayerState() that manages the players states (everything that is necessary to track players):
https://github.com/lrq3000/openarena_engine_serversidedemos/blob/latest/code/server/sv_demo.c#L520

- SV_DemoWriteAllEntityState() that manages all the other entities states (like flags, ammos, powerups and other stuffs like that)
https://github.com/lrq3000/openarena_engine_serversidedemos/blob/latest/code/server/sv_demo.c#L554

- SV_DemoWriteAllEntityShared(): I can't remember what it records exactly but it's also critical Smiley
https://github.com/lrq3000/openarena_engine_serversidedemos/blob/latest/code/server/sv_demo.c#L589

- And if you're eager for a LOT of user data, you can uncomment the function SV_DemoWriteClientUsercmd() and hook it with you logging function:
https://github.com/lrq3000/openarena_engine_serversidedemos/blob/latest/code/server/sv_demo.c#L481
Logged
Pages: [1]
  Print  
 
Jump to: