Proposal: Maintaining Traffic Flow
I have noticed that when vehicles come across slower moving traffic it comes to a complete stop until the next tile is unoccupied. While this may only be a few milliseconds it does mean the vehicles travel with a rather jerky stop/start fashion because they catch the slower traffic faster.
What I propose is a way that the faster traffic travels at the same speed as the slower traffic until the road ahead becomes clear. I have got some puesdo-code that illustrates my idea slightly better.
LOOP UNTIL current_destination = true
IF next_tile = clear
current_speed = max_speed
ELSE IF next_car_current_speed < current_speed THEN
current_speed = next_car_current_speed
END IF
Comments, suggestions or flames welcome.
Thanks
John