game loop basically working, modulo some problems