Hello all, thank you for reading and helping. I am considering purchasing A* and would like to know the following before purchase. Backstory, I am building a game similar to Sim City in which I will have cars as well as people moving around. I think A* might be a solution to my traffic issues since cars/people will be able to adjust paths as streets/paths are created by the player, but I want to make sure two things.
-
If I create a street, and put a car on it, and give that car a destination, I am assuming I will need to put invisible walls along the street so the car stays on the street (similar to a maze) and does not directly go to the target destination off-road. Is there a simple way to make sure that cars will stay on the right side of the road, so I can have cars pass one another? I was thinking of putting a small invisible wall in the center of the road, but that would make it difficult/impossible to put in a intersection. Are there any known solutions to keep cars on one side of the road?
-
Is there any alternative solution to the wall idea I have in question 1? For instance, if I use the wall scenario for walking paths for people, then they would only walk on the outside of a park (or the paths within the park). It would be nice to have the ability for some random % of people cut across the park (as humans do), but I do not think I would be able to do that with invisible walls. Any ideas?
Thanks, I appreciate your time and responses.