Better autoplay drawing code