Thursday, September 4, 2014

Abiathar Confidential: Sneaky Ways to Get Around Fast

I'm away from all electronic communications this week; enjoy automatically-posted issues of Abiathar Confidential!

Over the time I developed Abiathar, I received boat loads of requests for shortcuts and navigation options, and added quite a few myself that most people probably don't know about. In this post, I'll make known all the shortcuts and navigation options that I remember - but it still might not be comprehensive!

In the beginning, Fleex compiled FMod.dll there was only one way to move around inside a level: press the arrow keys to move the viewport by one tile in the appropriate direction. Moving fast was done by holding down an arrow key. To go to a different level, you had to pull down the Level menu and pick from the list.

Once the basics like the selected tile bay were functional (this was when Abiathar was called Fudge), I added a feature that remains widely unknown. If you have a level entrance sprite in the infoplane bay, you can middle-click its icon to go to that level. This was adapted to Galaxy levels once support for them was added.

Still back in Fudge times, I added some modifier checks to the key-down handler to help you fly across the level with even more alacrity. If you hold down Shift while pressing an arrow key, it moves two extra tiles in addition to the base of one. If you hold down Control, it multiplies the value that considers whether Shift is down by five. Executive summary:

  • No modifiers: 1 tile
  • Shift down: 3 tiles
  • Control down: 5 tiles
  • Both down: 15 tiles
If you used Control and Shift, you could easily fly extremely far away from the level (bounds on scrolling weren't added for a long time), so the Backspace key moved you back to the upper-left of the level.

Remaining in pre-release times, but now called Abiathar (I think), support for the mouse scroll wheel was added. If you roll the wheel toward you, the viewport moves down; if you roll it away, the viewport moves up. If you hold down Control, the scroll wheel changes your horizontal position: roll it towards you to go right, away to go left. Each roll of a normal mouse goes two tiles.

Sometime after release (I think?), I added more ways to switch levels. The Omegamatic used PageUp and PageDown to switch levels, and this is entirely reasonable. In it went.

Around v1.2, people asked for a way to lock the scrolling so you can't fly away into no-level-land. This was actually very difficult to implement, but it got in, and remains under the config option FreeScroll (default: True). There are also some very complicated rules concerning the behavior of the mouse wheel at bounded level edges. I think the general rule is to start moving along the next wall when out of scrolling space.

To make arrow key modifiers even more complicated, there are two more configuration options as of v2.0 that control how far each unit of movement will actually make you go. ArrowScrollMul is a factor applied after keyboard modifiers to make each key press go even further. (ArrowScrollMul is an Integer, so if you set it to a less-than-one decimal number, it is entirely likely that it will be rounded to zero and make it impossible for you to move.) If you set it to 2, held down Control and Shift, and hit just one arrow key, you would fly 30 tiles over! 

The other option, MouseScrollDetScale, is pretty strange. It could be said to control how many mouse wheel detents are necessary to scroll one tile. The mouse I tested on, for example, sends 120 detents for each notch of the wheel. Divided by the default value of 60, this scrolls 2 tiles for each notch rolled. (It's non-linear!)

In the upcoming v2.2, there is a feature added that allows you to drag with the middle mouse button to pan the level. This makes it the first way to scroll in a non-perfectly-straight method.

So there we have it. This is all the ways of moving around in the level and switching levels that I can remember. There might be more, and there are always sneaky ways of performing edge cases efficiently in all areas of the tool.

No comments:

Post a Comment