Press up arrow to jump. Press space to high jump. Press down arrow to crouch. When you see a red circle with a ! in it, that means an obstacle is coming.
C2A! All code by me.