I’m a pupil that’s studying easy methods to program and I began to develop my first platform recreation utilizing C. Nevertheless, I’m fighting the pathfinding algorithm for the enemies.
My ranges are principally a 30×45 array with numbers which have a 1 the place there’s a block, 2 ladders and zero an empty area. I don’t know which path discovering algorithm to make use of, primarily, as a result of I do not know easy methods to create the graph.
Being a grid-based stage, utilizing an adjacency record or matrix, I assume that it will be fairly complicated if I had each walkable cell as a node.
I used to be pondering of utilizing BFS or Dijkstra’s, however I don’t even know the place to start out.
I already understand how the algorithms work, however I can’t work out easy methods to implement any of these.
I’d recognize if anybody might assist me.