If you are getting an error that FRects don't exist: You currently have only pygame installed, not pygame-ce! Pygame-ce is the latest (and greatest) version of pygame with lots of new features, make sure to have that one installed. First uninstall pygame in the terminal with "pip uninstall pygame" and then install pygame-ce with "pip install pygame-ce". I also talk about it in the video at 00:05:43
@enter_nullАй бұрын
I did have that error. thank you kindly :) yesterday I created my first "video game", a game where you have to escape a zombie that runs after you and you have to see how long you last (I implemented the a* pathfinding algorithm for the zombie movement). if the zombie touches you three times, you're done :D next step, I'll try the platformer game :) thank you so much for the tutorial
@minhlonxao99227 күн бұрын
how to solve errno 2 prolems, it cannot find the tmx file
@Gigglewoof20 күн бұрын
hi there I uninstalled pygame and I installed pygame-ce but it says that pyjama does not exist
@l0uied117 күн бұрын
hey, i did this and it still says "AttributeError: 'pygame.surface.Surface' object has no attribute 'get_frect'", I wrote the piece of code exactly how you did btw
@ClearCode17 күн бұрын
@@l0uied1 do you have both pygame and pygame-ce installed? That might be the error; just install both and then only install pygame-ce if that's the case
@kevcopo7 ай бұрын
First off, I love you. Second, I literally just got gone binging your jumping snail game and followed along the whole way. I was debating the next game to try and you just go and drop this?!?! Thank you sooo much! You're very good at teaching and letting us practice on our own to help us learn, keep up the quality man!
@HanzoBadamsambuu4 ай бұрын
Went through the exact experience LMAOOO
@nimaanmi4 ай бұрын
This is the kind of teaching I was searching for where the logical thinking is illustrated by drawing to the point (no space left for error thinking). 🖤🖤🖤
@salzig17 ай бұрын
Wow, this is probably the best and most comprehensive tutorial on how make games with pygame on yt. Thanks
@anantpankaj14604 ай бұрын
this video quiet literary covers all important pygame-ce features ...i love it
@emperor87167 ай бұрын
you are a legend man. i followed your ultimate pygame tutorial, and you and dafluffypotato inspired me to make a game engine using pygame. (though i moved on to making it in c++ 😂)
@chigstardan72857 ай бұрын
Christian and DaFluffyPotato are pygame legends!
@Choco7947 ай бұрын
@@chigstardan7285 They should team up to make something, it would cool.
@Choco7947 ай бұрын
@@chigstardan7285 They should team up for something. That would be cool
@SmashTheAdam6 ай бұрын
my love for games is what got me into programming, i won't work as a developer since i know how bad the conditions ans pay are, but i'm still intrested in making games, so thank you so much for this, having all of this for free is amazing
@trevorfranks69Ай бұрын
How is it going? If you're not going to gamedev, then where?
@mankemista-ps3qs11 күн бұрын
What do you mean there is bad pay? I don't know a singl decent dev with a bad salary
@Fluxrat7 күн бұрын
Way underrated video. Thank you so much for the effort, very helpful.
@rossmurphy45936 ай бұрын
Thanks!
@AndrewBerry-n6e5 ай бұрын
@ClearCode Wow, this was an incredible tutorial. I just completed all 5 games. Love the way you introduced more advanced topics as time went on. Great job! The only thing in the whole tutorial that stumped me was in the first game my player could not shoot if moving up+left, down+left, and down+right, but up+right was fine and any single direction was fine.
@rrahll7 ай бұрын
I just started, thank you so much for this huge course!
@jamiewhitehouse17085 ай бұрын
This tutorial series is mind numbingly good, thank you so much for putting so much work into this and putting it here on youtube free of charge. Absolute saint! That being said I have a problem on vampire survivor where the gun seems to be rotating around a point just to the left of the player, rather than the center of the player themself.
@ClearCode5 ай бұрын
Brilliant paid for it 😅 for the gun, do you rotate it around the center of the player? Sounds like you are using another position (like the topleft)
@jamiewhitehouse17085 ай бұрын
@@ClearCode Well thanks to you and brilliant then haha. I fixed the problem sort of, i fiddled with the rotozoom scaling to make the gun look a little bit nicer which seemed to be causing the issue and managed to find a way around it.
@patryk56543 ай бұрын
Spaceshooter took me 15 hours. Vampire survivor almost 20h and it was pretty challenging for me. I measure vscode time so I have it open while watching video, stopping it, trying to implement things on my own, messing around. Need some break for other projects than games, but overall very good video, thanks!
@PhilBird-yb4vq21 күн бұрын
how does it take you so long brooo you must suck!
@PhilBird-yb4vq19 күн бұрын
are you dumb?
@101touchapps7 ай бұрын
damn Christian. wooooo. awesome! i took your python game dev course on udemy. finished it 100%. 😅 i had to take 1 week off to rest. its good to see this. will definately take my sweet time and work on this too.
@ashersworld90982 ай бұрын
same
@101touchapps2 ай бұрын
@@ashersworld9098 it was nice
@mobaius64796 ай бұрын
Thank you so much
@JuiceTeaBeans5 ай бұрын
I'm only on the second game, but I am blown away by the depth of content combined with your ability to make complicated things more simple and understandable! When I need to understand a concept more in-depth, I simply jump over to your other Python/Pygame tutorials! I do have to slow the video speed down to about 60% if I want to do a (mostly) live follow of code (and pausing as needed to understand/catch up). Thank you for this! I'm feeling more confident as each day goes by.
@clutchgames66265 ай бұрын
when trying to use frect on the first game it doesn't work for me, it says its undefined, what should i do?
@R0k472 ай бұрын
@@clutchgames6626 uninstall pygame and reinstall pygame-ce (community edition), the old pygame isn't updated anymore
@ZackTheGiant6 ай бұрын
I don't understand how this is for free. Bless you and thank you.
@seccuenta50ydos7 ай бұрын
I love how clear all of your explanations always are!
@pedro-3339Ай бұрын
I mean, the name of the channel is *Clear* Code. Bro wasn't lying
@Geographyball17 ай бұрын
Instructions unclear, accidentally made minecraft 2.0
@Doubleshotgun7 ай бұрын
Wow, you must be a fast learner
@CodeKokeshi7 ай бұрын
I made a catch the bullet in head disease and how far can you get from jumping on a building game.
@JoeMama-dg8cl6 ай бұрын
@@CodeKokeshi you good bro?
@Learning-GameandCoding5 ай бұрын
😂😂🤣🤣🤣
@Synergy_Jxyy5 ай бұрын
But python is made with java
@ashdeepsingh31402 ай бұрын
Thanks alot there, for these great contributions Real respect for you :)
@mattiamauro42557 ай бұрын
One of the best coding guides ever. I am 14 and Italian, so not even english, and I understood EVERYTHING
@CassyCodes7 ай бұрын
Amazing. I love these in depth tutorials. Bookmarking this for later!
@santiagoramirez22104 ай бұрын
Thank you so much for the pygame tutorial, this provided me not only with an understanding of pygame but better insight into different ways of inheritance and encapsulation. I will use this knowledge to make something unique with AI . Thank you again.
@DungNguyen-kf5nk5 ай бұрын
your teaching style and content are excellent. It is very logical and easy to understand. You are a true teacher. Thank you very much and keep up with the good work.
@LordRamachandran3 ай бұрын
Amazing video. Learned so much and had such a great time. I really love it. You are a legend!
@drewfrench87843 ай бұрын
This is so in depth that I will be working on it for quite some time. Thank you!
@Fireman91435 ай бұрын
Very well done! Thank you for taking the time to make this! Best tutorial I've seen yet!
@mightbeeseventyseven60327 ай бұрын
please be advised that in order to be able to properly use FRect in pygame you must have the pygame community edition installed. The original pygame does not support frect...
@samincgs6 ай бұрын
Hey Christian, thank you for the amazing video, I have been learning alot of pygame from you and your videos are so informative and fun to watch!
@david4noy2 ай бұрын
Amazing tutorial - thanks a lot! The best I saw so far. Any chance for Python non game tutorials as well? like server and other stuff.. to cover more Python things
@brettinabox56077 ай бұрын
Between this and your discord, i owe all the vast majority of my programming knowledge to you, thank you so much for your help.
@Muad_Rey5 ай бұрын
keep at it legend you're the greatest Python tutor on youtube if you please could add some django tutorials or any py web framework if you're experienced at it and once again thank you
@friendlyskiespodcast4 ай бұрын
YES! Subbed! Thank you, been thinking to use python for my first game.
@him7624 ай бұрын
super cool video, loved all 11 hours of it
@North_annex4 ай бұрын
this guy forever have best tutorials
@RushedYT6 ай бұрын
Love your style of teaching, any plans on more Godot tutorials?
@ClearCode6 ай бұрын
end of the month! :)
@RushedYT6 ай бұрын
@@ClearCode amazing 😁
@nyxarisaАй бұрын
just a little correction for 14:25 on pygame.display.flip() vs pygame.display.update() according to the pygame documentation: - pygame.display.flip Update the full display Surface to the screen - pygame.display.update Update portions of the screen for software displays
@eagle13416 ай бұрын
Your tutorials are absolutely phenomenal. God bless you dude!
@devduttrangnekar69752 ай бұрын
2:33:32 I love how his inner gamer wakes up and then proceeds to retreat and move out of the meteor's path.
@ethan69337 ай бұрын
this is crazy, im loving these tutorials im learning loads, clear code might be the goat
@PietroM6 ай бұрын
Fantastic video! Your explanation of Pygame was clear, engaging, and incredibly helpful. Your teaching style makes complex topics feel approachable and fun. I'm Italian, and your English is fantastic-I can follow along perfectly. Could you perhaps make a video for advanced users as well? It would be awesome to dive deeper into the more intricate aspects of Pygame with your guidance. Thank you for everything you do!
@ClearCode6 ай бұрын
hey, glad you like it :) If you check out my channel you can find lots of advanced pygame tutorials, my 2 videos before this were a pokemon and a super mario game; both are much more complex than this video!
@PietroM6 ай бұрын
@@ClearCode oook thx
@Manuel-n9r7 ай бұрын
wow you realy leveled up your explanation, the vizuals at the start are great!
@AntonioPereiradaSilvaSantos7 ай бұрын
Thanks for this and every other video. I'll watch everything.
@rrahll7 ай бұрын
Thank you Clear Code! This is awesome!
@livehappily98465 ай бұрын
great explanation! I understood everything thanks to you! Keep going!
@ahmadabdulrazaq54406 ай бұрын
Hi, this is probably the BEST tutorial i think i will ever see in my life, from the slow explanation, to the exersices, everything is just pure perfection. I just have a question though, im curerently on the vampire survivor game, is the world.tmx file in the github different from the one in the video?
@ClearCode6 ай бұрын
hey, thank you :) It should be the same, does it look different?
@ahmadabdulrazaq54406 ай бұрын
Thanks for replying, it does look different, though it does look like a normal map, but different than yours
@ahmadabdulrazaq54406 ай бұрын
Im pretty sure they are the same but the video has more objects (ex. more trees in the upper-left corner)
@ClearCode6 ай бұрын
@@ahmadabdulrazaq5440 oh damn, sorry about that, if you look at the google drive folder you can find the finished code for each project and the tmx file from the video should be in there; will update the GitHub file tomorrow!
@ahmadabdulrazaq54406 ай бұрын
No problem in fact i just realized that it doesnt really effect the game that much since its outside of the game border, one more question and im so sorry for bothering you but when we get the collision sprites in: CollisionSprite((obj.x, obj.y), pygame.Surface((obj.width, obj.height)), self.collision sprites) The surface we created is showing up black instead of transparent, how do i fix that?
@worc9742 ай бұрын
Thanks a lot for all videos !! :)
@amirsaid7 ай бұрын
thank u very much i learned python from u,keep up the good work sir
@theblazearmy18416 ай бұрын
Thank you so much! You make such high quality tutorials
@NexusCoderX2 ай бұрын
1:39:00 2:12:20 import star surf only once 2:23:55 Creating Laser class 2:28:09 creating Meteor class
@johnexists7 ай бұрын
you are a godsend bro, keep it up
@lowlb5 ай бұрын
dude, you're amazing. Thanks(from brazil)😄
@jrgamerelite52874 ай бұрын
Instructions unclear, accidently made gta 6 and got sued by rockstar
@k.Kayzen2 ай бұрын
Massive Skill -Issue-
@jrgamerelite52872 ай бұрын
@@k.Kayzen 😔
@bulkierpanda1337 ай бұрын
Wow only been 30 minutes into the video I'm already thinking about creating art and also making it move this is awesome
@tbinaryg3 ай бұрын
Where is this guy's deserved million subs? No, seriously where are they?
@808smokr6 ай бұрын
at 30:38 if your using pycharm, make sure you put the photos in the same project folder
@fekeks7 ай бұрын
Very nice! Is it possible that we will see some more Godot videos in the future?
@ClearCode7 ай бұрын
will focus on Godot for the rest of the year!
@fekeks7 ай бұрын
@@ClearCode I'm looking forward to it!
@LucaS-me5dq5 күн бұрын
Hi, big fan of your videos. I was wondering if you'll ever do a pixel art tutorial, or go a little more in depth in your methods. Your pixel art is increadibly gorgeous.
@ClearCode5 күн бұрын
I either get publicly available pixel art or I pay actual artists; I actually suck at making art 😅
@LucaS-me5dq5 күн бұрын
@ClearCode I see, thanks for the quick and honest answer!
@indie_survivor7 ай бұрын
Best pygame tutorial by an expert❤
@alhamzahalalawnah63127 ай бұрын
Great work. Hope you make similar tutorials about web games
@erfanlab37287 ай бұрын
man you are a legend thank you for all the effort
@sonu-jangir7 ай бұрын
This is the first time I've seen your video 50 minutes after it was uploaded.
@sonu-jangir7 ай бұрын
Amazing Intro... 🎉🎉🎉
@sonu-jangir7 ай бұрын
I'm Very existing to watch this video... ❤❤❤
@spxrtan93393 ай бұрын
Hi! I've been loving the tutorial so far, and am close to finishing the space shooter game! It's been very interesting, but I had a small confusion in the collisions part. Why loop over both groups of sprites and check for collision if in the update function of the laser, you could use spritecollide in an if statement and set dokill to True and then use self.kill(). This would work vise versa in the meteor class (but only one use of this approach is needed) and I tested it and it worked fine! Just had a doubt with that, but I am really excited to move on to other projects, especially Vampire Survival.
@yangzhuoxunnhps7 ай бұрын
Amazing! Keep up the good work!
@seunknown7 ай бұрын
you should have much more subs for it being so good 🔥
@GaBoyInKy7 ай бұрын
Thank you once again, teacher.
@Hoco302 ай бұрын
Can you make a tutorial on type hints in python? Then it would be very good, And your explanation is very clear.
@zenchiassassin2833 ай бұрын
Amazing tutorial !
@michaelwallace94613 ай бұрын
This is helpful. I'm getting quite good at a lot in pygame but I always have trouble with platform and floor collisions. The player often either, sticks to the floor, drops partly through it or all the way through, teleports around when jumping. Pull my hair out a lot. Think it is to do with the order of input, setting speed, movement, collisions. I'll get there but resorting to print statements after each salient line to figure out what is going on
@Calculus_195 ай бұрын
This guy is making quality tutorials and nobody is talking about it??
@brandonjacksoon7 ай бұрын
Awesome course!
@Gabriel-ct2ql3 ай бұрын
Very awessome work
@mrinmoydeka12324 ай бұрын
Hey, bro at 51:00, it looks like the latest version of Pygame doesn't support .get_frect(). How can I manage moving objects with floats instead?
@ClearCode4 ай бұрын
you have the wrong pygame version installed. Uninstall pygame and then install pygame-ce
@Ask_Think_LearnАй бұрын
Very interesting tutorial
@rmzCrush2 ай бұрын
the difficulty spike from the space shooter to the vampire survivor caught me off guard.
@jamil55227 ай бұрын
You're so underrated my guy ❤
@zweinhanderhiruzen98117 ай бұрын
This is just amazing for real. I cannot believe this is for free. You sir, are a legend.
@rrroooooooooo594 ай бұрын
It seems you may have forgotten to add 'bg detail' to the settings file for pong (7:07:00) Also looks like the map file for the vampire survivor is a bit different, including the spawn points that have no name are in the download? Seems that the Finiette front sprite from Monster Battle has a strange black line in the corner of the sprite?
@IainEmslie7 ай бұрын
The man, the myth, the legend!
@user-Red_Haired19842 ай бұрын
For anyone having trouble with frect: To use frect, you need to uninstall the regular Pygame and ensure that you're importing Pygame-CE.
@axwellcorp7 ай бұрын
Amazing tutorial, thank you!
@dinsm8re7 ай бұрын
the goat has returned
@chevere34247 ай бұрын
You have a gift for teaching!
@DiffamaNature7 ай бұрын
Sir you really got that way to teach everything easily to beginners. Now I'm broke like a hell but be sure I'll support you once I get a job as a developer
@anantpankaj14604 ай бұрын
sir plz make a tutorial about multiplayer pygame as there is no tutorial about it on internet...love the video
@Gigglewoof12 күн бұрын
Hey one question, can you make a more in-depth tutorial on the shooter game where you can implement waves, loot boxes ect.?
@guilhermewhite72746 ай бұрын
hey, thanks for the tutorials!
@user-ov3et9yq8p2 ай бұрын
Sorry, I’m having a hard time understanding the table around 1:22:05. What exactly is the unit of delta time? Is it in seconds (sec)? Also, why is the unit in the last column pixel/sec? If you use pixel/frame * frame/sec * sec, doesn’t that just result in pixels?
@ClearCode2 ай бұрын
delta is in seconds (or milliseconds) and the ideal behaviour you want is pixels per second
@NazihBaydoun-mv5nq6 ай бұрын
Hiii! I love your tutorials alot... i love the way u explain everything and make exercises during the video. Thanks for everything... I just started and I'm done with the first game "space shooter", but why didn't you do a function in the Player class that doesn't allow the player to go away from the screen? (I saw it in another tutorial)
@ClearCode6 ай бұрын
oh yeah, that would have been a good idea... I just forgot 😅
@NazihBaydoun-mv5nq6 ай бұрын
@@ClearCode no big deal
@nelonelo274Ай бұрын
The rectangle functions such get_frect might not be recognize in some ide, instead just used get_rect which in some ide work for both 'int' and 'floating points' My guess is that it depends on the ide, but i'll keep it in mind in case I used a different ide and happens not to be working, then I'll used the correct function get_frect
@ClearCodeАй бұрын
no, you just have the old pygame installed, you need pygame-ce instead. it has nothing to do with the IDE
@zakiaabdlrhem70566 ай бұрын
First off, you are the best person ever, second, i am coding along and at 4:41:07 in: CollisionSprite((obj.x, obj.y), pygame.Surface((obj.width, obj.height)), self.collision_sprites) The surface is black not transparent, Why is it doing that?
@ClearCode6 ай бұрын
are you calling self.collision_sprites.draw() in the game loop?
@zakiaabdlrhem70566 ай бұрын
Yes but it's drawing the surfaces black, they should be invisible that's the whole point
@ClearCode6 ай бұрын
@@zakiaabdlrhem7056 you don't want to draw them at all, the collision will still work
@LethalAscendАй бұрын
Hi! Just following along the first game. For the exercise where you ask for laser and meteor collision, I accomplished it but in a different way. I did it by just checking collision in the laser class update loop. Why is it better to have a function for all collisions that you check in the main game loop as opposed to the update loop of each class. That way you dont need new sprite group also
@newsagetalks7 ай бұрын
I would have sworn that part at the beginning wasn't there before. 😅 Regardless, a great video guide on game development.
@dinocat87 ай бұрын
Can't believe these resources are free ! You are amazing
@woobulbul2 ай бұрын
Could you make (or link one that you've been using) a video about creating tilesets and graphics in general?
@rrahll7 ай бұрын
You are the Legend!
@abhijithr59387 ай бұрын
hey what theme do u use it looks nice
@ClearCode7 ай бұрын
it's the default VS code theme + material icon pack
@AlbertoGranados-n1z7 ай бұрын
You are the best!!!! Thanks!!!!
@Gameplay-ps9ub5 ай бұрын
If you used groupcollide in the spaceship game for lasers and meteors it would work as well I think. What was wrong with that approach?
@deathtrooper00167 ай бұрын
I am following the code and I'm at 50:11 in the video and i can't use frect, Visual Studio Code says this when I try and run it "TypeError: unsupported operand type(s) for +=: 'pygame.rect.Rect' and 'float'" what can I do to fix this error and run the game properly?
@ClearCode6 ай бұрын
you need to add one point of the rect; like rect.topleft += vector