Something reminds me of this old work today.
My very old university assignment in processing (p5.js). (2 years ago)
Since I already graduated, so it might be a good idea to release my source code.
You may find interesting.
This was inspired by slither.io.
You can see the source code by clicking “</>” at the centre.