Have you ever come across Langton's Ant? It's a cellular automaton, a pixel-based entity that navigates a grid in a simulated environment.
This automaton operates under simple rules based on the color of the square it encounters: turning 90 degrees clockwise and changing the color of the square when landing on a white square, and turning 90 degrees counter-clockwise and also changing the color when on a black square. Its movement and the changing of square colors continue in this pattern.
There's an animated illustration available on Wikipedia showing how Langton's Ant moves. Intriguingly, after approximately 11,000 steps, a clear pattern emerges from what seems like randomness, forming a so-called "highway."
Several years ago, a friend and I developed a Python simulation of Langton's Ant in an infinite grid setting, where a distinct highway pattern can be observed.
Recently, while watching a Twitch stream called Marbles on Stream, a game where viewers can participate via chat, I was inspired to adapt our Langton's Ant simulation for interactive use on Twitch. This modification allows viewers to control their own ants through chat commands.
To enhance the experience, I transformed the blank simulation space into a map. Inspired by watching a Starcraft Brood War stream, I chose to set the simulation on a Starcraft map, specifically "The Hunters," incorporating elements like terrain collision and resources. This Starcraft-themed setting introduces the collection of minerals and Vespene gas, which could potentially be used for upgrades or boosts within the simulation.
Here's a glimpse of the current state of the project, featuring a Starcraft map where ants collect resources. This idea has evolved into a fun and interactive project, reviving my passion for coding and offering a unique twist on streaming interactivity.
No comments:
Post a Comment