• Register
Post news Report RSS The Next Big Thing

About progress towards the upcoming release, to include a huge number of achievements... and a bunch of other features as usual. :)

Posted by on

Progress is good! I actually took some time off in March to create a separate Cogmind-related game I released for free as a 7DRL: POLYBOT-7, then wrote a massive postmortem for that about how I turned Cogmind into another game within a week. (For more information about how this game is and isn't like Cogmind, see the release announcement.)

Aside from that though, work on Beta 6 is well under way. I worked from Japan for a few weeks, but my workstation there is identical to home so no negative impact on progress :)

As per the roadmap, the next major feature is... Achievements! Yes, we're finally doing one of the things listed there rather than all the other secret/unlisted stuff I'm always throwing in xD

I've marked this one feature alone as taking three weeks, and I've heard some surprise at that number so may as well take this opportunity to give a rundown of what's involved. It's quite a lot of stuff!

On the surface it appears quite simple, and technically if you're just adding a handful of achievements for Steam it's really quite easy, yeah, but Cogmind's particular situation is going to include a lot more achievements, and a lot more moving parts, than your average game.

Here's a high-level TODO list of what it takes to bring Achievements to Cogmind:

  • Research Steamworks docs for achievement specifications
  • Create and organize a list of achievements
  • Do an achievement UI mockup
  • Test how Steam achievements work in other games, and how they're presented on the player and community side
  • Create the achievement data, including names and descriptions
  • Implement an achievement handler, and check for each achievement at relevant points in the source code
  • Implement the Cogmind-side dedicated achievement interface
  • Decide how to integrate achievement notifications into several different existing UI systems
  • Find solutions for a number of tough achievement-related issues
  • Create icon art for every achievement (in both acquired and non-acquired form)
  • Test a selection of achievements in a non-Steam build
  • Build a system to communicate with Steam regarding achievements (prioritizing game-side data, rather than Steam-side like most games do it)
  • Add achievement data to Steamworks backend
  • Live test the achievement system on Steam, including syncing of old data on either end
  • Fix the inevitable oversights and bugs in the system before they reach players
  • Actually release it :P (after adding a whole bunch of other stuff that should go in the release, too!)

As of now, all 256 achievements have been decided! The number is a complete coincidence, and I will be sad when further on down the line I add yet more achievements and ruin the count (or I'll just have to jump straight to 512, but I don't think I'm quite that crazy :P). I've recently been working on final icon passes and here we have the entirety of the more basic "Mechanics" category, which makes up about a quarter of all achievements:



I'll show more of these next time, and you can maybe guess what's what ;)

Of course we also have the built-in achievement browsing UI, with which I've so far only reached the mockup stage. Remember, achievements will be available to both Steam and non-Steam players, and both will be able to take advantage of the better browsing features I have planned, as you can see here:



I like the way the design turned out--lots of control, accessible to both mouse and keyboard players, includes both filters and sorting...

Now notice again this is a MOCKUP, so these icons don't even match the achievements next to them, and there are even duplicates. Little details like that don't matter when just trying to figure out colors, layout, and functionality :)

Optimization

In case you didn't notice (you've probably noticed xD), Cogmind can take a while to start up. This is because pretty much all data is loaded right at the start, which for years was fine, but it's continued to grow all this time and sequentially loading everything was starting to be quite a drag, made all the more noticeable by the fact that I have (and prefer to keep) a blank screen while the game starts. Windows might even decide pop up a nice little "this program is not responding" notice.

I'll deal with that message separately later, but more important is that it shouldn't really take so long to get into the game, so I took the three largest chunks of data and multithreaded them. Fortunately this was quite easy to do since each is mostly raw data that in this case really doesn't care about the existence of the others. The three chunks are GUI particle scripts, map particle scripts, and sound effects. (The only exception was particles that needed to reference sound effects, so for that I added some code to link them up after all the threads completed.) Highlighted profiling data for some potential optimization candidates:


So what kind of savings are we looking at? In my test build scenario, startup took 19.13s, including 6.27 for GUI particles, 3.98s for sfx, and 2.31s for map particles. That's 12.56 seconds for three things that can essentially be loaded in parallel. Post-multithreading profiling:


The main thread sleeps for 6.81s, meaning that basically the steps that previously took 12.56s were instead crammed into 6.81s. So startup time on many machines has been cut by approximately one-third... Nice :D

Here's a graph demonstrating what Beta 6's multithreading looks like, the first such case in Cogmind:



There's more optimization that could be done, but this was the easy stuff and most other work would have significantly diminishing returns so isn't worth it right now. I also left all the old sequential loading code intact so that I can switch over to that with a debugging option in order to properly debug any loading issues, just in case. It's not the kind of thing that usually has issues, but if it does it'll be nice to keep it single-threaded because multithreaded debugging is just asking for trouble and confusion.

Cogmind the RTS

For Beta 6 I've added a fourth way to pan the map: RTS-style. Funny enough it took years for anyone to request this on top of the existing methods, but I'm happy to oblige! Here's a demo of the new feature in action:



This type of panning will of course only be available in true fullscreen mode, though according to the latest Cogmind stats that's the mode two-thirds of players are using so coverage is decent. I find it clunkier to use than the precision offered by other methods, but everyone has their own needs!

This is actually the first time I've implemented a feature like this, so I had to figure out the best way to do it. The diagram below shows what I'm doing, calculating a line from the center to the cursor and just panning along that:



I'm not 100% sure if this is the best approach, but we'll see what those who actually need it have to say once it's live :D. Technically with some more work I could probably improve on the same method, such as having it accelerate slightly at the start? In any case, the panning speed is adjustable in the options menu as well.

While we're on the subject of RTS, here's a glimpse of what a Cogmind RTS might look like, zoomed out tactical view!



I made that as an April Fool's joke a couple years back, and talk about unexpected results: last year the official Twitter account for RT used this image for their coverage of cyberwarfare in the Middle East o_O

IBM Love

By request, I've added yet more map ASCII variants at even smaller sizes.

These include Terminus 12:


Terminus 14:


And my personal nostalgia-inducing favorite, IBM VGA 14:


That's one I would love to add at all sizes, but it really only works at the traditional size it was designed for. (Unlike, say, a modern fixed width font like Terminus which is pretty awesome at all sizes.)

Here's a fully-revealed map section using the IBM font, because IBM font:


Beta 4 Stats

As usual following a major release, with Beta 5 out the leaderboards were reset. We're already seeing a lot of good runs this Beta, including a ++ extended end-game win which we didn't get to see last time:



Old leaderboards and scores have been archived, accessible at the bottom of the page.

Overall we're seeing significant improvement among newer players. I've also done a lengthy summary of stats for Beta 4, including highlighting certain achievements and an overview of general player performance and meta data.



(If you're interested in this kind of data you can also scroll back through the thread for stats on previous Betas since I don't always cover the same things.)

Debugging Features

Over on r/RoguelikeDev I shared some of Cogmind's debugging features that I use for development, so check that out if you're interested in some more behind the scenes sort of stuff. Some examples:

Highlighting map encounter prefabs, colored by their type (fluff/reward/danger/risk-reward...)


Visualizing squad routes

Visualizing ambient sfx propagation

Watching entity (robot) time values

Checking cellwise cave-in factors as affected by explosions


Next time lots more about achievements!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: