impact -> RE: The non-seamless scrolling thingy. (3/27/2010 12:23:01 AM)
|
Well, basically seamless scrolling is what you see when you scroll with the mouse. Scrolling with the keyboard however "jitters" and has a few other problems. 1. It scrolls one "unit" to the desired direction, stops for about one second, then resumes (continuous) scrolling in small steps. 2. Using the keyboard to scroll to any one direction (up, down, left, right) works (except for the problems mentioned in 1.), but it is not possible to scroll diagonally (so holding the down and left cursor key for example only lets you scroll down). Shouldn't be that way. 3. Zooming with keyboard shows the same issues as mentioned in 1. 4. Zooming with mouse is just as jittery, except that there is no delay after the first step as with keyboard scrolling. Of course to prevent the general jittering, you could slide down the scroll- and zoomspeeds. However, even though this leads to apparently more fluid navigation, it will result in your having to scroll/zoom longer to go the same distance (naturally, as you scroll / zoom in smaller steps now). For scrolling this is not too much of a problem, as you just hold down a cursor key anyway and wait. For zooming (with mouse wheel), this would be more of an issue. To solve this, do it like Supreme Commander: Instead of "jumping" to the next zoom level, "slide" to it. To explain: Let's say your zoom level is 0.8f and you zoom in. What you do is just set the zoom level to 0.9f, which causes a jump of 0.1f from one frame to another. This is preventable by introducing another zoom-variable. With two zoom variables (currentZoom and targetZoom), you can simply set the targetZoom to 0.9f and check in each draw-call if both values are equal. If not, increment/decrement the currentZoom in small steps each frame until it is equal to targetZoom. To make it even more smooth, the amount by which the currentZoom-value changes should be higher the further the two values are apart. That way, when I quickly want to zoom out from Planet-View to Galaxy-View, it will zoom out fast at first, then gently get slower as I reach my desired zoom-level. When I just want to zoom out one or two steps however to get a better view of the current situation I am looking at, it will smoothly slide back a little. The reason why this is important is that when "jumping" from one zoom level to another, the positions of objects on the screen change enough to cause the brain to have to reorient a little bit each time, which confuses unnecessarily. With a smooth zoom, all objects move from a to b, and even though they do so rather quickly, it will give the brain time enough to notice how the objects on the screen move into their new locations, helps it keep track of things. Sorry, I hope this wasn't too technical. I know it just seems like a small thing, but it would help the general "feeling" of the game a great deal. :)
|
|
|
|