Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

painfully slow zooming #76

Closed
filbo opened this issue Apr 15, 2022 · 9 comments · Fixed by #85
Closed

painfully slow zooming #76

filbo opened this issue Apr 15, 2022 · 9 comments · Fixed by #85

Comments

@filbo
Copy link

filbo commented Apr 15, 2022

Zooming is quite slow and painful for me.

For example, my guesses today include Mauritania and France. If I reload the page to get back to default zoom, and center the globe to put those two countries in view, I would estimate that the on-screen linear distance from one limb to Mauritania, from M. to France, and from F. to the opposite limb, are about the same.

From there, I zoom in with my mouse wheel: it takes 13 full strokes of the wheel before M. and F. are now touching the edges of the 'world view window'.

If I then center on Liechtenstein and zoom until I believe it would be readily distinguishable (I can't really tell because it isn't one of the countries I touched during this run) -- that takes another 17 full strokes.

For comparison, I positioned Google Maps similarly (Mauritania & France about as far apart as in the 'center the globe to put those two countries in view' step above). Then without zooming I recentered on Liechtenstein; then zoomed. After 1 full zoom stroke (pushing the mouse wheel as far as it will go in a single finger movement), Liechtenstein was clearly distinguishable. A second full stroke had L. covering 50% of the vertical span of the window.

FWIW, this is on Opera (87.0.4374.0, but has been happening since I first started playing Globle on some earlier version); on Linux, a rather old install (LinuxMint 17.3).

I'm aware there are all sorts of input scaling issues, that other users will have different experiences here.

I tried zooming while holding down Shift, Ctrl, or Alt -- none of these affected the zooming at all.

So my longwinded suggestion is: capture one or more of those state keys to multiply the zoom. All three would be good, e.g. Shift = 3x, Ctrl = 6x, Alt = 10x. That way if a particular browser eats scrollwheel + [ some shift ], two others are still available; almost all users would get to use at least one accelerator. 10x seems like a drastic multiplier, but according to my testing, at least for me, that would make Globle's zoom only about 60% as 'zoomy' as Google Maps' default behavior.

@filbo
Copy link
Author

filbo commented Apr 23, 2022

Today I guessed 'Monaco' first. I had to do 25 full-stroke zooms to get close enough to see what color it came up.

Fortunately, reloading zoomed me back out, so I didn't have to mooz 20-some times. It did, however, leave me guessing as to whether that guess had been recorded or not (yes, as it turned out -- as seen in the table of guesses at the bottom after getting the right country).

@filbo
Copy link
Author

filbo commented Apr 26, 2022

f7d9932 helps a lot, thanks. I'd still like a multiplier on the mouse wheel; or at least someone to tell me whether my experience is unique or 'normal'.

@the-abe-train
Copy link
Owner

@filbo I appreciate your input with issue, and your interest in improving the game. I don't think your experience is purely unique, a lot of players have trouble with the small countries for a lot of reasons.

In the latest update, I tried to increase the scroll wheel zoom speed but I honestly couldn't figure it out, there doesn't seem to be a way to do that with the 3D globe library I'm using. Although it doesn't solve the problem, I implemented the automatic zoom upon guessing to help with the zooming issues, and I'm glad to hear it helped!

Gonna close this issue because there's nothing else I can do for now, but if I find a better solution you'll see it in the game's changelog. Thanks!

@Phanabani
Copy link
Contributor

Hey there, this is funny timing because I was actually just looking at this issue because I wanted to implement this change (it's been bothering me too haha). I've managed to implement something like this in another visual application. I'll update if I manage to have any success!

@Phanabani
Copy link
Contributor

Phanabani commented Apr 27, 2022

Okay! I fixed it with minimal hacking.

So I was planning on implementing zooming with multiplication because multiplying the zoom amount is more natural than adding it each scroll. After a looooot of digging, I found this is already done in three.js in their OrbitControls example (in that function, it's called dollyScale) which your dependency react-globe.gl aka globe.gl uses for globe movement.

The problem is that globe.gl dynamically changes this zooming coefficient (called zoomSpeed) in globe.js as you zoom in and out in an onchange listener. This effectively counteracts the multiplication solution in three.js and makes it super frustrating to zoom (more like using addition for changing the zoom amount).

I found that globe.gl calls a hook called onZoom at the end of the listener execution, and this is exposed to the React component as the onZoom attribute! I'm just giving onZoom a callback that sets the zoomSpeed back to a constant value. I'll make a pull request! c:

@escalonn
Copy link

escalonn commented May 25, 2022

now that we get the nice auto-zoom-in on small guesses, my pain point is zooming back out being slow.
rather than faster zooming, i would prefer just a button above or below the globe, or a hotkey, that reset zoom back to default. as it is, i have to click on the (?) and then back on the globe.

@filbo
Copy link
Author

filbo commented May 25, 2022

Ditto @escalonn's experience. Although, at least for me, a browser reload gets me back to the same place (same guesses-so-far, same rotation of the globe) at a reasonable zoom. So a workaround exists, but it's ugly.

What is the status of #85 ? (and #86 ?)

@Phanabani
Copy link
Contributor

@filbo @escalonn My zooming fixes have been pushed to the site! Yay!! Hope it feels nicer for you both! 😊

@filbo
Copy link
Author

filbo commented Jun 3, 2022

@Phanabani thanks, it feels excellent! I might personally map it to scroll 20-30% further per stroke of the wheel, but that's quite well within personal preference territory, not an actual bug like it was before :) I don't mind having to make 5 instead of 4 strokes, where previously it might have been 30!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants