implements game lifecycle and loading