I'm currently working on an isometric city sim game. Progress has been good - I'm at the stage where the user can put down buildings, and citizens will move from one building to another whilst avoiding obstacles in-between through use of the pathfinding behavior. I'm currently recalculating the pathfinding obstacle map for each citizen when a new building is placed. This works fine with a small number of citizens but, not surprisingly, it causes a stutter as the population grows (even less surprisingly, this stutter is most notable on mobile platforms). Aside from this, the framerate is consistent and high. My questions are:
Since all citizens use an identical obstacle map, is there a way of calculating the map once, then applying it to all entities?
Is there a way of adjusting individual collision map cells, rather than using the in-built "add object"/"re-calculate" functions?
I suppose if there's no obvious solution I could write my own pathfinding functions, but it would be a shame to not make use of this in-built feature.