Mate ur pygame videos are absolute quality, u explain it so much clearer and better than my university. Big love
@CodingWithRuss
Жыл бұрын
Haha glad to hear it!
@samirelhage1318
Жыл бұрын
wait u learn pygame in uni ?????
@sylvanfranklin6904
3 жыл бұрын
It saddens me that channels like this (that give actually good content and get straight to the point) don't get the attention they deserve. My advice is to make really appealing thumbnails
@timsim83
Жыл бұрын
I used to sketch characters like Commander Keen onto a post-it note with a grid drawn on it and then redraw them, pixel by pixel, into the Urban Renewal Kit for Sim City when I was a kid. This stuff makes sense-THANK YOU!!!
@muhammedelzalabany
7 ай бұрын
wow so much easier than the other tutorials I've watched five stars ⭐⭐⭐⭐⭐ you are so calm and just straight in your vids Thank you
@CodingWithRuss
7 ай бұрын
Thanks, glad you liked it! :)
@elianelebars5288
3 жыл бұрын
Just the video I needed! Thanks a lot for your very clear and easy to follow explanations.
@CodingWithRuss
3 жыл бұрын
You're welcome! Glad you found it useful
@wizardly
Жыл бұрын
Tip. Instead of using a defined color key, set the background to be transparent. image = pygame.Surface((width,height), pygame.SRCALPHA).convert_alpha()
@deanbond007
Жыл бұрын
Thank you this helps a lot
@SuperJSM
Жыл бұрын
Thanks for this! It's comments like these that help cover optimisation areas of coding that are sometimes forgotten by the tutorial creator. (No offence Russ, it was a great tutorial as it was!)
@musaifbangi8705
7 ай бұрын
Thanks brother ❤
@jairomatheus9200
6 ай бұрын
THANK YOU MEN!!!
@rav88pl
6 ай бұрын
OMG THANK YOU. SPEND WHOLE DAY HOW TO REMOVE BLACK BORDER!!!
@tasinrahman2931
Жыл бұрын
Love your videos. Especially the way you run through procedural code before getting into classes it really helped me understand the absolute basics
@CodingWithRuss
Жыл бұрын
Thanks, glad to hear it was helpful
@eugeneee4009
2 жыл бұрын
Wow, I learnt a lot today. This channel is truly a gem!
@CodingWithRuss
2 жыл бұрын
Thanks! Glad it was helpful
@erikoostveen
8 ай бұрын
Excellent tutorial. Well explained, easy to follow. I am off to the next one; animation
@CodingWithRuss
8 ай бұрын
Thanks, glad it all made sense!
@star_t1
3 жыл бұрын
As usual good video. And thanks for shooter and platformer tutorial. Now I'm making my own game thanks 😁
@CodingWithRuss
3 жыл бұрын
Thanks! Look forward to seeing your game :)
@star_t1
3 жыл бұрын
I'm commenting here again. While I was making game I got this error File: D:\(than it says file location). Line 108 in player_group.draw (screen) File: C:\ (it says location again) line 546, in draw surface.blits((spr.image, spr.rect) for spr in sprites) TypeError: Source objects must be a surface
@star_t1
3 жыл бұрын
I don't know what kind of error it is. I tried to fix it but than it says TypeError: 'Group' can't use blit (I didn't even used .blit function)
@CodingWithRuss
3 жыл бұрын
@@star_t1 Hard to say what the error is, but it works fine here so must be a typo. Check the code I've linked in the description and it should help find the error
@soupnoodles
3 жыл бұрын
Thank you so much, this makes my game so much faster
@CodingWithRuss
3 жыл бұрын
Awesome, glad it helped!
@HoRRoRlets
3 жыл бұрын
Dude.... This will be a great video. Went through this just a week ago on my own...Looking forward to working through it with you
@jamesking4350
Жыл бұрын
Used this to fix issues with images that had black or outlines. def get_image(sheet, frame, width, height, scale): image = pygame.Surface((width,height), pygame.SRCALPHA).convert_alpha() image.blit(sheet, (0,0), ((frame * width), 0, width, height)) image = pygame.transform.scale(image, (width * scale, height * scale)) return image
@stephenkentperez7705
5 ай бұрын
sprite_sheet = spritesheet.SpriteSheet(sprite_sheet_image) making code readable is such a glorious endeavor.
@EliJohnson-f4v
Ай бұрын
Thanks, Russ! Big help!
@duangaolu
19 күн бұрын
Quite helpful! Thanks.
@incogneeto982
3 жыл бұрын
Question because I am just learning. Is there a difference between making your while loop with Versus Is there a performance difference or is it just personal preference? Also, great videos. They are helping me a lot, thank you!
@CodingWithRuss
3 жыл бұрын
Thanks! It's just personal preference, it's how I saw it done when I was learning pygame so I stuck with it but either option would work.
@CubixCreations
3 жыл бұрын
The first option, saving the run condition to a variable, is prob better, as it lets you to control when you want your game to stop during debugging etc.
@_dotZero_
2 жыл бұрын
Great video! I just picked up pygame to use as part of a school project and am attempting to make a basic game. I'll definitely be passing this link along to others who are interested. I have one question though that's more of a side topic. I am using TIled to create my maps and export as an image and as a csv to track which sprites to draw. So far my tile_ids have line up nicely but I'm hoping someone here may know how to pull tile_ids from a tileset in TIled?
@armanmaratuly1349
6 ай бұрын
Thank you! Very good, going to the next video to animate it
@evagok3698
Жыл бұрын
You have forgotten to say like the video and comment :))) You are best Jehuuehuue!!
@smokespekter
Жыл бұрын
this is so helpful, thank you so much!
@CodingWithRuss
Жыл бұрын
Thanks, glad to hear it!
@vrajsavani
2 жыл бұрын
Brilliant Tutorial. Onto The next part!
@RolandGustafsson
2 жыл бұрын
you could include the width, height and background color key to the SpriteSheet properties, perhaps even scale
@navkd1854
Жыл бұрын
hi, I've pretty much done the code identical, however when I run it at the end it says on line 13 there is a type error: SpriteSheet.__init__() missing 2 required positional arguments: 'columns' and 'rows'. I can't identify the issue, please help
@CodingWithRuss
Жыл бұрын
It could be that when you are creating the sprite sheet object from your main file, you aren't passing arguments into the brackets. So it is looking for those 2 arguments but it can't find them
@navkd1854
Жыл бұрын
@@CodingWithRuss i forgot to say thank you, i fixed that problem. is there anyway you could help me with my collision detection code? i have defined both the sprite_rect and the platform_rect and made the collision detection code but the sprite is not able to jump onto the platforms and goes straight through them. please can you help me as it is my NEA which is due in a couple of days? if i could email you my code or comment it, whatever is best.
@taunhawk9888
Жыл бұрын
Great video! Consolidates what I learned from your Udemy class for building an RPG with pygame.
@CodingWithRuss
Жыл бұрын
Great to hear!
@davivieira3619
3 жыл бұрын
Your video is awesome!
@CodingWithRuss
3 жыл бұрын
Thanks!
@art_made_here
6 ай бұрын
Does anybody know why I get an error saying video system not in initialized
@oliverbosworth1045
2 жыл бұрын
amazing tutorial!
@CodingWithRuss
2 жыл бұрын
Thanks!
@TestyCool
6 ай бұрын
You could used get_pixel from the PIL module to sample the color of the top left most pixel. That way you don't need to tell it what the color to make transparent. from PIL import Image with Image.open('doux.png' **or just image location**) as image bad_color = image.get_pixel((0, 0)) Yes the position needs to be in a tuple so you need the extra parentheses. Also Thank god for pygame.transform.scale_by just give it a surface and factor and away you go.
@LawrenceAaronLuther
5 ай бұрын
FYI he does explain this via OOP at 19:06
@guido1362
Жыл бұрын
Great tutorial, but turning the black background transparent also turns all my art that uses the colour black transparent. Do you know how I can fix this?
@CodingWithRuss
Жыл бұрын
If you have images with a transparent background, use .convert_alpha() at the end of the image.load() function. This will load the image in and maintain transparency
@xxhoodbunnyxx
9 ай бұрын
What can I use as an equivalent to paint on Macbook? Helpful video but I am a (new) Mac user.
@doggoluvr133
Жыл бұрын
followed this but because when you take the file in it makes everything black to transparent any black textures become see through, no explanation of how to change this or what really combines to cause this. and its very common to have black outlines which will be broken...
@HalfwayAgain
3 ай бұрын
How do I put files in the directory so I can code in the sprite in?
@Hunter-xz4qu
9 ай бұрын
My Sprites contain black colour and it just breaks the sprite. what am i supposed to do?
@ImTheRealCam
11 ай бұрын
I want to use VS Code and this does not really help in how to get a sprite inside the pygame code.
@9O94WIND
2 жыл бұрын
thanks for the tutorial, now im thinking of making a game, but there is an error that keeps occuring in my code, it says that a module "pygame" does not exist what should i do :(
@CodingWithRuss
2 жыл бұрын
Did you figure it out already? You need to install pygame first, check out pygame.org
@jamesw8699
2 жыл бұрын
Thank you very much. Im still having some issues with the sheet i downloaded, which is “indented” by a few picels. This got me somewhere though!
@ParleysWoodedJourney
2 жыл бұрын
Could you use a loop to load all the images from the sprite sheet instead of doing it one at a time? and load them into a list?
@DaSummit
2 жыл бұрын
Hello, Great tutorial. I am having one issue though, after making the spritesheet a standalone class I'm getting the error "SpriteSheet() takes no arguments" coming from the line that creates an object of the class 'sprite_sheet = spritesheet.SpriteSheet(sprite_sheet_image)'. Does anyone know why this might happen?
@toandiep47
2 жыл бұрын
I had the same problem too. You want to go to spritesheet.py and on Line 4. def __init__(self. image): There's two underscores, I missed 1 on each side and that is making the SpriteSheet() takes no argument.
@smokespekter
Жыл бұрын
i'm having the same problem lol
@somebody31415
2 жыл бұрын
Is it better to make a sprite sheet out of my animations rather than just writing an if loop and loading them into a list of lists? What does it accomplish, because it doesn’t sound any easier? Is it more efficient? Does it save memory?
@CodingWithRuss
2 жыл бұрын
If your images are already separated into individual frames then I would just stick with that and make a loop to load them into a list of lists. Sometimes when I download 3rd party assets though, they come as complete spritesheets so for those situations this method helps to automatically load the images in.
@vxxvp2042
3 жыл бұрын
Great !!
@CodingWithRuss
3 жыл бұрын
Thanks!
@congsangnguyen3149
3 жыл бұрын
thank you!
@CodingWithRuss
3 жыл бұрын
You're welcome!
@andersbloch9847
Жыл бұрын
can you use an image which is transparrent beforehand so the sprites don't have the black background?
@CodingWithRuss
Жыл бұрын
Yes but you have to add .convert_alpha() to the end of the "pygame.image.load" line so that the transparency is not lost
@h3l_l
Ай бұрын
i like how you say zero
@CodingWithRuss
Ай бұрын
I never noticed 😅
@h3l_l
Ай бұрын
@@CodingWithRuss I didn't mean to offend you I swear
@fastboialex9525
2 жыл бұрын
Hey loved your vid and i wonder what software you used ;)
@CodingWithRuss
2 жыл бұрын
Hello. I used sublime text editor
@SahilTomar-h4c
Жыл бұрын
total noob here, using the color key function is also removing the black outline/details on the asset i am using , can you suggest some fix. thanks in advance
@SahilTomar-h4c
Жыл бұрын
solved , thanks a lot , great video image = pygame.Surface((width,height), pygame.SRCALPHA).convert_alpha()
@CodingWithRuss
Жыл бұрын
Welcome!
@Dachowda
Жыл бұрын
What app are you using with the Dino images displayed?
@CodingWithRuss
Жыл бұрын
I use sublime text for coding and I use GIMP for image editing
@Dachowda
Жыл бұрын
@@CodingWithRuss Thank you! I drew my images using procreate, how would I make a spritesheet from them, would I have to import them to gimp or Microsoft paint?
@boxhead-zk7sn
11 ай бұрын
pls can some one help with this error dino_scrpit = image2.Image(dino) ^^^^^^^^^^^^^^^^^^ TypeError: Image.__init__() takes 1 positional argument but 2 were given the image2 if the other python file with Image as it class
@dhpshow9277
2 жыл бұрын
how do you do it if your sprite has black in it?
@LawrenceAaronLuther
5 ай бұрын
just add image.fill((255, 0, 255) or whatever you prefer after "Image = pygame.Surface(). Then choose that same color for the image.set_colorkey()
@alperklc7782
5 ай бұрын
thanks
@ToujoursIris
3 жыл бұрын
So nice! I hope you make a bomberman game in PyGame...I tried to do that but I could not load in sound...after some days, I realized that I wasn't using PyCharm, instead, I was using Anaconda...(Note: Anaconda Spyder doesn't support Mixer Module...)
@ToujoursIris
3 жыл бұрын
Still working on it tho...i just needed some tips and idea from u...i hope u reply
@ToujoursIris
3 жыл бұрын
Also bro, CONGRATS FOR UR 3000+ Subs!
@ToujoursIris
3 жыл бұрын
Im ur fan!
@CodingWithRuss
3 жыл бұрын
Thanks! I didn't know Spyder doesn't let you use mixer, good to know. Bomberman would be pretty cool!
@ToujoursIris
3 жыл бұрын
@@CodingWithRuss Sure, welcome...you always learn everything from everyone someday...
@ashwins4776
3 жыл бұрын
What editor you use for creating sprites..?
@lightenergy17
3 жыл бұрын
He seems to be using microsoft paint
@small_weiner6486
9 ай бұрын
holy shit your monitor is huge
@legendrags
2 жыл бұрын
how did u run the python file in sublime without a terminal!!
@CodingWithRuss
2 жыл бұрын
CTRL+B
@legendrags
2 жыл бұрын
@@CodingWithRuss thnx
@quanvuinh20
3 жыл бұрын
I made the video active image about spritesheet is not 
@krishdoesstuff8541
5 ай бұрын
it keeps saying "no module named pygame" for me.
@CodingWithRuss
5 ай бұрын
I have a short video to explain how to fix that error: kzitem.info/news/bejne/ka6Vs3mBq2KAfYY
@krishdoesstuff8541
5 ай бұрын
@@CodingWithRuss THANK YOU SO MUCH!!!
@liamcleetus6929
3 жыл бұрын
first, plz pin so i can show my brother
@MistereXMachina
Жыл бұрын
What IDE are you using?
@CodingWithRuss
Жыл бұрын
Sublime text
@MistereXMachina
Жыл бұрын
@@CodingWithRuss Thank you so much, and thank you for the video!
@basicallybrand
2 жыл бұрын
what if you have a lot of rows?
@CodingWithRuss
2 жыл бұрын
It is a bit more tricky then but you could try adding a "for" loop to iterate over the rows and see how that works.
@_dotZero_
2 жыл бұрын
Try something like this... change the signature def get_sprite(self, row, col, width, height, scale, color): .... and then the blit would look like this: img.blit(self.sheet, (0, 0), ((col * width), (row * height), width, height))
@Anth.
Жыл бұрын
@@_dotZero_ I know this is really late but, I figured I would put this incase others read this. This does not seem to work, gives back Invalid Rect Style Argument. I tried multiple iterations of this. So, idk. If someone else knows how to get this to work, please share here. Thanks in advance if any does.
@earl.youtube
3 ай бұрын
Windows 10 🥵🥵🥵
@coolmirage6069
8 ай бұрын
What app you use for your sprite sheet?
@CodingWithRuss
8 ай бұрын
I think I used GIMP to arrange it, but I didn't draw the sprites themselves, they are 3rd party
Пікірлер: 122