add game loops to index.html