Traffic

Publicado 2023-06-12


STANDARD PICO-8 COPYRIGHT
Details: https://www.lexaloffle.com/bbs/?tid=31927

UPDATED 09-24-18
WHAT'S NEW ??
09-25-18 (final)

09-24-18



09-22-18

Alright, with that out of the way, what does this cart do ?

It is a simulation of automobiles. I was influenced by my Dad on this. For years ago he was interested in writing programs that simulated human life.

He wrote one in Turbo Pascal that had green dots all over it. They moved around slightly, sometimes traveling in a straight line. Sometimes standing still, sometimes wandering a bit. But if one green dot got too crowed by the other green dots it had a chance of going BERZERK.

A BERZERK dot would turn red and start to kill green dots. When enough bodies were found by green dots though, the green dots would clustered together and 3 of them would make a single blue-dot, a policeman, who would kill a red dot - restoring order to the community.

It was all quite fascinating to watch, and the method I'm using here is very similar to the method he used. Where no actual "dot" had its own identity, it was just chosen as a COMPONENT with one invisible number to state its "brain." You can see that I wrote a "component" type of Space Invaders HERE:

https://www.lexaloffle.com/bbs/?pid=55875&tid=31766

Back in QBasic years ago I wrote a program called Traffic to simulate automobile traffic. 4-cars coming from all directions and yet ... few if any pileups would occur. Why ?

HOMEWORK:

Easy question. Why are there no head-on collisions ?
Explain.

Difficult. Why are pileups extremely rare at a traffic setting 1 ? (hold (O) to confirm this)
Explain.