Questions tagged [turtle-graphics]

A method for drawing computer graphics using a cursor, known as a turtle. Turtle-graphics supports game development, visualizations, animation, etc.

A method for drawing graphics, which uses a cursor (known as a turtle) for specifying the position, the direction and the attributes (color, line width, etc.) of the lines being drawn. It was popularized by the Logo programming language. Similar functionality can currently be found in Python's turtle module, which is part of its standard library.

The turtle runs commands sent to it sequentially, including moving forwards or backwards, turning/rotating, and raising or lowering "the pen" determining if the turtle is currently drawing a line while moving. This output pathway of the turtle can additionally be post-processed into 3-dimensional models. Depending upon the implementation, the turtle may traverse 2D, 3D, or N-dimensional coordinate spaces.

3188 questions
0
votes
0 answers

Python Turtle not responding

I am fairly new to Python and I have just tried to use Python Turtle. I am following a tutorial on youtube and when I try to open Python Turtle, it says "Not responding" and it doesn't open the page. My mouse has the loading symbol and it then just…
António Rebelo
  • 186
  • 1
  • 13
0
votes
0 answers

Turtle graphics - Bullet stops when another one is created and continues once the new one ends

def player_bullet(): barrel = -300 bullet = turtle.Turtle() bullet.penup() bullet.setposition(starting_x, barrel) bullet.color("red") bullet.shape("triangle") bullet.setheading(90) bullet.shapesize(0.5, 0.5) while True: if barrel > 300: …
0
votes
1 answer

Turtle Text Flashing

When I attempt to put text over a turtle in the python turtle module, it flashes. Any solutions? import turtle s = turtle.Screen() s.setup(width=500,height=600) c =…
0
votes
1 answer

creating boxes using turtle

can someone please help me making few boxes, each on different axis co-ordinates using turtle, P.S. trying to use class and objects in below code: import turtle from turtle import * # window: window =…
Akshay L
  • 3
  • 2
0
votes
0 answers

What is the purpose of the tracer method in Python's turtle?

from turtle import Screen screen = Screen() screen.tracer() # What does this tracer method do? How does it work? It was not understandable in the Python turtle documentation.
0
votes
1 answer

How do I make onkeypress() not react to specific key when it doesn't meet the needed conditions?

so im making a simple game in turtle (title and title2 are variables) onkeypress() makes it possible to stop secret() which I don't want, and if I would add more to main() pressing the spacebar again would reset everything in main(). import…
0
votes
1 answer

How to make boundaries work in turtle - python

So, I was making a game in which I need to move a player which is just a square as of now but it can go out of the screen if I keep pressing the key. I want to stop the player at the end of the screen. Here is my code this is not the complete…
0
votes
1 answer

Goto function isn't working in rawturtle with mixed turtle and tkinter

I am trying to make tic tac toe project in mixed turtle and tkinter and it is going very well by now, I have a bug now. I made 9 buttons for every field with coordinates, but whenever I click any button it goes to the first written position. from…
Marko
  • 123
  • 1
  • 10
0
votes
1 answer

Need help debugging the Python turtle module on Mac

I'm trying to debug some odd behavior of a graphics module I've built on my students' old Mac computers. I've tried to copy only the relevant things below, but I imagine that my question is probably going to answer the questions of why it's…
0
votes
0 answers

Turtles doesn't show on one frame

So I'm trying to create turtles racing but with different windows at the same time. The play and exit buttons work but when I pick a color, nothing happens. Here's some of my code. P.S I didn't add all of them because stack overflow wouldn't allow…
0
votes
1 answer

Why does my turtle stop moving when I try to add more to its shape?

I am trying to draw a shape and then move that shape around the screen with the arrow keys. My goal is to make a 2D game in the end, but I can't figure out how to draw more than a circle and get it all to move. I pasted my code so far. After the…
Jake Henry
  • 49
  • 1
  • 1
  • 6
0
votes
0 answers

Giving images animation in turtle graphics

I'm having trouble with images in turtle graphics. There's a couple things i want the turtle images to do. In some games i would like the images to use the same properties a turtle would have. how do i give access to turtle commands to an…
ACMBitz7
  • 14
  • 3
0
votes
1 answer

Error that font=('Courier', 24, 'normal') are also values for the argument align='center'

pen.write('Player A:', str(score_a), 'Player B:', str(score_b), align='center', font=('Courier', 24, 'normal')) (turtle imported) (score_a and score_b are variables that contain a boolean) This happened right after I added str(score_a) and…
0
votes
0 answers

Function turtle shapes

So i need to write a function that takes the length of the side and the number of sides of the figure as an argument and then draws a corresponding equilateral shape with the turtle. I have to use this function to draw 20 random shapes (must use…
0
votes
2 answers

Is there anyway to shorten the amount of lines used for having multiple turtles?

So I'm trying to make a program where I want to have many turtles. But I was wondering if instead of writing every single name to instate a new turtle being made, I could make it as short as one line if it's possible on Python turtle. I just want to…