How to make the minimap resolution independent?

Hello,

I searched a bit and couldn’t find a satisfactory answer.
Can someone help me regarding ideas on how to code an resolution independent minimap ?

The problem : The minimap in my little game changes dimensions (and also how much of the view it shows) each time the resolution changes.

Can I stop this from happening and force it to have the same field of view at least ?

Thanks.

is the minimap scripted? if it is, there is (Maybe) no ways for me to resolve it, all i’ll tell you is to make the minimap a camera that follows the first person controller and that’s up high and make some pointer parented to the minimap
that indicates the way forward, as if i say, camera’s that are in the sky are not affected much my resolution, since it’s a 3d object.

Hi primus88,

We developed the popular KGFMapSystem.

I’m not sure how you implemented your minimap, so I’m not sure if my answer will help you.

There are two ways of implementing minimap size

  1. Pixelperfekt: Your minimap is for example always 400px x 400px. If you change to a bigger resolution the minimap will get smaller.

  2. Relative: Your minimap size is normalized to the screen size:
    So size 0.3f will mean your minimap widht and height is always 1/3 of the screen height. After changing resolution the minimap will still be 1/3 of the new screen height.

  3. Maybe you just have to reset the aspect ratio of your minimap camera after changing resolution?

Best wishes,

Michal