Tile map.
Hey guys i have viewed a lot of tutorials on YouTube showing me how to create a tile map but none of them show me how to do it on a normal map..all of them are either about board games or games like civilization..I'm looking for more of a game like this one but don't know how to set the tiles so that my player moves a set number of times and so do the zombies,well in my case skeletons.
Comments
Are you struggling with the pathfinding ? If you are take a look at this : http://www.policyalmanac.org/games/aStarTutorial.htm
Grids is another Unity plugin you could use that handles tile display and layout as well: http://www.makegamessa.com/discussion/1997/grids-1-8-now-with-editor-support
So instead of trying to make a large 3D map and then break it up into tiles, have you considered making tiles and then turning that into a 3D map? This is typically a much easier way to do things.
You might have different types of tiles for ground or buildings or trees, and then you can just mark tiles as either open (like ground) or blocked (like walls). This last part might make a bit more sense if you've already started with some of those path finding resources.
Can someone suggest a nice tile editor he can use with Unity, or is that built in? For a standalone one, Tiled is pretty good.
Let's say you start generating your map with a 20x30 grid. At the start you might make all the tiles open, meaning you can walk anywhere on the map, but things are pretty boring. Then you might put some trees down at locations, so let's say you'll put a tree at (3, 7) (column 3, row 7). You don't want the player to be able to walk through the tree, so you mark (3, 7) as closed. You could do a similar thing for more trees. Now you want to build a house. You want the house to be a bit bigger than a tree, so perhaps 2x3 tiles. You can now find an area to place the house, and mark the 6 relevant tiles (from the 2x3 floor map) as closed. At this stage you'll have a grid of tiles, where tiles are either open or closed. Your path finding can then use this information to find paths around the map.
Here's a small example of what things might look like:
If you're using a tile editor, some of this will be simplified for you, and it'll be easier to make the levels by hand. Don't hesitate to ask if things are unclear :)