Official development blog

Experimenting with Drone PIP

Early this month I was streaming a Cogmind run on Twitch, at one point once again sending out drones to scout around as I like to do. Drones are generally pretty fast, and I’ll often just make sure I’m in a relatively safe spot and keep an eye on what the drone(s) find while I wait and decide where to go next.

The drone centering and following feature added back in Beta 10 has been quite useful for this purpose. (For years before that you had to actually scroll the map yourself!)


Cycling through active drones to see their surroundings, which also allows passing turns while following their view.

But in this particular stream as I sat there waiting to see what they’d uncover, I also kinda felt like it was a situation in which I already knew where I wanted to head, but it would be somewhat tedious to both move and keep an eye on what the distant drones were up to before they splat on some trap or were blasted by a hostile squad.

I blurted out that we need a drone PIP (picture-in-picture) feature to make it easier to operate while scouting drones are active, and of course ever since I mentioned that it stuck in my head, just asking to be explored as a feature. So I found some time to try it out a little while ago!

The technical premise is pretty simple: Since Cogmind is a monospace terminal interface, when drawing the map we just have to find some space in the view where we can copy over a portion of the cell data from the drone’s surroundings to somewhere the player can see.

Finding this space isn’t too difficult since Cogmind mechanics and UI were designed to fit a 4:3 display anyway, despite most everyone these days using 16:9 or higher, meaning there is usually a decent amount of space available at the left and right sides of the map view which is not as vital to be able to see at all times. Those are the spaces we can cover with other things, and is also why you see non-modal info presented in those four corners for various purposes.


Sample info that can overlap map edges: Detailed combat log to the top-left/left, audio log in the top right, special mode menus to the bottom left, and achievement notifications in the bottom-right corner.

Anyway, I wouldn’t be worried about coming up with room for a proper implementation, though I was interested in seeing how it feels when active, since having such an interface feature working even in experimental form has a way of triggering deeper thoughts about potential roadblocks or related features.

Experimental PIP

Lo and behold, a basic drone PIP in action…


Pretty cool! This didn’t exactly take all that long to implement for testing, but that’s all it is here, just a quick and dirty experiment thrown together in order to watch it, not even 50 lines of code or so.

The process is quite simple: When rendering the map, check if there’s an active drone and pause the rendering to first force another render around the drone’s own location; save the console info from around the drone and return to finish the normal map render, then when that’s complete copy the drone visual back over the map area wherever the PIP should appear. In the sample above that’s the top-left corner.

I’m not planning on adding this feature for now, though building it would require thinking about how the window interacts with other UI content that can appear in locations it might occupy, and the best default location. It might even be interesting outside the map, up in the top-center console, though that comes with its own problems in addition to that area’s relatively limited height.

There’s also questions about whether and how to get the window itself to properly display other UI-related content that can appear in drone-explored areas, for example (and most importantly) item/enemy labels that don’t otherwise show as you can see in the demo above.

Proper PIP

What would it take to turn this into a real feature, besides not being pretty hackish code :P

Well the PIP only needs to activate once the drone is no longer visible on the map view, but okay that’s super low-hanging fruit, let’s try the more complicated stuff…

  • Maybe window dragging to actually put the PIP monitor wherever you want
  • If currently following/locked onto a distant drone in the main UI, the PIP could perhaps switch to show the area around Cogmind’s position instead
  • Multiple simultaneous PIP panels for more than one active distant drone (now I’m imagining having a boatload of combat drones out working for you and Cogmind is like the security guy just watching everything play out on a dozen monitors xD)
  • Setting your own “PIP point”, for example around a Terminal with an active tracking Trojan
  • Of course there’d be customizable PIP size

As you can see, this one UI feature spawns lots of neat ideas…

It’s also a ton of work though, and based on its effort:usefulness ratio I have to assign this one a pretty low priority. Although shelved for now, I might revisit it alongside the next big drone mechanics update I want to do?

This entry was posted in GUI and tagged , . Bookmark the permalink. Trackbacks are closed, but you can post a comment.

Post a Comment

Your email is never published nor shared. Only the anti-spam entry is required. See here for the privacy policy.

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>