#Strategic Zoom - Zooming Out Towards Origin

1 messages · Page 1 of 1 (latest)

livid patrol
#

I just recently started playing BAR, and I come from mainly playing SupCom:FA, so BAR's strategic zoom felt off to me. I've implemented that feature in other 3D viewports (ex. AAA game engine world editor's viewport), and so I've spent quite a lot of time exploring exactly how it worked in SupCom and how it worked well in other slightly different camera situations (such as not wanting to tilt up near ground in our world editor).

The main thing BAR is doing that seems weird to me is that when you zoom out, it's panning the camera, but seemingly rather inadvertently and without a clear goal, just sliding away from the cursor in an unhelpful direction. SupCom, and my similar implementations, all pan towards the map origin (X&Y only) while zooming out. That tends to be very handy as you're naturally drawn towards the center of the map while mousing around and can very easily zoom to a point where you are centered on the entire map, simply by zooming all the way out, regardless of your cursor position. It affords a much smoother navigation: up (and inwards), over, and down (focusing on cursor).

Is there any reason why BAR has been implemented without the panning towards the center while zooming out, or is that really more of just an oversight in the implementation?

oak spade
#

That seems weird to me, I always want to be focused on the area around my cursor whether I'm zooming in or out

strategic zoom towards the map center is probably widgetable though

ashen walrus
#

I've never played a game with the described style of zoom before, but it seems like it would initially be very unintuitive, then more efficient than current options once muscle memory developed. Probably not something to ever make default, but I look forward to trying out the widget if someone makes it

eternal salmon
#

There are several kinds of zoom. Another being activated when pressing tab on default keys to zoom out completely to a strategic view and when you tab again you jump to your cursor. The camera and zoom functions were added organically as was seen fit at the time.

I prefer the zoom you are describing that is used now to the one in faf as I need to know more about my local situation than about the whole map

livid patrol
# oak spade That seems weird to me, I always want to be focused on the area around my cursor...

It already pans away from your cursor while zooming out, just away from the center rather than towards it, with the main result currently being that you end up way off the side of the map at full zoom out, with much of the map off screen, while what I'm proposing would end up with the full map in view when fully zoomed out. To clarify, it still interpolates from your current camera location towards the center. Some camera panning while zooming out, towards the center, is actually a key aspect of what makes strategic zoom so intuitive, fast, and useful.

#

I'd be happy to make it as a "widget". Can anyone point me to where to get started on "widgets' for BAR, as I'm still new to the BAR ecosystem.

oak spade
#

hmm not actually sure if it's widgetable, mouse buttons aren't callable yet afaik

livid patrol
#

It's actually driven by the "mouse wheel" action, rather than the "mouse buttons", in case the situation is different for that.

#

I found some example widgets, such as camera_middle_mouse_alternate.lua, and what I'm proposing seems doable as a widget. I'll give that a try and see how it goes for a start. I really think this should be the default zooming behavior, but hopefully if I make such a widget, then people will see what I mean and perhaps they'll agree and it could eventually become the standard. In the meantime, I'll at least have it working as I'd like, and everyone will have the option to use it too.

#

As an aside, I'm rather horrified to learn how much BAR is using LUA. I do now recall SupCom also did a lot of that.

As a professional game programmer with a couple decades of experience in C++ and LUA, I've found LUA in practice to generally be around 10 to 1,000 times slower than C++. That said, LUA is much more accessible for modding and such, so I can still appreciate that aspect here.

glossy cipher
#

It's 'Lua' and not 'LUA' cause it's not an acronym duck and run

livid patrol
#

You are correct. Thanks for pointing that out. I've written in Lua for many years and often written it in all caps and seen it in all caps a lot, but from a quick research on it just now, you are definitely correct that only the L should be capitalized. I'll start working on dropping that bad habit immediately.

#

In recompense, I'll point out that "because" is a conjunction while "cause" is not. Misuse of "cause" is a bit of a pet peeve of mine.

ashen walrus
glossy cipher