A very simple version of the traffic network system is presentable now

After creating the road system, now the traffic system has to be programmed.

First conceptual drawings for the traffic system:



The goal was to create a self-connecting traffic network, which should work for left- and right-hand traffic.
Everything went fine until the cars had to drive around corners.
But a little bit later (and with some vector calculation) this also works very well.

A view of the transport system in the editor. The red squares and red lines represent the center lines of the street.

A first animated video

First visible results with the pedestrian system

When creating the city map system for the new game I decided to use a block size of 10 meters x 10 meters. 

First conceptual drawings for the road system:

I have set The level of detail of the pedestrian-map to 50 cm x 50 cm. Both together should allow a fairly high degree of flexibility when auto-generating the maps without too much memory or processing power needed.

For tests of the pedestrian system a simple road forming a closed loop should be optimal:


For debugging purposes it is useful to draw logical information (e.g. places a pedestrian is allowed to walk) on the screen. In Unity3d this is very simple to handle using the OnDrawGizmos functionality.

On the green areas, the pedestrian are allowed to walk:

The next step will be to design the traffic system.