This project was designed for the hackclub emerge ysws, which is a ysws where you try to make a complex system based on only a few simple rules. The rules for my project are as following:
- the user can click on the map to place a square
- squares move in a random direction and change directions every 5 seconds
- if two squares run into each other, they form a larger combined clump
- if two clumps run into each other, they form a larger combined clump
- for each square in a clump, the clump gains 1.5x speed
- if a square is within a small distance of a clump more then 3 times bigger then it, it moves in the opposite direction to avoid being absorbed
- when a clump hits the corner of the screen, it separates into squares, each moving in different directions, starting from the center