Use the arrow keys to move and press space to become ball form, to kill enemies hold down the arrow key in the direction you want to charge until the ball becomes purple then just let go of the arrow keys to charge in the direction the arrow keys pointed. To beat doctor egg man you need to wait until after his laser ball and jump onto the bottom of his ship to take one of his three health but he gets 5 seconds of invincibility before you can attack him again.
I used sonic the hedgehog models of the internet but all the code was made by me