I would really like to make a city builder type of game, but one thing holding me back from doing this is making objects such as cars/trains/etc follow a path that is defined by the player with roads/rails/etc. So I can’t really use the editor to make a path, as it needs to be done as the player is playing the game.
What do I need to do to accomplish this type of pathfinding/following?
A* is a pretty bad solution.
A* creates almost perfect paths, that’s something you don’t want for an AI which behaves like a citizen, car, or whatever. And it isn’t a really good solution for calculating dynamic paths.
And yea, don’t forget, it needs a lot of memory and can cause CPU problems pretty pretty fast !
You should have a look at recursive backtracking, just google it, there are some articles about it.
But so far, I would recommend you to start using simple waypoints and use their positions for setting up paths.