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

  • Hey, so your question is a bit confusing to me would you mind clarifying it. In one sentence what do you want to do ?

    Are you struggling with the pathfinding ? If you are take a look at this : http://www.policyalmanac.org/games/aStarTutorial.htm
    Thanked by 1francoisvn
  • edited
    You needn't even roll your own pathing. Assuming you're using Unity, the A* Pathfinding Project is a free plugin that supports grid pathing and has you covered: http://arongranberg.com/astar/

    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
    Thanked by 2francoisvn SUGBOERIE
  • I want to create a tile game like that.I just need to know how to place the tiles on a map,and only allow my player or players to have a certain amount of moves..And how to place the tiles around objects like building and trees and such so my player cant decide to walk into a building or something..
  • edited
    Then you'll want to read Kobus' link on A* pathfinding. You'll need to set up your pathing grid, and then I'd run the initial "flood fill" up to my character's maximum movement range and instantiate my visual destination tile objects at the world coordinates corresponding to whichever cells are populated. You can calculate actual movement paths from there. It's really hard to give specifics, alas, because so much depends on what tools you're using, how you're implementing your actual map, and your end goal.
  • Read the book I suggested, more than 500 pages cover tile mapping.
  • edited
    Not sure what book is referred to here, but I would suggest you don't read 500 pages on this, unless that sounds like something you'd really enjoy and have the time. For the moment, it seems like you've got some resources you can already start with for path finding and Unity.
    Cyperus said:
    I just need to know how to place the tiles on a map
    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.
  • Thanks a lot guys and thanks for the comment "francoisvn" made things seem a bit easier,But one more thing...You spoke about making tiles open and closed, so does that mean each tile i generate has to have the wall programmed into it or could i just generate the tiles,and then place my buildings and trees onto the map.
  • Glad to hear my comment was useful :)

    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:
    . . . . T . . .
    . . T . . H H .
    . . . . . H H .
    . . . T . H H .
    . . . . . . . .


    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 :)
Sign In or Register to comment.