Python Game Programming: Simple Cookie Clicker - playegndary.com

Python Game Programming: Simple Cookie Clicker

TokyoEdtech
Views: 27085
Like: 535
In this video I show you how to make a simple Cookie Clicker clone in just 22 lines of code!

Download the Code and Image Here:

NEED HELP?
🆘 Watch this first and then let me know in the comments below:

❤️❤️ 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
💻 My Laptop (Asus Zenbook 13):
🎙My New Microphone (Blue Yeti Pro):
🎙My Old Microphone (Blue Snowball):
🎶My USB Interface (Focusrite Scarlett Solo):

Other Affiliate Links
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing.

LINKS
🗄️ GITHUB:
💬 Follow me on Twitter:
📜 Subscribe to my Newsletter:
📝 Check out my Blog:
⬇️ Download Geany Editor:

LEARN MORE PYTHON
➡️Space Invaders:
➡️Snake Game:
➡️Pong:
➡️Space War:
➡️Intro to Python (for Java Coders):
➡️Space Arena – The Ultimate Python Turtle Graphics Game Tutorial:

LEARN MORE JAVA
➡️Basic Java for Beginners:

➡️Intro to AP Computer Science A:

#Python #Game #Tutorial

200 Comments

  1. This is very good code. You would be great at making gameboy games. Because they have almost no memory & you need to make a lot of shortcuts! They run a z80 microprocessor (its very similar) there is almost no practical use for learning z80… But you can still have loads of fun!

  2. Does it work with Visual studio code because I am getting a lot of error

  3. this is actually kinda works but the problem is that i use idle python 3.5.1 and when i do the f"Clicks: {clicks}" it showes me an error and if i delete the f neither way the text won't appear

  4. bro you didnt even help us idkev what to do cuz i have windows

  5. I've never seen the 'turtle' module before, I started learning pygame a few weeks ago and I am currently working on trying to make my own clicker game, called 'Caps clicker' where you have to click a button to get bottle caps. You can get a bottle cap boy to go and collect bottle caps for you. 😀

  6. Could you help me? If we could use discord or something and you could help me I can show you what it does.

  7. Thanks I had to make a game for school but i added more stuff like grandma's and cursors thanks to you!

  8. Why do you tend to use turtle rather than pygame?

  9. It dont show me the clicks…

    Is it because of version of python?

    Mine is 3.9.0

  10. Finally… A worthy YouTube tutorial…

    Your day is gonna be lucky if you saw this 😉

  11. Help Me
    Error Message:
    Traceback (most recent call last):
    File "C:/Users/izyaan/AppData/Local/Programs/Python/Python39/ipuoyi8tuy.py", line 7, in <module>
    wn.register_shape("cookie.gif")
    File "C:UsersizyaanAppDataLocalProgramsPythonPython39libturtle.py", line 1134, in register_shape
    shape = Shape("image", self._image(name))
    File "C:UsersizyaanAppDataLocalProgramsPythonPython39libturtle.py", line 480, in _image
    return TK.PhotoImage(file=filename)
    File "C:UsersizyaanAppDataLocalProgramsPythonPython39libtkinter_init__.py", line 4062, in __init_
    Image.__init__(self, 'photo', name, cnf, master, **kw)
    File "C:UsersizyaanAppDataLocalProgramsPythonPython39libtkinter_init__.py", line 4007, in __init_
    self.tk.call(('image', 'create', imgtype, name,) + options)
    _tkinter.TclError: couldn't open "cookie.gif": no such file or directory

    Paste Bin Link: https://pastebin.pl/view/9cac2bb4
    Pls Reply Fast

  12. Help please when i typed
    “wn.register_shape(“Click.gif”)

    Click = turtle.Turtle()
    Click.shape(“Click.gif”)
    Click.speed(0)”
    It said “couldn’t open “Click.gif”: no such file or directory”

  13. For some reason it doesn't work for me. Getting error message from somewhere.
    Here's the code:

    # Cookie Clicker
    # Simple Cookie Clicker Clone
    # Python 3:x Compatible
    # Windows, MacOS, and Linux Compatible
    # by @TokyoEdTech
    import turtle

    wn = turtle.Screen()
    wn.title("Cookie Clicker by @TokyoEdTech")
    wn.bgcolor("black")

    wn.register_shape("cookie.gif")

    cookie = turtle.Turtle()
    cookie.shape("cookie.gif")
    cookie.speed(0)

    clicks = 0

    pen = turtle.Turtle()
    pen.hideturtle()
    pen.color("white")
    pen.penup()
    pen.goto(0, 400)
    pen.write(f"Clicks: {clicks}", align="center", font=("Courier New", 32, "normal"))

    def clicked(x, y):
    global clicks
    clicks += 1
    pen.clear()
    pen.write(f"Clicks: {clicks}", align="center", font=("Courier New", 32, "normal"))
    cookie.onnclick(clicked)

    wn.mainloop()

  14. what is the point of a cookie clicker again?

  15. "couldn't open "cookie.gif": no such file or directory" that happened when I launched the script, even if my file is on my desktop. here is my script, but i dont think the problem is here :
    import turtle

    wn = turtle.Screen()

    wn.title("Cookie Clicker")

    wn.bgcolor("black")

    wn.register_shape("cookie.gif")

    cookie = turtle.Turtle()

    cookie.shape("cookie.gif")

    cookie.speed(0)

    wn.mainloop()

    thanks for helping me in advance.

  16. I went to github but saw no "Download ZIP" Button

  17. Hello, I did everything and almost everything works, but I don't see the clicks?

  18. Thanks lol , i’ve been trying to do this by myself for a bit and couldn’t get it and i was able to get the first parts done before watching tutorial but then i just wasn’t able to do the last bit

  19. so i made a clicker game without any game library i only used tkiter and i am about to add a small data base to kame it store the score and the upgrades (i don't know wy i comented )

  20. Hi! This is the first video I've watched from you and I am so glad I found you because this video was so good! It has everything what begginer needs. But I have a little problem…

    When I execute the game I can't see the text Clicks: 0.
    I checked the code and it was written correctly and I have Python version 3.8 so that shouldn't be problem neither sooo… I don't know.

    I would really appriciate your help. 😀 Thanks.

  21. Idk why but the click counter doesnt work ive even copied the code and it still doesnt work

  22. Best coding teacher on YouTube! I nailed this tutorial and was surprised I was able to keep up. He doesn't go too fast like everyone else. Perfect speed and explanations!

  23. You are so much better than the other tutors around, some I can't even listen to… I hope you make lots more content for beginners like me.

  24. 180th comment don't let the ball stop keep it a rollin

  25. 181st comment , keep up the good work bro!!

  26. Hello, I've been watching your videos and so far I managed to get the Pong and Snake games going, it felt awesome to see myself creating something so cool with your help.
    Now I see this new function "register shape" and I was wondering if I could use it on those other games to improve some visuals.
    Thank you very much, I really appreciate the time you take to make these tutorials and keep up with the comments section!

  27. Tried this, it says syntax error: position argument follows keyword argument

  28. I thought mine wasn't working but I just had to make my window bigger haha

  29. hey i am a German guy and i like your tutorial and i am new to python can you help me to learn how to get a upgrade shop and a automatic generate cookie ? i dont know how to code that

  30. I'm getting an error on, pen.hideturtle() saying self is not declared 😖

  31. I am getting this error: wn.register_shape('cookie.gif')

    File "C:UserschrisAppDataLocalProgramsPythonPython39libturtle.py", line 1134, in register_shape

    shape = Shape("image", self._image(name))

  32. thank you for making this really good video. i have expanded this into a clicks per second test

  33. Wow, awesome man! Simply explained and it works. Thanks i wish you well and good luck in the new year

  34. Александр Ирейзеров says:

    Thank you very much)

Leave a Reply

Your email address will not be published.