The core performance of our map zooming function is working smoothly–common home windows are popping up the place they’re purported to go, map interplay itself seems regular… nonetheless there are many much less important techniques that also want to contemplate the impact of zooming.
And after these there’s the public-facing facet of this function, like how do you entry it, and do we have to animate it?
Odds and Ends
Gotta test each little factor, just like the tiles-ASCII toggling animation, does that work?

Nope.
How in regards to the map export operate?

Nope.
Anyway yeah only a case of moving into and looking for out what prior assumptions they made in regards to the interface that not held true when zooming is feasible.
For the tileset animation I believe it was so simple as having wanted to set it to match no matter tile dimension the map is presently utilizing, relatively than at all times utilizing the usual dimension. Humorous end result although 🙂
The map export situation was comparable, leading to solely the top-left nook of every oct tile being rendered, however to an enormous principally empty picture. Resolving that was just a little extra sophisticated than merely switching to a dynamic tile dimension since you don’t need the output to really use bigger tiles (doing so takes ceaselessly and ends in a large picture file that doesn’t even add any further information because it’s purely a pixelwise upscale). As a substitute what occurs now, assuming the participant is zoomed in, is an computerized zoom out, put together the picture, then zoom again in, all behind the scenes. (Map export photographs are created by repeatedly transferring the map view, rendering the view space, and copying that view to a picture floor, ultimately stitching collectively all of the views right into a remaining picture.)
A lot of Cogmind’s optionally available particular modes even have their very own UI parts, often an interactive window within the bottom-left nook of the map, and though I don’t usually replace these, failing to have them keep in mind a zoomed map would nearly be equal to leaving them behind. That might be dangerous, particularly the fan-favorite Participant 2, and the essential-for-some RPGLIKE.
This ended up requiring that a few of them be moved to the brand new window-container-map-view-thing I described final time, or in different circumstances slight architectural modifications.

Pattern particular mode consoles remaining purposeful no matter zoom state.
Okay we’re nearly completed up with the zoom operate right here, let’s not overlook in regards to the final however not least essential check of all… stress testing!

Repeatedly zooming out and in doesn’t appear to interrupt something, besides possibly a number of eyes when you hold this up.
Entry!
From the start and all through this whole course of to this point, I had merely dropped the zoom toggling code into the enter part for responding to the map intel key, ‘z’. Now it’s time to contemplate how the participant will entry this function…
Truly, so far as keyboard enter goes ‘z’ appears acceptable, yeah? Clearly.
Then the place does intel go? Below previous circumstances I’d be tempted to go away map intel to F8, its matching window key which additionally works, and regardless of the awkwardness of F8 being a operate key, I don’t imagine toggling intel has been a standard want within the first place.
That mentioned, whereas engaged on map zooming I’ve additionally been considerably serious about interface developments down the road, and realized we’ll in a while have to release one more key anyway, so the place can we get two keys? The reply is stock sorting.
Cogmind’s stock could be sorted by sort, mass, and integrity, every with their very own key (t/m/i). We don’t really want the latter two. It’s not that they completely by no means come in useful, however after the Beta 11 storage rework the biggest construct inventories are not as excessive as they was, so there are fewer objects to parse via, and you may also comparatively simply see the mass/integrity information pretty simply in numerous information visualization modes–colored bars and numbers for integrity (that are additionally mechanically subsorted for matching components), and the ‘q’ information mode exhibits mass as its first quantity.
Two entire keys! And fortunate for us they match our wants completely: ‘z’ for zoom, ‘m’ for map intel, and ‘i’ for… properly you’ll came upon what that’s for later 😉

The stock’s {t/m/i} buttons have been changed by a single massive {type (t)} button.
So anybody eager to toggle the zoom state of the map can faucet ‘z’ and growth, however what about mouse customers? Can’t overlook mouse customers.
I had some totally different artistic concepts* for this one, however settled on simply making it a typical button. The

There may be additionally a brand new tutorial message shortly after beginning the sport that factors out the zooming function, after which the button will glow till it’s used for the primary time.
The button disappears utterly whereas keyboard mode is lively (just like the CYCLE buttons within the components checklist), because it’s not wanted in that case.
*Earlier than getting artistic I initially wished to make use of the mouse wheel for zooming, nevertheless it’s a mere toggle relatively than a easy zoom, in order that’d be a little bit of a waste for the wheel, and making such a change would take away the easy technique mouse customers can use to go flip(s).
Fluff
In the direction of the top of the map zooming work I couldn’t assist however make the most of the chance for a brand new animation to check out plenty of attainable ideas. Like dozens and dozens of them.
I shared a bunch of samples from that course of on Patreon, like this one I assumed was fairly neat:

On this animation check, zooming the map in ASCII mode merges a number of copies of every character into a bigger model to fill the ultimate cell dimension.
The issue with such animations is that they are often too distracting when the aim of adjusting your zoom is clearly to get a greater have a look at one thing or some issues, be it nearer up or additional away. So that you want to have the ability to rapidly focus, a necessity which most animations are more likely to detract from.
And whereas positive it’s enjoyable to get a cool new animation, if it will get in the way in which it will extra simply “get outdated.”* Yeah we might make it optionally available, but when it’s detrimental and most of the people would presumably need it off, then why add it within the first place?
*on that be aware, I do plan to ultimately swap out the world map animation for one thing snappier! the world outgrew that factor a very long time in the past…
In gentle of that evaluation, and having not discovered something extraordinarily compelling whereas exploring animation kinds, from early on I used to be already leaning in the direction of having no animation at all–short and candy, proper? Instantaneous outcomes, both massive such as you need it or small such as you need it.
However possibly there’s another sort of animation that would add just a little fashion and possibly even be considerably useful for rapidly digesting the brand new view space…
I obtained to pondering that one of many important parts that’s universally essential and the primary side you would possibly visually analyze is the overall format of the map. That is often outlined by partitions and doorways, so what if we simply highlighted all of these after a zoom?

Wall highlighting shortly after a zoom state change. Zooming out lets the spotlight last more because it’s extra related in that case, having added new content material to your viewport.
I additionally thought-about highlighting different objects like machines and hostiles and/or one thing extra, however determine it’s simple to go overboard and get again into distraction territory, so determined to cease there for now.
And that’s it, the map is now zoomable, and zoomable in fashion, and could be performed that manner. Nevertheless it’s not but perfect! Taking part in with a zoomed map introduces but extra challenges that we’re going to wish some new QoL to assist resolve subsequent time…
That is the fourth in a five-part journey via the method of placing all this collectively: