rename game loop function
use constants for game width and height
rename events variables