This is a demo made with the TIC-80 fantasy console demonstrating how feedback loops generate chaotic behaviors.
To do and notice
Click on the box above to open the demo. Press the arrow keys and notice that both the spaceship and the race car are controlled. Try to match the orbit of the moon while staying on the road.
Now press the Z key to toggle artificial intelligence controls for one or both games.
Now press the X key to toggle feedback between the two games. What changes? If you turn off the AI for one game, is it easier or harder to keep a high score going in both games?
To examine the code, press the Escape key.
What this demo shows is how it’s possible to set up two systems that feed into each other. On the left side there is a physics simulation of the type used in Spacewar! and Asteroids, with a “moon” orbiting a planet and a ship pulled by gravity. On the right there is a race car reminiscent of any number of “tunnel” or “cave flyer” games.
When the feedback is turned on, the movements of the ship influence the curvature of the road, and the movements of the car influence the orbit of the moon. When this is combined with the AI of each game controlling the characters, a chaotic dynamic emerges where the two games mutually influence each other. Although this is a subtle effect, the overall patterns are much less predictable than before.