Hungry Hungry Circles creates agents that feels the need to consume other smaller defenseless agents.
My idea derived from an online multiplayer game called agar.io where you play as a circle that needs to consume other circles, but on this version there are no players, only agents.
Hungry Hungry
The interaction with the mouse cursor can be a little game of itself, if you the user want to make one particular colour win the game, they can achieve that by using the power of the cursor. By hovering over a circle that is not at its possible smaller state, that circle explodes into small circles, rendering them vulnerable to attacks and at the bottom of the food chain.
The basic idea is to give these agents sensor to detect one another. To balance it out I gave smaller circles greater acceleration when fleeing bigger circles, but the big ones have a better sensor for detecting potential victims, it can see farther an react faster than the smaller ones can.
The JavaScript code can be accessed by clicking on js on the top left corner of the embedded Codepen.