Home Artists Posts Import Register

Content

What goes up, must come down!

Things are finally settling down, at least on the outside, but I've been hard at work as ever, late nights and very full days, dealing with all sorts of stuff--design, optimization, debugging, tech support, keeping up with the community, trying to replace the freaking DRM-free store which got so old it apparently no longer supported a number of browser setups :/

That last bit was hopefully finalized today as I published the updated version of the Buy page with its new systems. Hopefully that won't require yet more work once people actually start using it and expose some new issue xD

Sales are coming back down to expected-and-not-unreasonably-high levels, so maybe at some point over the next few months we'll get to see what the new price really means for the longer term. Haven't really paid any attention to the details, though. That's for another time.

The number of new daily score submissions is also down, of course, but still well above pre-Beta 13 (and especially pre-Dosh :P) levels. There are other sources of data to gauge ongoing interest, but that's the only number I get a consistent glance at each day out of habit as the leaderboard update happens, so it's kind of a benchmark for me. Even with regard to that source we could get a potentially more accurate picture by examining run length to see how many individuals are submitting fewer runs because each run is getting longer (due to increased experience), but examining these sorts of things are exercises that would be just for fun anyway, as it won't affect my work or what I'm supposed to be doing anyway.

(Then of course there are the people who don't submit scores at all, or play entirely offline, who don't factor in anywhere at all :P)

But Discord server activity has remained stronger than ever, with lots of new players filtering through (it's kinda funny to see #cogmind as active, or more active, than the spoiler channels, due to the ratio of fresh players! quite the opposite of trends in recent years).

There are also no doubt a lot of lurkers who showed up to the server specifically for #cogmind, as we continue to gain members at a much higher average rate than from before Dosh's video, but not all of them actually end up chatting (yet / right away).

Very cool to see some of the new Cogmind players also shifting over and discovering other great roguelikes due to the shared server structure :D

What goes up, must come down?

Like last time, those aren't the real numbers I want to talk about. Let's talk dev progress!

The big numbers coming down are actually... wait times :)

As of today I've finished optimizing Cogmind's data loading/processing capabilities for now, and the results simply blew my expectations out of the water.

Startup

Startup time on my laptop went from 10.8 to 2.0 seconds between hitting COGMIND.EXE and running around in game o_O

This is operating from mostly precompiled data rather than having the game do all the required prep work at runtime, as I described before. A number of architectural changes were naturally required to fully support this approach, but it was already partially ready for such a system so that at least saved some time (going this route was inevitable, just a matter of time :P).

Maps

Precompiled data doesn't just mean faster startup times, it also means faster map entry! You know how sometimes you might have to wait for a new map to fully generate before entering it? "UPDATING SYSTEMS," so the message goes... Well that's mostly gone :P

You generally won't even have time to read that message before you're plopped into the new map ready to go. This is even the case on maps that almost inevitably would take a short while before (some caves, for example). You might occasionally still have to wait just a moment, but it's a relatively quick moment ;)

Here's a short sample of the time it takes to enter new maps, demonstrated via random map loading:

Audio

Last time I mentioned that after an update the sole remaining startup time bottleneck would end up being audio resources, which themselves can't really be sped up further--there are simply a lot of them and they need to be decompressed and loaded in order to play.

Well, the idea was to at some point delay the loading of audio assets until you're already playing, for example continue loading them in a separate background thread as you play, and if there are some that need to be played immediately for the interface, gameplay, or ambience, load those right away as needed.

Rather than wait on such a system I decided to try it out now. It's nice :)

The first step to building such a system would be adding the ability to play sounds from files on demand precisely when they need to be played, so I built that first and it works so well I decided to not bother with ongoing background loading for now. That's my experience, at least; we'll need wider testing to how the experience fares for other players.

This feature is on by default, but can also be deactivated in order to use the old method of fully preloading all audio on startup if one so desires/requires. That will again increase the startup time by some seconds, that being the final bottleneck which was removed by this feature.

The other impact of fully deferred audio is significantly reduced RAM usage. Uncompressed audio files occupy quite a lot of memory, in fact generally the majority of that used by Cogmind, so if you only load what you need... As an example, a fresh Beta 13 run on my laptop sits around 390 MB of RAM use, compared to less than 120 MB  in Beta 14, dropping to less than a third.

The potential third option, my original plan to continue loading all audio in the background on startup, would theoretically be possible, but I'd rather not since it doesn't seem all that necessary and could introduce other kinds of multithreading issues.

Files

A less important but noteworthy side effect of the new architecture optimizations is comparatively lightweight data: /Cogmind/ now contains fewer files, smaller files, and also a smaller .EXE since it no longer needs to include a bunch of extra processing capabilities. Even more could probably excluded, but it's not exactly huge anyway...

Excluding audio which remains unchanged (or will of course continue to grow with Beta 14 and more releases) Cogmind's Beta 13 install includes about 8.53 MB of data, which in the next version is now only 2.74 MB! So seemingly a nice two-thirds reduction there. Of course Beta 14 development continues and more will be added by the time of release, but still, you can see the relative savings. World gets bigger, files get smaller?! It's the great backwards update ;)

Despite the broad scope and low-level nature of all the updates described above, so far it seems to be extremely stable under testing. I also like the fact that it simplifies the deployment process for me.

Look at all those good numbers coming down!

Comments

Chaz Woodall

It’s always really nice when you get a chance to refactor and optimize instead of perpetually having them in the backlog lol

Kyzrati

Hahaha right? I was like holy moly there is a decade of cruft in here, could use a bit of cleanup and it felt good to *really* code for a change! I mean I guess I was also doing a lot of that for Beta 13, for sure, though it was all engine and UI stuff, whereas this was at least working with actual game data. That said, happy to be done with that so I can get back to the most fun parts: content :D Get to wear so many hats as an indie dev...