2

I am creating a application using Game Maker 8 and it has a zoom feature, where you can zoom in and out using the scroll wheel. For now, I am using a simple formula of adding or subtracting 10% of the zoom. It works well at small scales, but it takes to much time when you zoom in highly.

I tried to look into know applications and see how they do the zooming, but it seems they use a set of predetermined zoom factor that you scroll to - that is, you always go from 100 to 75, 50, 33, 25 and 12,5%. As far as I know there is no formula that makes those numbers in order.

Should I just make it a pretermined set of numbers or should I use some formula? What other applications are doing?

1

In my opinion zooming to a predefined factor will become pretty intuitive for the users regardless of the responsiveness of your app, e.g. I know that zooming three steps down from 100 gets me to 33, I zoom subconsciously.

If you're thinking about some steps, I'd revert to mathematical rules, e.g. exponential, logarithmic, golden ratio, etc. Applying the latest gives you stops at (100; 61; 37; 22; 13; 8).

However, if you want to stick to proposed values, you can use the following formula - cycle through values between 8 and 1 and your zoom factor is n/8. When stepping down, the new = Floor(3/4 * previous), when stepping up, new = Ceil(4/3 * previous). This gives you steps at (100; 75; 50; 37,5; 25; 12,5)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.