Game loop and engine setup