This weekend was like any other. I spent it doing some programming. Along with fixing a plethora of little bugs in my map editor I decided to create a minimap for it. As you can see here in the picture below, we have a minimap (and a very nice Martian landscape):
To get a minimap to work you have to translate the mini coordinates into big coordinates. That way you can scroll to where the user clicks. The method I used is this:
real_map_coord = mini_map_coord * ( real_map_size / mini_map_size)
Works perfectly. I do this twice; once for X and once for Y.