Pathfinding

I am creating a rougelike game and am working currently on path finding. I have a map structure with a series of bools saying whether or not you can walk through the block. What I am wondering, is how would I create an algorithm or implement one. Any Suggestions.
Look up Dijkstra's shortest path and A star algorithms.
I have taken a look at the A star algorithm, I am not exactly sure how to implement it. I will take a look at Dijkstra's shortest path algorithm. For my map structure I have

bool map[MAP_WIDTH][MAP_HEIGHT]

I have no idea how to implement either algorithm with the rest of my current systems,
Last edited on
I am completely confused as to how to implement it, as I have an entity class containing an x, y, and and it is supposed to walk twords player.x and player.y, avoiding the dungeon blocks, what i need is which direction the entity needs to move from its current position going on for each turn. I cant tell how I would impliment either of the systems to this scenerio and how I would do it.
Last edited on
Topic archived. No new replies allowed.