Please see our Real-Time game example tutorial here