Lemmings Forums

Lix => Lix Main => Topic started by: Simon on November 13, 2024, 09:28:50 PM

Title: Zoom: Preserve Mouse-on-Land even if We'll See Void
Post by: Simon on November 13, 2024, 09:28:50 PM
I've toyed with the zoom behavior in Lix 0.10.26.

Existing rule from Lix 0.9 and Lix 0.10: Generally, preserve mouse-on-land when you zoom. But if you can move the camera to see more land (and less void, i.e., less of the dead area outside the level boundaries), always prefer to shift more land into view over preserving mouse-on-land.

Experimental rule A: Generally (and more often than before), preserve mouse-on-land when you zoom. Only shift more land into view if the camera would center on a void pixel after the zoom. Or, worded in a different way: Eventually, we still shift land into view, but the camera will allow some void (up to 50 % each of left/right/top/bottom may be void) before the camera prefers more land.

Bonus effect of rule A: When we zoom in, we zoom into the mouse cursor, which enlargens (or at least keeps the same amount of) the land on all four sides of the mouse cursor. This can never run into the situation where rule A wants to shift more land into view. (Only zooming out can shift more land into view.)

Downsides of rule A: When we zoom out, the land isn't necessarily anchored at the panel at the bottom any more. I can try to change the rules and re-anchor, but it will come at the cost of less mouse-on-land preservation.

See it animated
(https://www.lixgame.com/etc/land-under-mouse-central.gif) (https://www.lixgame.com/etc/land-under-mouse-corner.gif)

Both of these gifs are under this experimental rule A.


Test it yourself: Put lix-0.10.26-halfvoid-camera.exe (https://www.lixgame.com/etc/lix-0.10.26-halfvoid-camera.exe) into your 0.10.26 tree, or build branch camera from my unstable repo (https://github.com/SimonN/lix-unstable). Either way, you'll get experimental rule A.

What do you think? Is this useful or annoying?

Do you want to allow even more void, to preserve mouse-on-land even more often?

When you zoom out so that we could re-focus the camera to show the entire level at once, should we refocus (instead of preserving mouse-on-land) to show the entire level? Or do you prefer to scroll yourself to see it all?

-- Simon