Proper game framework with canvas