Click to Play!

Friday, March 7, 2014

Making Maps With Tiles

     Unicorn Quest is gong to need maps. Lots of them. She's going to be running around fighting monsters, stepping on switches and talking to townsfolk and there needs to be a background for her to stand on. The problem is I have never made a game like this before and I need a place to start. That's why I'm trying out something new. I'm going to make color coded mock-ups in MS Paint to chart out where all the tiles will be in a room, then placing tileset pieces I make around the map.

     Once the basic tiles are in place I can add static (non-moving) decorations to the map, then I can add moving/interactive objects to the scene I place the map into in Unity. After that it's just a matter of spawning enemies, placing NPCs, and making entrances and exits that take you to the loading screen while the next room gets ready.

      When thinking this up I knew the things I needed to keep in mind were size (in memory), scaling (32x32 boxes), and flexibility. Making the maps this way allows me to continue making adjustments on the fly, make backups, and draft ideas quickly. If I draw the background images like this each one will only take up 10KB of data (at most). I just upscale it to 300% in Unity to match the pixel size of Clover.

     If the map doesn't use all 1024x1024 pixels, I'll crop it to save memory. If it needs more, I can add rows and columns. I want to keep the maps widescreen oriented so you wander around left and right more often than up and down. That takes advantage of the amount of screen space on a landscape device. Buffer space also needs to be taken into account so the void doesn't show up when you're outdoors and break the immersion.

I used a similar grid system before.

       The boxes making up the grid match the size of each tile and have color coded edges that let me easily tell the squares apart. I used a technique similar to this when working on my old Pokemon fan game. I'll be trying out a few test maps this week and I'll be using them for testing out other game mechanics.

      Right now I'm chewing away at a problem I'm having with collision detection. I'll try out a bunch of different ways and hopefully figure it out by tomorrow.


No comments:

Post a Comment