primary gameplay loop