I finished my mini map! With, like, 40 minutes to spare.
[WP_UnityObject src=”http://www.oogby.com/lj/players/adventure%203%20september%202011/WebPlayer/WebPlayer.unity3d” width=”496″ height=”372″ css=”http://www.oogby.com/style.css” /]
Click on the game area and use the arrow keys to move.
(If you don’t see a player above, you can view it on my web site here.)
(The Short Version)
First, the map is divided into different colored areas. They don’t really mean anything right now, but they’ll become important later.
Next, there’s a globe in the upper left corner. There’s a little arrow showing you where you are, and the colored area you’re currently in is highlighted.
User Interface Design Rambling
It was surprisingly not-straightforward to make that globe.
But the basic idea — and the reason it was so complicated — is that I’m very picky about how to communicate position to the user. I want the user to think of the world in terms of a small number of discrete, countable areas. It’s all about chunking. You’ll notice that as you move around within an area, The globe doesn’t really move much, but if you enter a new area, the globe will swivel to give to the best view of whatever area you’ve entered. I want the user to remember the colors of the areas, and the shapes of the areas, and if eventually the areas have names, I want the user to remember those, too.
So they can divide the world into manageable parts, and hopefully, that will help them navigate.
There’s a slight complication because the world is round here. Say I was using a map of the real world here, and my areas are continents instead of colored blobs. You start in North America, and the globe shows you North America, with Canada at the top and Central America at the bottom.
So you move around, and go visit the other continents, and when you come back to North America, suddenly Canada isn’t on top. It’s on the side. You never rotated the camera or anything, but it’s just the way navigating on a sphere works.
At first, I added some code to re-orient the globe to that North was always up, so that when you went to any given area, it was rotated the same way as it was the last time you were there. And that was nice and all, and it really helped reinforce the shape of the area and your memory of the area, but it was hard to tell what exactly would happen when, say, you pressed to up key. The arrow wouldn’t necessarily move up.
So instead of having a canonical rotation for each area, I’m just orienting the globe based on the orientation of the camera. And yeah, that can change over time, but I think that with the unique area colors and shapes it will still help with navigation the way I want it to.
By Saturday night next week, I’d like to have my map generation more complete, with obstacles on the boundaries between areas.