This is a PROOF OF CONCEPT, meaning this is NOT A REAL GAME. If you wish to apply this, so be it (I would like credit if you do happen to use my code). Press left & right to move left and right. Change the X acceleration with the slider. The pen picks a random spot and a random size, so avoid that lol.
Alright, so this was made like 98% from scratch without outside help (the only thing that's not original is the code to get the pen colors, sorry but I forgot your name. Everything related to the ball physics are my own creation). Trigonometric functions are amazing (special thanks to sine)!