A* Procedural Grid Mover

I get around 600ms lag and framerate drops to 5-10 for 5 seconds when using the ProceduralGridMover with the center tiles middle as center, the tiles are 250x250 and I have 9 tiles, the width and depth is both 300 and nodeSize is set to 2.5. The terrain generation isn’t the problem, it doesn’t give that framedrop.


The best way to use the procedural grid mover is to center it on the player which moves slowly over the terrain, then it can recalculate just a few nodes every second or so instead of recalculating the whole graph at once (which is pretty slow) if you just move it in discrete large steps.

I just tested with a 250*250 grid and it works. When it recalculates a small part of the graph (every 0.5 seconds) the fps goes down to around 90 (from 400) for a few frames.