Use the arrow keys to move. Use the z, x, c, and v keys to attack. Sometimes, enemies resist your attacks, so be careful using attacks with long cooldowns! 15 hearts and stars for part two!
Basic platformer physics from Griffpatch (though I followed the tutorial myself, I modified it).