
Python Game Programming: Simple Cookie Clicker
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
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!
Yay!
add shop and upgrades
Does it work with Visual studio code because I am getting a lot of error
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
Which software do you use
It couldn't display the click counter
bro you didnt even help us idkev what to do cuz i have windows
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. 😀
Could you help me? If we could use discord or something and you could help me I can show you what it does.
Thanks I had to make a game for school but i added more stuff like grandma's and cursors thanks to you!
Why do you tend to use turtle rather than pygame?
It dont show me the clicks…
Is it because of version of python?
Mine is 3.9.0
how i can change iconin window?
Finally… A worthy YouTube tutorial…
Your day is gonna be lucky if you saw this 😉
How can I make this using tkinter?
The clicks text not showing pls help, thanks
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
Does it work on pycharm?
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”
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()
what is the point of a cookie clicker again?
"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.
I went to github but saw no "Download ZIP" Button
Hello, I did everything and almost everything works, but I don't see the clicks?
umm how do you download the cookie
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
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 )
thx for make this video , i love it 🙂
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.
Idk why but the click counter doesnt work ive even copied the code and it still doesnt work
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!
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.
177th comment
180th comment don't let the ball stop keep it a rollin
181st comment , keep up the good work bro!!
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!
UR SO HELPFUL OMGGGGGGG
Tried this, it says syntax error: position argument follows keyword argument
I thought mine wasn't working but I just had to make my window bigger haha
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
this is cool
183th comment 👍 good video
how do you reply to ever comment lol
AHH I LOVE YOUR CONTENT SO MUCH😭
I'm getting an error on, pen.hideturtle() saying self is not declared 😖
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))
thank you for making this really good video. i have expanded this into a clicks per second test
Wow, awesome man! Simply explained and it works. Thanks i wish you well and good luck in the new year
Thank you very much)