Hi, @van326
By not displaying your background you managed to keep a track of the mouse of your user, but this trick wont be enough to go further.
There is plenty of way of doing a paint like sketch, I suggest you to use an array of vector.
Here is an example of how array works in p5
https://p5js.org/examples/arrays-array.html
And here is how to use vector
https://p5js.org/reference/#/p5/createVector
Feel free to ask if you need help
Also, you can share each of your sketches separately in the p5 editor in the file tab -> share