Map Making in Unity ~ Initial Thoughts

In the next week I might talk about how I’m doing what I’m doing. But for today since I am already well beyond my bedtime I’ll just talk about the what, rather than the how. You can catch in the header that I’m using placeholder colors as well as placeholder images. Ultimately I will need to come back and make my own hexagon sometime. The one I’m using, though described as “perfect” is actually off. This leaves tiny gaps between the tiles, almost imperceptible if not for unity causing visual errors.

Currently the map is entirely randomly generated. The next step in this process that I’m planning will be to add in some “intelligence.” It won’t be as awesome as what other people do. I’m just not mathematically savvy enough to pull off really detailed procedural generation. However, telling the game to prioritize certain tiles for a certain amount of time and then “go wild” to create an island (or eventually islands) is something I’m willing to take a crack at. I have yet to decide if islands will be based off the name you give them, or a seed you are allowed to input (or simply let be random). I would like people to be able to restart on the same land mass they had last, if they so desired.

Or they could pass that land mass off to their friends and see how those folks manage. I didn’t choose hexagons because of any homage to other games. Though I’m quite fond of settlers and Civilization. I’ve actually chosen them because it is easily my favorite shape. I banter from time to time about honey and honeycombs but they really are the bees knees (I’m sorry). The icon images at the center of these tiles are not mine and will be changing. They also won’t be the same size or possibly even location. Hell, the final batch of tiles might just be entirely art driven. With the forest “tile” looking entirely like a forest. A repeating texture could do this just fine, if I wasn’t able to find someone willing to draw it.

Hooray. Real Time minimap.

Hooray. Real Time minimap.

I’ve also got a working minimap that’ll give you a bird’s eye view of the area around where you are looking. As you can see it is legitimately random. Though there are some interesting pools of certain tile types, like mountains. As I iterate over the next week we’ll see how common (or uncommon) things start becoming. The camera is draggable, but it isn’t very elegant. These are things I’ll need to adapt in the future as I get better with Unity and NGUI’s suite of tools.

So that’s that. I’ve switched from my hideous drawn image to a tile system. I’m fairly pleased that I was able to bang something out in an hour or two. It still needs adjustments. I might “fudge” it by adding a slightly thicker border to the tiles so that they melt together. As a first project I’m not expecting perfection from this. A simple survival village builder is more my focus. And, if you haven’t noticed, or if I haven’t mentioned it prior, I’m initially building this for 4:3 for ipads. I will likely release it at the same time on the web, and then work on porting it to Android.

The main reason for this is that our nicest portable device in the house is an iPad mini. Everything I’m doing with this game is centered around the idea of “What would I like to play?” Then hoping that ultimately it is something that other people find interesting. We’ll see! I’ve played many bad games in my life and some of them were from people who went on to make much better games. I’m not too concerned. Either way I will end up learning a fair amount during this. The minimap alone was a very satisfying achievement.