Simple Python Turtle Graphics Game (Part 4)

preview_player
Показать описание
NEED HELP?

❤️❤️ SHOW SOME LOVE AND SUPPORT THE CHANNEL ❤️❤️

Click Join and Become a Channel Member Today!
Channel members can get preferential comment replies, early access to new content, members only live streams, and access to my private Discord.

Amazon Affiliate Links

Other Affiliate Links

LINKS

LEARN MORE PYTHON

LEARN MORE JAVA

#Python #Tutorial #Beginner
Рекомендации по теме
Комментарии
Автор

Instead of the pythagorean thingy, try dist = math.hypot(x2 - x1, y2 - y1) Easier to use, does the same job. Btw, great tutorials Sir! They help me a lot!

istvankovacs
Автор

Cool tutorial!
I was confused with the math.pow, so I thought that might help others:
>>> x = 5
>>> math.pow(x, 2) == x **2
True

NikoxD
Автор

thanks for the turtorial now i know collision is based of paragothus theorum

glode
Автор

This is such a good explanation, using some of your concepts to do my assignment, Thanks!

GG_Booboo
Автор

Can you please explain why we used d = math.sqrt(math.pow(mii.xcor()-goal.xcor(), 2) + math.pow(mii.ycor()-goal.ycor(), 2)) for collision checking?

elifkaragoz
Автор

am new to python and i know the basics, loops variables and such
and now i want to learn turtle because our teacher said that we will be using it in future projects, is this playlist of 9 enough to learn the its basics?
or are there other things and totorials/playlists i need to follow, cuz i havent really found a well organized long totorial like the ones you see for python language in general

deathstare
Автор

you could do(windows):

import os
os.system('pause')


instead of:
raw_input('Press Enter To Continue')

AhsaniTaqwim
Автор

What app do you use for programming in python?

ilyamikheev
Автор

HELLO!
Can you please teach us how to reset the level?
And how to save the level?

quintinkuo
Автор

After the first goal is collided with the second goal does not move to another random position, nothing happens when the player goes over it. :/

  d= math.sqrt(math.pow(player.xcor()-goal.xcor(), 2)+ math.pow(player.ycor() - goal.xcor(), 2))
    if d < 20:
        goal.setposition(random.randint(-600, 600), random.randint(-300, 300))

xboxkiller
Автор

when i type

#create goal
goal = turtle.Turtle()
goal.color = ("yellow")
goal.shape = ("triangle")
goal.penup()
goal.speed(0)
goal.setposition (-100, -100)

it doesn't appear...it's just the spaceship moving

cuteknight
Автор

When i do the if d < 20, the semicolon gives me an error in python 3. can you do a solution

DavidJ
Автор

i have a question what if collision checking part is not working( im using thonny)

jasonmorillo
Автор

Btw, How did you knew that 20 was the right number?
d < 20
5:17

שיפרגון-יכ
Автор

I could not understand why do we check the distance between 2 points

elifkaragoz
Автор

When I test it it says goal.setposition(random, randint(-300, 300), random.randint(-300, 300)) and it says NameError: name ‘randint’ is not not defined. Is to because of what turtle

Nothern-pe
Автор

by the way, im using 3.5 so i made some changes.

jamesinman
Автор

2:53 can we something like this:
if player.xcor() - goal.xcor() == 1 and player.ycor() - goal.ycor() == 1:
goal.hideturtle()

Please correct my mistake

sovanraksa
Автор

Can you make a separate video about collision detection plz.

hayyans
Автор

Hi umm there is a problem it's that the circle goes outside or on top of the border hope you can help

faizanmostak
join shbcf.ru