I started work on the pathfinding algorithm. I know the stages of the algorithm (how it should look like in the end), bellow is almost pseudocode (it`s real code but I haven`t started building/debugging)
void FindPath(int Startx, int Startz, int Endx, int Endz)
{
Careux = Startx;
Careuz = Startz;
Node.access = Chart[(Careuz+1)*10+Careux].access;
Node.x = Chart[(Careuz+1)*10+Careux].x;
int SurroundingsDistance[8];
for(int i = 0; i < 8; i++)
{
SurroundingsDistance[i] = -1;
}
if(NodeCoord(Startx, Startz +1).access)//N
{
Distancex = NodeCoord(Startx, Startz +1).x - Endx;
if(Distancex < 0)
{
Distancex …