Faster drawing in python -


i got program draws spaceship (turtle graphics) forward,backward etc.

by using lot of orders , lines drawing spaceship takes 5 seconds using turtle.speed(0).

and whenever click right/left key draws again in other direction. major thing in project. there way draw faster? in advance.

by default, turtle has draw delay of 10 milliseconds. every time updates canvas, pause 10 milliseconds simple way of controlling animation speed. delay independent of speed of turtle itself. if want speed animation, can set shorter delay, e.g. turtle.delay(3) or turtle.delay(0).

note turtle graphics more of educational tool serious way graphics. if don't have specific reason use turtle, consider switching other graphics libraries.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -