A new Algorithm of pathfinding are in programming.
In this case, the algorithm it's similare work of editor logic.
For example a grid movement algorithm
a = Number of block
n = Index
X = Size of block
in parallel cycle in separate thread.
a very small test of working
CODICE
if (StartPoint.X > EndPoint.X)
{
Vector2 newPos = new Vector2(StartPoint.X, StartPoint.Y);
var c = m.GlobalMap.Where(x => (x.vector2.X == StartPoint.X - 32) && (x.vector2.Y == StartPoint.Y)).FirstOrDefault();
if (c.type == Map.TypeAction.Walkable)
{
StartPoint = c.vector2;
}
else
{
c = m.GlobalMap.Where(x => (x.vector2.X == StartPoint.X) && (x.vector2.Y == StartPoint.Y - 32)).FirstOrDefault();
if (c.type == Map.TypeAction.Walkable)
{
StartPoint = c.vector2;
}
}
}
Actually code are in development but there is a good percentage of success
I hope to be able to finish this plug-in as soon.
Stay connected for more news.
Last comments