Understanding the proper use of graphupdateobject on layeredGrid


#1

Hello I’m using a layered grid graph and my project is a simulation game. I currently use scan() to update my map whenever an object is placed in the world.

All I need is for the objects which are set as obstacles to block out the path where they are placed. After reading the documentation it seems using the graphupdateobject might be much better than scan() performance-wise.

Currently I have a 5-story map around 500x400 on each level. Right now scan() gives quite the perf hit.

Can you provide me the best way to get the best performance as at any given time, a player can create multiple objects and then once pressing play, these objects need to carve the grid as obstacles. Would using updategraphobject be the way to go here?

Thanks very much in advance!


#2

I think I’ve figured this one out. Thanks