Xonotic Forums
all-inclusive server-side demo - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Server Administration (https://forums.xonotic.org/forumdisplay.php?fid=16)
+--- Thread: all-inclusive server-side demo (/showthread.php?tid=5453)



all-inclusive server-side demo - BuddyFriendGuy - 04-25-2015

Currently on our own client, we can record what's happening on our own screen into a demo file. That means if I play a game and record it, only my own point of view was recorded. However, I would love to review how other players fragged me.

Is it possible to have the server record everything during a game play? At the end of the game, an all-inclusive demo file (we may need to call it something else to avoid confusion) can be downloaded by the clients, or sent somewhere (say stats.xonotic.org) for download.

By everything I mean all events (all player activities, item cycles, etc.). Later on, I can re-spec (per-player POV) any player, or freely re-observe (floating ghost POV) the recorded game play from any angle, just like during a live game.

Imagine Antibody with this in his analysis video, mixing 3rd-person POV and 1st-perosn POV.

If that's too much information to record, perhaps at least record every player, and generate a multi-track type of demo, or even just multiple demo files. This way, at least I can still re-spec each player.

Digging through posts, I learned that during a game play, not all events are sent to the client, so I figured this has to be done on the server side.

Googling gave me only one example of another engine.

I don't quite know how Xonotic server and client work together so I'm not even sure whether this idea is feasible.


RE: all-inclusive server-side demo - Mario - 04-25-2015

Server side demos for each player are currently possible, though it had a crash issue with UTF-8 names last time I tried it (not to mention the space required for so many demos).


RE: all-inclusive server-side demo - BuddyFriendGuy - 04-25-2015

@Mario could you give me a pointer to how to do server-side demos (is it a config? Or is it in a branch?)? Perhaps I can help track down the bug. I feel this function would really help me, and likely other beginners.

About the space concern, we can keep the recorded demo for, say, 30-min after the game. The players of that game are the ones who care about the demo the most, so I imagine after a game, they can download it right away.

After a few demos of test, it seems a demo file takes 5MB of space per player per 10-min game. So let's say we have three 10-min 4v4 games within this 30-min life-span requirement, it requires 3*5*8=120MB.

Or we can ask the players whether they want to download the demo right after the game, and they have to make the decision within a 10-second window.


RE: all-inclusive server-side demo - -z- - 04-26-2015

My concerns about CPU performance aside, if you wanted to make these available for download, I would suggest first rsyncing them to another server. Most game servers already serve maps off another server.


RE: all-inclusive server-side demo - BuddyFriendGuy - 04-27-2015

Update: Today I met Slava (Sl@va in the forum) in the game and he showed me that sv_autodemo_perclient is the switch for server-side demo recording. Initial test works but I'll test a little bit more to see whether the load is a big issue.


RE: all-inclusive server-side demo - It'sMe - 04-27-2015

I use demo recording on

Xonotic DeFrag - Join/Run now! - balance changes

The server records demos (via mentioned sv_autodemo) for every player.
Those demos are parsed for first places, transfered to another server, recorded and uploaded to Youtube:

https://www.youtube.com/user/packerxonotic

On peak times there are around 8 players.

An issue might be the continnous IO stream demo recording causes...


RE: all-inclusive server-side demo - BuddyFriendGuy - 04-28-2015

Thanks, @It'sMe. Impressive automatic flow!

I don't plan to convert the demo files into videos on my server -- I'll just let the users of that game to download them if they choose to do so. The server is running on SSD so I'm hoping disk I/O (or network I/O, if I end up mounting that folder via NFS on the file server) wouldn't be the bottleneck.

@-z-, I'm only serving the demo files to the participating players, so it's different from serving maps to the world. I doubt the file server would bog me down. I'll try to do some load test -- maybe this little server can handle all that.

@It'sMe:

1. Do you have some system load numbers of recording 8 demos at once for reference? Have you ever noticed any game server performance problem?

2. How do you figure out who won? The log?

@moderator: I didn't know Xonotic already kind of supports server-side demo recording so I asked here in the Suggestion. Could you move this thread to Server Administration? Thanks.


RE: all-inclusive server-side demo - It'sMe - 05-14-2015

I cannot notice a significant difference on performance when multiple demos are recorded... It seems to be very marginal.

I use this feature only for CTS... and if someone creates a record a comment is inserted into demo files like

'//CTS RECORD SET 0:18.75 151.867096 18.750000'

So I parse the demo files for this.


RE: all-inclusive server-side demo - BuddyFriendGuy - 05-16-2015

(05-14-2015, 05:31 AM)ItsMe Wrote: I cannot notice a significant difference on performance when multiple demos are recorded... It seems to be very marginal.

Thanks, It'sMe. My test results seem to agree with yours. Multiple demo file recording doesn't result in heavy server load (which makes sense, considering the data size). (My server uses SSD, though.)

(05-14-2015, 05:31 AM)ItsMe Wrote: I use this feature only for CTS... and if someone creates a record a comment is inserted into demo files like

'//CTS RECORD SET 0:18.75 151.867096 18.750000'

So I parse the demo files for this.


I started another thread about demo file parsing. Do you mind sharing what parser you use for demo files there?