Best Way to Create Top Down 'Battlefield' Map

Hey all…just started diving into Unity over the last two months and after lot’s of hours churning through C# and Unity tutorials I think I’m finally ready to take a stab at making a simple 2D game. Basic concept will be a top down view of a battlefield (forested area, with a road or two going across it) where the player can send units from the edges to move (possibly dumb AI pathing up the roads?) up towards the front lines to fight.

I’ve sat down and written up a ‘design document’ just to get my head around everything and break things down into steps and phases. But as I’m new to Unity, I’m a bit stuck on the first step “Create map with 1-2 roads” mainly because I’m not sure how to best handle the creation of the map in the first place. I’ve dug around on the forums and Google and not really come up with anything that helps so far, so here’s a question I’ve come up with to start:

  • Is it better for me to just come up with a pre-made image of the battlefield in another graphics program and slap that down as the background?

  • If I do that, how do I deal with distortion caused by the game being run at different resolutions?

  • If I do that, is there any way to force Unity to recognize where the ‘roads’ are so I can point the AI units to use them for pathing?

  • The other option I can think of would be to somehow generate the map in game from some basic sprites (ground pattern, road pattern, maybe some trees).

  • If I do that, how would I ensure the ‘map’ looked the same every time I started the game?

  • Once again, how would I force Unity to recognize the created roads for the AI pathing?

Which of those would be better suited to this setup, and scalable out to further maps down the line?

I don’t mind if you guys just throw me over to some other posts or tutorials, but just haven’t been able to find anything on my own yet to get me off on the right foot. Thanks in advance and excited to finally dive into Unity. :slight_smile:

Are you talking about minimaps? If so, generally one way to find out how to implement something is to buy an asset that has it and study what they did.
Here are two:

Resolution independence is a huge topic, you have to read more about the camera(size, etc) and unit to pixels.
Even if the image is distorted it wont affect the programing done to the game, so the paths will work.

Pathfinding is generally done with ‘navmesh’, there is navmesh2d on the asset store also, and you could always get
Unity Asset Store - The Best Assets for Game Making, its on promo now.

There are assets also to help you with ai state management, but i’d read some more and give a few things a try before digging any deeper.

When you have doubts in unity, use the trial and error method. Most of the times people dont have answers to -your- questions because there are infinite ways to solve them, and the best way is your own way.
So do that “come up with a pre-made image of the battlefield in another graphics program and slap that down as the background” and see how it goes.
Try that “generate the map in game from some basic sprites”, good luck with that idea, and see how it pans out.

Look for procedurally generated maps/dungeons, in unity.

Hope i pointed you somewhere, good luck.

Thanks Ki! Will definitely start looking into your suggestions. Appreciate the help!