Skip to main content
added 17 characters in body
Source Link
Kromster
  • 10.7k
  • 4
  • 55
  • 67

Let's take typical modern RTS game which features a large map (say 256x256 tiles). There's also a minimap in the GUI, typically up to 256x256 pixels in size. (Let's take these numbers for upcoming example)

We can move viewport with very high accuracy and precision using scrolling (WASD or by screen edges) or dragging (e.g. with middle mouse button), e.g. as precise as 0.001 tile (when zoomed in). However, when viewport is being moved using minimap, this means that for each 1px move of our cursor in GUI we need to move the viewport by exactly 1 tile. The problem is that this feels quite jittery. There's no room for interpolation, since GUI can not go past 1px accuracy.

Which leads to the question: How to smooth viewport movement when using minimap?

Let's take typical modern RTS game which features a large map (say 256x256 tiles). There's also a minimap in the GUI, typically up to 256x256 pixels in size. (Let's take these numbers for upcoming example)

We can move viewport with very high accuracy and precision using scrolling (WASD or by screen edges) or dragging (e.g. with middle mouse button), e.g. as precise as 0.001 tile. However, when viewport is being moved using minimap, this means that for each 1px move of our cursor in GUI we need to move the viewport by exactly 1 tile. The problem is that this feels quite jittery. There's no room for interpolation, since GUI can not go past 1px accuracy.

Which leads to the question: How to smooth viewport movement when using minimap?

Let's take typical modern RTS game which features a large map (say 256x256 tiles). There's also a minimap in the GUI, typically up to 256x256 pixels in size. (Let's take these numbers for upcoming example)

We can move viewport with very high accuracy and precision using scrolling (WASD or by screen edges) or dragging (e.g. with middle mouse button), e.g. as precise as 0.001 tile (when zoomed in). However, when viewport is being moved using minimap, this means that for each 1px move of our cursor in GUI we need to move the viewport by exactly 1 tile. The problem is that this feels quite jittery. There's no room for interpolation, since GUI can not go past 1px accuracy.

Which leads to the question: How to smooth viewport movement when using minimap?

Source Link
Kromster
  • 10.7k
  • 4
  • 55
  • 67

How to smooth viewport panning when using minimap (in typical RTS)?

Let's take typical modern RTS game which features a large map (say 256x256 tiles). There's also a minimap in the GUI, typically up to 256x256 pixels in size. (Let's take these numbers for upcoming example)

We can move viewport with very high accuracy and precision using scrolling (WASD or by screen edges) or dragging (e.g. with middle mouse button), e.g. as precise as 0.001 tile. However, when viewport is being moved using minimap, this means that for each 1px move of our cursor in GUI we need to move the viewport by exactly 1 tile. The problem is that this feels quite jittery. There's no room for interpolation, since GUI can not go past 1px accuracy.

Which leads to the question: How to smooth viewport movement when using minimap?