PyGame Beginner Tutorial in Python - Loading Spritesheets

preview_player
Показать описание
In this video I will explain how to extract individual images from a spritesheet in PyGame. I am going to explain how to load a spritesheet, create a function to extract an image from it and finally create a class that can be imported into project

Code and assets on github:

Credits for assets used:

Check out my other PyGame tutorials:
Рекомендации по теме
Комментарии
Автор

Mate ur pygame videos are absolute quality, u explain it so much clearer and better than my university. Big love

CanvasKreps-hpuz
Автор

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

muhammedelzalabany
Автор

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

sylvanfranklin
Автор

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!!!

timsim
Автор

Just the video I needed! Thanks a lot for your very clear and easy to follow explanations.

elianelebars
Автор

Love your videos. Especially the way you run through procedural code before getting into classes it really helped me understand the absolute basics

tasinrahman
Автор

Wow, I learnt a lot today. This channel is truly a gem!

eugeneee
Автор

Excellent tutorial. Well explained, easy to follow. I am off to the next one; animation

erikoostveen
Автор

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

HoRRoRlets
Автор

As usual good video. And thanks for shooter and platformer tutorial. Now I'm making my own game thanks 😁

star_t
Автор

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),
image.blit(sheet, (0, 0), ((frame * width), 0, width, height))
image = pygame.transform.scale(image, (width * scale, height * scale))

return image

jamesking
Автор

Tip. Instead of using a defined color key, set the background to be transparent.

image = pygame.Surface((width, height),

wizardly
Автор

Thank you so much, this makes my game so much faster

soupnoodles
Автор

Thank you! Very good, going to the next video to animate it

armanmaratuly
Автор

Brilliant Tutorial. Onto The next part!

vrajsavani
Автор

sprite_sheet =

making code readable is such a glorious endeavor.

stephenkentperez
Автор

this is so helpful, thank you so much!

smokespekter
Автор

You have forgotten to say like the video and comment :)))
You are best Jehuuehuue!!

evagok
Автор

Question because I am just learning. Is there a difference between making your while loop with

<run=True
While run:>
Versus
<While true>

Is there a performance difference or is it just personal preference? Also, great videos. They are helping me a lot, thank you!

incogneeto
Автор

Great video! Consolidates what I learned from your Udemy class for building an RPG with pygame.

taunhawk
visit shbcf.ru