[patch] Instant zoom-in and instant zoom-out

[patch] Instant zoom-in and instant zoom-out

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

[patch] Instant zoom-in and instant zoom-out

Post by colorblind »

http://teake.home.fmf.nl/temp/zoomUpdate.patch

When I saw Supreme Commander had an 'instant-zoom-out' function, I figured Spring could use it too. So here it is!

This patch adds the following to the Overhead camera controller:
  • When holding down left ALT, you can instantly zoom out to the maximum (mousecursor down) or initial height (mousecursor up).
  • It also resets the angle of the camera if you accidentally pressed CTRL+mousescroll.
  • The instant-zooming is done smoothly.
The major advantage of this patch is that you only have to use the scrollwheel once to zoom out completely, and once again to zoom in to the initial height.

Get the patch, apply it, compile and tell me if you like it :)
And sincere apologies for the lack of an illustrating video; I can't compile Spring with AVI-support ...
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

cb for dev!
User avatar
BvDorp
Posts: 439
Joined: 14 Oct 2005, 12:09

Post by BvDorp »

Sounds like a great feature!

However, I think some ppl need to gather around and think how the camera should be handled. ctrl, alt, shift, 3 mouse buttons, it just gets confusing.
User avatar
BvDorp
Posts: 439
Joined: 14 Oct 2005, 12:09

Post by BvDorp »

Min3mat wrote:cb for dev!
:lol: :lol:
User avatar
Optimus Prime
Posts: 755
Joined: 03 Oct 2005, 14:31

Post by Optimus Prime »

BvDorp wrote:Sounds like a great feature!

However, I think some ppl need to gather around and think how the camera should be handled. ctrl, alt, shift, 3 mouse buttons, it just gets confusing.
yeah. I would prefer to zoom only with the mouse wheel.
But good feature i will try it out :)
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Nice, I'll commit it when I get home
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

Great, thanks!

(and don't forget to commit my Radar group AI :)
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

It would be nice if you made it somewhat more responsive, like allow it to reverse the zoom direction while zooming in/out.
Also seperate this code and the standard zoom code with an if or something, so it's clear what does what.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Can you also make shift+middle mouse button NOT change camera styles? It gets annoying when you're trying to zoom around the map and want to swivel at the same time.
User avatar
Zoombie
Posts: 6149
Joined: 15 Mar 2005, 07:08

Post by Zoombie »

I would like if you zoom into were your cursor is. Like you zoom out, put your cursor on another area and then zoom back in and the camera zooms way over there! Think of how usefull that would be!
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Post by Comp1337 »

imo, use TAB. hold down tab and you will zoom out all the way. release it and you zoom back in.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Zoombie wrote:I would like if you zoom into were your cursor is. Like you zoom out, put your cursor on another area and then zoom back in and the camera zooms way over there! Think of how usefull that would be!
+
Comp1337 wrote:imo, use TAB. hold down tab and you will zoom out all the way. release it and you zoom back in.
==FTW.
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

jcnossen wrote:It would be nice if you made it somewhat more responsive, like allow it to reverse the zoom direction while zooming in/out. Also seperate this code and the standard zoom code with an if or something, so it's clear what does what.
Done. I've updated the patch.
Zoombie wrote:I would like if you zoom into were your cursor is. (...)
That's already implemented. SJ was so kind to do that :).

And about the TAB-thing: it sounds like a very good idea, but sometimes I want to give orders when I'm zoomed out to the max. Holding down TAB isn't very convenient then (and might even cause troubles). I think that should be something for the new GUI (along with other camera handling changes like BvDorp suggested).
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Then just have it as a press->out press again->in. It'd be nice if you could get the whole map in.

And beat those supcom traitors to the punch!
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

I think what's being aims at is this, hold tab, you zoom out, when you release, the camera zooms back to the pre-tabbed zoom level aiming at the mouse, basically a way to quickly zoom out and to a hotspot. if while zoomed out you move the scrollwheel in, it makes the "zoomed out" the new "current zoom"... double tapping the tab button will zoom you to the "default zoom level"
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

When you put it like that it sounds complex and awkward to remember.

just make the scroll wheel zoom out much much faster than shift+zoom when you hold down alt
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Post by Rayden »

The feature would be better if TAS Engine would switch to a low detail view of the map wenn zoomed out at maximum. (Better performance). Maybe instead of radar blobs colored icons for units. An icon for ship, vehicles, kbots and superunits
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmm RAayden that sounds a lot like the HW style sensor mode I've been repeatedly going on about for the last 2 years that everyone is ignoring.
User avatar
BvDorp
Posts: 439
Joined: 14 Oct 2005, 12:09

Post by BvDorp »

Rayden wrote:The feature would be better if TAS Engine would switch to a low detail view of the map wenn zoomed out at maximum. (Better performance). Maybe instead of radar blobs colored icons for units. An icon for ship, vehicles, kbots and superunits
SupCom does this. But this is not the same feature

So there's 3 features discussed here now:

- Icons when zoomed out far enough
- Low detail map (will not be neccessary with new map format, supports this already)
- Fast zoom out/in

CB does the zooming thing. Can the devs plz feedback on the icons request?
bamb
Posts: 350
Joined: 04 Apr 2006, 14:20

Post by bamb »

If the units were just blobs from a certain distance, it might be useful to show the unit type and hp in special "tooltips".
Like if you have 10 pw:s and 3 krogoths and you selected the 13 blobs, it would show first a krog icon and number 3 in the below box and then a pw and number 10. (Order by total health or some other measure). It could use the buildpics.
That way, you could do a lot of playing from the way-out view.

And btw, that fog kinda sucks, it makes it hard to view many maps from further out, though it's hard to invent a good solution for that.
Post Reply

Return to “Engine”