You are here

Leaderboards, and False Performance Bug

Hey Folks! Been quietly working on some more code the past couple of days. I managed to carve out almost a day and a half of coding to work on the remaining leaderboards for mobile.

It was fairly straightforward stuff. I needed a few bits of info from Tiago, but most of the lifting was formatting the data to the (sometimes different) types needed by Google and Apple. That, and setting up the receiving end on the relevant game centers with names, units, display formats, and unique IDs.

Also, our discussion prompted Tiago to work on an offline data saver in case the server couldn't be reached when submitting scores. It'll simply save the file and try again later.

As of this afternoon, we'll be tracking shortest and longest survival time, shortest times to reach the DMC and end game, most distance traveled, most hexes revealed, and min/max temperatures experienced. Should be an interesting bunch of stats to peruse! (Even I'm curious what we'll see.)

Unfortunately, there was also a good chunk of the day lost to a performance bug.

Around midday, the game started taking an enormous amount of time to load. Simply starting a new game would take updards of 30 seconds to show the skills screen. Framerate started tanking when the mouse moved. And at one point, the game just gave up while loading and crashed.

I started retracing my steps, looking through recent commits for clues. I also fired up hxScout to see what was causing the lag. And strangely, it was instantiating lots of point data types in the hex map. Stuff which should be near-instantaneous, not half-a-minute.

Well, Tiago came to the rescue and suggested clearing my build and starting fresh. (Think of it like clearing cache in a browser.) And sure enough, the game was smooth as silk again after.

Crisis averted! Though there was a bit of panic in there for a while :)

Anyway, leaderboards still require testing, but I think they're basically done. The trailer is still in "info gathering" mode. The website team is probably overdue for feedback from me. Lots still to do.

But first, I think I'm going to set aside some time Monday(ish) to finally update all builds to v1.15 for the PC version. It's been in beta/test mode for a while without any major issues, and folks like those on GOG.com don't have access to its fixes yet.

Until then, have a good weekend!