PGD Home

P0-B4: Part 1208: Traffic System

by on Mar.05, 2023, under Astral Realms, Meridian, P-0, P0_B4, Software and Games, Spiritus Astrum

I can now generate all of the required graphs for the vehicles, and it can be done without any noticeable performance impacts.

The next goal is to get the AI vehicles to travel around the graph to random points without colliding.

I tried a few solutions to this problem, but none have worked yet.

The main problem is that the A* graph system does not respect direction, so the AI vehicles can travel in both direction on the same “lane”, which causes them to collide with the vehicles behind them.

The next solution that I am about to try is to allow the AI to only travel in two directions, forward, and either right or left depending on which lane the AI is in. Then, I can search for the nearest intersection node on the graph that is in that direction, and move toward that.

This should work.

Facebooktwitterredditpinterestlinkedinmail

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!