SamSuka
Kyzrati
Kyzrati

patreon


Behold! The return of official Cogmind leaderboards!

They're alive! Mostly.

Unfortunately relying on a third party to handle the leaderboards clearly didn't turn out so well in the end, and with Beta 10 mostly done we really need to get official Beta 9 leaderboards up and running. Not to mention there are plenty of people out there who enjoy either aiming to rise through the ranks, or maybe just browse the leaderboards or other runs to see what others are up to. And of course with Beta 9's incredibly detailed new scoresheets there's even more to see in that regard!

So I've finally taken matters into my own hands, investing much of this week into rewriting the leaderboard system from scratch.  The main goal is to build a system that's more versatile and robust than the original one we were using from 2015~2019 for Cogmind Alpha and through Beta 8. Internally the old one sucked, having been quickly scraped together for the tournament in 2015 with plans to eventually replace it when Cogmind reached 1.0, a milestone which we never really got close to despite years of progress :P. Plus it wasn't anywhere near compatible with the new scoresheets anyway, so with Beta 9 it needed to go.

I haven't made the new system public yet since it's not quite done, but there's already plenty to see, so let's take a look at it!

Processing

The source data used for the leaderboards are the runs downloaded from AWS in protobuf format via a backup system. Then I have a program which reads the archives and creates a database of the run data relevant to leaderboard purposes. To start, that program reads in a settings file with some basic instructions including what game mode to consider (0 = regular game), and which versions to include in the leaderboard.

I also added logging for the entire process, including a convenient summary at the end, to help spot any issues.

Some things you might notice in the log there:

Testing

Before working on any of the web stuff, obviously it's better to make sure the system actually works without adding any extra layers of complication, so I did all my testing in an initial text version of the leaderboards.

Here I made sure things like banning, ignoring, replacing, and incremental updating features were all working. Success. (That data set I'm working with is all the Beta 9 series runs since last year until a few days ago.)

Output

For the web version, you'll see it's more or less like the original leaderboards (I did have to redesign the difficulty mode headers since their names changed):

To produce that I use a prewritten HTML template which the program reads in and inserts leaderboard data at specified points, resulting in a static HTML file that you can then access online. For example this fully-functional test version :D (again the test data is from a few days ago, so it's not quite up-to-date)

As usual you can click on a score to see the full scoresheet.

This week I've been posting about leaderboard progress on the patron Discord channel, where Zyalin shared this fun leaderboard art piece full of familiar faces :D

Of course it must be edited to account for the ultimate Cogmind (and all around rogueliker god): GJ.

Beyond the Leaderboards

But we don't just want leaderboards, do we? NO! We also need access to All The Runs. The way this used to be handled was by simply giving access to web directories storing every scoresheet, navigated via your browser's file browser. Not ideal.

Now towards the bottom of the leaderboards is the link to this version menu, from where you can access the complete run list for each version compiled into, once again, nifty static HTML pages. They're also prettier.

This actually started out as a basic white text page similar to what we had before, not really providing a whole lot of info on its own, then I realized we could increase the amount of data shown, add a little CSS styling, make it prettier, then make it even prettier again... Yeah, I just couldn't stop myself and now it's even more fun to browse \o/

Actually it's not quite done yet because I haven't had time to implement Yet Another Idea I had for it that would improve navigation and also just look better: Different shades of green for the scores depending on threshold :)

TODO

Haha, there's always more to do, isn't there!

So yeah, there's still some work to come, but you can already play around with the leaderboards via the links above, and the rest will be out before Beta 10. (Though I still have to actually implement w8, which is not a tiny project in itself :P)

Comments

Sure has been long enough, eh? xD

Kyzrati

Absolutely awesome! Thank you!

Daniel


More Creators