I am doing a project that deals with pathfinding and other AI algorithms. I am creating a city for the AI to navigate through and I wanted to no if I add all the symbols to the stage before runtime and set it up is there a way I can access all of these symbols either in an array that the stage holds. I would like to have the AI avoid them and I just figured it would save me some time if I could do it this way instead of coding the placement of 50+ items.
Share
My recommendation : put your placement of objects inside an xml or json file. Then load that file, parse it, and place your objects on the stage based on the values (x, y, etc.) of the items in their respective xml node.
You could have something similar to :
And then, if you want to change your level, just load up a new map. Try ogmoeditor for creating a level.
Drag-and-dropping by hand is good for the first level… It gets tedious if you want to make 10 levels.