1
\$\begingroup\$

Can someone explain the basics of making a 2D World map in unreal engine 4 (e.g. similar to the ones used in Plague inc., age of civilizations, etc.)

I've seen it being done in unity, but couldn't find any similar content in unreal engine 4...

Thank you.

enter image description here enter image description here

\$\endgroup\$
1
  • 1
    \$\begingroup\$ There are a lot of things that might go into a game map - can you help narrow this down to the specific step that's giving you trouble? Things like 1) Importing and displaying an underlying map texture 2) Adding regions that can change appearance based on state/ownership 3) Associating input with those regions (eg. detecting a click on a particular country) \$\endgroup\$
    – DMGregory
    Sep 17 '17 at 12:50
2
\$\begingroup\$

I'm going to speak in language agnostic terms because I don't know Unreal Engine 4.

The most obvious way I imagine it to be is you have 2 images. In one of them, you draw the map with all the regions colored in a unique color each. This is the hidden image. In the other, you actually draw what will be displayed to the player, lining up the regions with the hidden image.

Then you keep a dictionary of colors, mapping each color that appears in your hidden image to a certain province name or province object.

You do this so that you can take the position of the mouse pointer relative to the top-left corner of the image you display, check which color the pixel in that position in the hidden image is, and go to the dictionary to find which province the player selected.

\$\endgroup\$

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.