BZFlag Postgame

All things BZFlag - no [OT] here please
Post Reply
User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 789
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

BZFlag Postgame

Post by allejo »

For the past few months, I've been teasing this project on Discord and now I've finally gotten around to deploying it and importing my ~8700 LeaguesUnited replays. I'd like to introduce to you, BZFlag Postgame.

Postgame is a Symfony project that reads replay files and summarizes them. Taking a look at a match that occurred yesterday, here's what's available for each replay:
  • Final match score
  • The final scoreboard
  • Times of every flag capture
  • A log of the public chat
  • Per player K/D stats; i.e. how many times did player X kill player Y in this match?
If you'd like to perform your own analysis, you can append "/json" to any replay URL and you'll receive a JSON representation of that match. For example:

Code: Select all

http://postgame.allejo.org/replays/49/20190907-2341-fun.rec/json
So how is this all possible? BZFlag replays are a simple collection of every packet that was sent to the server. I have written a PHP library (allejo/bzflag-networking.php) on GitHub that reads replays and unpacks the information into PHP objects.

Please note, that Postgame is still in the alpha stage and there's more to come. So feedback, suggestions, and bug reports are greatly welcomed! Of course, Postgame is open-source on GitHub and welcomes contributions. There are a number of reported issues/feature requests already, so help would be greatly appreciated!
User avatar
kierra
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 3989
Joined: Wed Mar 23, 2005 1:02 am
Location: outer Slovenia
Contact:

Re: BZFlag Postgame

Post by kierra »

Kudos to you for this undertaking, allejo! I'm so excited and can't wait to see more.
I have missed mana's site for GU league that tracked so many different stats.
"Sometimes people try to expose what's wrong with you, because they can't handle what's right about you."
"Measure your words -- they determine the distance of your relationships"
User avatar
Zehra
Private First Class
Private First Class
Posts: 746
Joined: Sun Oct 18, 2015 3:36 pm
Location: Arctic
Contact:

Re: BZFlag Postgame

Post by Zehra »

Looks great, will be inputting some suggestions/ideas.

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
User avatar
strayer
Sergeant Major
Sergeant Major
Posts: 191
Joined: Sat May 24, 2003 3:54 pm
Location: Germany
Contact:

Re: BZFlag Postgame

Post by strayer »

I do not only like the idea of BZFlag Postgame but also the current implementation. Pretty good. :o)
A pessimist is an optimist with experience... ;o)
User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 789
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: BZFlag Postgame

Post by allejo »

I come bearing gifts and a project update. During the past few weeks, I have been working on unpacking world data from my replays and writing a rendering library for drawing radar previews of those maps.

Here is what it looks like:
Hix Map Preview.png
(325.43 KiB) Not downloaded yet
Duc Map Preview.png
(333.36 KiB) Not downloaded yet

With the introduction of being able to parse map data, Postgame is going to receive updates in the future to be able to search matches by map and show what maps players prefer playing on.

This is a retroactive feature and most of my replays have had thumbnails generated for them.
User avatar
Zehra
Private First Class
Private First Class
Posts: 746
Joined: Sun Oct 18, 2015 3:36 pm
Location: Arctic
Contact:

Re: BZFlag Postgame

Post by Zehra »

If possible, map animation would be an amazing addition to map thumbnails.

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 789
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: BZFlag Postgame

Post by allejo »

Zehra wrote: Sun Jun 21, 2020 5:05 pm If possible, map animation would be an amazing addition to map thumbnails.
Animating what? Player movement and shots? Player movement is doable since the server knows all of that, however, in order to implement shots, you would have to reimplement all of the shot collision logic that the client has. Replays only know where shots begin, the clients calculate all of the ricochets.

This is not something I'm interested in working on.
User avatar
Zehra
Private First Class
Private First Class
Posts: 746
Joined: Sun Oct 18, 2015 3:36 pm
Location: Arctic
Contact:

Re: BZFlag Postgame

Post by Zehra »

I mostly thought along the lines of spawn and death positions, along with them being highlighted, before fading away. (Player movement would have been to be added later, but it would have given a similar feel to photographs being developed or long exposure photography.)

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 789
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: BZFlag Postgame

Post by allejo »

MOAR GIFTS THAT LITERALLY NO ONE ASKED FOR.

Last update, I shared that I was now generating thumbnails for the maps on which replays took place on; this update builds on top of that! I have now added the ability to classify/differentiate between maps. This means I now have a dedicated page listing all of the maps and how many replays there are on each map.

http://postgame.allejo.org/maps

Each map has a dedicated page that shows the most recent matches that occurred on that map and a graph of the activity of it. C'mon now everyone, show some of the lesser played maps some love! ;)

map-listing.png
(365.35 KiB) Not downloaded yet
map-page-preview.png
(464.35 KiB) Not downloaded yet

I have also fixed a bug where thumbnails for older replays would sometimes be broken. This was caused by the fact that I was not persisting thumbnails between updates; this has since been fixed.

Thank you for tanking with BZFlag!
User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 789
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: BZFlag Postgame

Post by allejo »

Postgame's next new feature is heatmaps! For the past month, GitHub user Adwitiya Singh has been working on bringing to reality a proof of concept I sloppily built in R for a spatial statistics grad class. PHP is not a language with wide support for analysis and generating diagrams, so Adwitiya worked hard on writing his own implementation of aggregating data for heatmaps, rendering heatmaps, and even needed to tackle color theory in order to generate the gradients you see in the examples below.

In each replay's summary, there is a player roster section dedicated to analytics for each player individually. In this section, there is now a heatmap with a map overlay on top to show where each player spent the majority of their time. Did a player focus on attacking? Or defending? Or fighting in the middle? A summary of player movements are now being recorded in the database and are being displayed visually for users.

Screenshots of the following replay are attached, https://postgame.allejo.org/replays/129 ... 14-fun.rec

Thank you Adwitiya for making your first open source contribution be implementing this feature for Postgame!

And as always, thank you everyone for tanking with BZFlag!
Attachments
heatmap-overlay.png
(63.21 KiB) Not downloaded yet
heatmap-no-overlay.png
(55.02 KiB) Not downloaded yet
User avatar
mathiaz
Private First Class
Private First Class
Posts: 64
Joined: Sat May 27, 2006 11:59 pm

Re: BZFlag Postgame

Post by mathiaz »

Excellent!

About the dashboard counters, you may add a way to expend the lists.
From the top 10, switch to the top 50 or 100.
It will give funny information about players.

Nice work.
<°)))><|
User avatar
mathiaz
Private First Class
Private First Class
Posts: 64
Joined: Sat May 27, 2006 11:59 pm

Re: BZFlag Postgame

Post by mathiaz »

Or a ratio :

number of cap / number of match

number of killed tanks / number of match

if number of match > threshold
<°)))><|
Post Reply