Inspiration
I was inspired by Danial Shiffman, the YouTube creator that goes by The Coding Train. I adapted to the concept he showed and expanded on a few of my own ideas of what mitosis would look like in the real world.
What it does
- Clicking will divide the cells into two daughter cells
- This will delete the parent cell
- The two daughter cells will be pushed away from each other (and away from the walls if in contact)
- The cells are constantly growing but stop at a radius of 100
- At this point, they will start flashing, indicating that they have turned cancerous
- You must click them to stop them
- There will be a limit of 100 cells
- Mitosis will stop as the environment cannot handle it anymore (you will see this warning in the console of your browser)
How I built it
I used the p5.js library to code for the movement and other intrinsics of the "cells" in my project. The entire project was done by JavaScript.
Challenges I ran into
The biggest challenge I found was keeping the cells away from each other and the walls. I didn't want to teleport them away from each other after separation so I had to use velocity as a variable to push them away from each other. Keeping away from the walls is another challenge. All my cells have a little "wobble" to them to give them a life-like feel.
What's next for Mitosis
I would really like for users to delete cells using a right-click of the mouse button. I would also like to add "Immune cells" that help deal with these cells. These immune cells would have a target-tracking AI built into them. With more and more tries, they will get better and better at attacking the cancerous cells.

Log in or sign up for Devpost to join the conversation.