Widget Wednesdays #31

Continuing with the grid theme, I was wondering what would happen if, in my recent seven sisters example, each of the moving squares were to leave a trail. This would give a better sense of how things are moving over time. Also, they would then have interesting shapes, and therefore become more like creatures.

One thing led to another, and I ended up increasing both the size of the grid and the number of creatures. The current grid has 160×160 squares, and is inhabited by 200 roving creatures.

I also changed it so that the creatures don’t ever leave the space. The way I do this is to detect when a creature hits one of the walls. When that happens, the creature now bounces off that wall, so that it will remain in play.

You can see the result here. As usual, you can click on the word at the very bottom of the page to open up and play with the source code.

Leave a Reply