Collisions/Tiles/Physics - Pygame Tutorial: Making a Platformer ep. 3

preview_player
Показать описание
This video covers tile maps, pixel art scaling, tile collisions/physics, transparency/colorkeying, and jumping.

0:00 - Intro
0:51 - Base Script and Images
1:24 - Tile Map
3:57 - Pixel Art Scaling
8:17 - Rendering the Tile Map
13:36 - Transparency/Colorkeying
14:44 - Tile Physics/Collisions
21:26 - Implementing Physics/Collisions
25:08 - Jumping
29:37 - Outro

In-Depth Video on Physics:

Code Written:

Discord:

My Twitter:

Potato Tier Patrons:
Keill

Outro Music is Pancakes by AdhesiveWombat

This video and the code produced in it are released under: CC0 1.0 Universal (CC0 1.0). This puts the video and code produced in it in the public domain, so use it for whatever you want.
Рекомендации по теме
Комментарии
Автор

I started learning Python recently, and these tutorials are great! (I already had experience with other programming languages so learning Python itself is pretty easy for me). These tutorials are an absolute gem for me. And your timing is so perfect. Out of curiosity I checked the upload date, expecting it to be like 7 years ago like every other Python tutorial on the internet, and to my pleasant surprise, this is only a month old! I'm a new subscriber. I really hope your videos gain more traction, you deserve it.

saturnine.
Автор

Your channel will go boom, i can feel it! Subbed!

TheDaKSn
Автор

best general pygame tutorials out there, would never find any like it. great job. im actually surprised you don't have over 100k yet...

thomasfrade
Автор

Love your tutorials for real. I cant find one good Python Game Tutorial because the most tutorial gamedevs are trash and you're just the best!

umbreonben
Автор

You old video was awesome! Used it to build a Boris Johnson platformer. Thanks for the update too, though ^_^ Your content is awesome.

justajolt
Автор

you are so close to 10k subscribers! here since below 1k.

hextav
Автор

bruv, this is one of the most helpful videos i've watched

OrangeDied
Автор

So nicely explained, so much highly useful side information. Very nice tutorial! :)

SuperQuwertz
Автор

To solve the head bonk problem: below 'if collisions['bottom'] -- else: --', do 'if collisions['top']: player_y_momentum += 1', and that way if you have a head bonk you'll fall down at a rate of one pixel per frame, so you aren't stuck for a few frames.

dragonius
Автор

this is such a nice channel this is what started me coding in pygame (mainly because i couldnt find a tutorial that didint just jumpcut each minute)

Cloud-blox
Автор

You finally did it bro you finally did it.

aoguro
Автор

Built-in ways of doing something: *exist*
DaFluffyPotato: "I'm gonna pretend I didn't see that"

leobozkir
Автор

Thank man, now I understand this part better. Thank you very much.

bryantgrey
Автор

what is the 32 argument for in pygame.display.setmode() line

aarondraws
Автор

Deam man, your tutorials are so useful, thank you so much, you are helping me a lot

grottordrynor
Автор

Man, your tutorials are the best on youtube!

chelovek_v
Автор

thanks for this video, the original one really caused a lot of confusion :)

masExz
Автор

10:00 im pretty sure you can use enumerate() for this:

for y, row in enumerate(game_map):
for x, tile in enumerate(row):
...

it will do incrementing y and x for you

exenzi
Автор

26:58 so, i fixed the head sticking to the top of the roof thingy. is this like, the correct way, or is there a better way. here is my way:
elif collisions['top']:
player_y_momentum = 1
i just immediately set the momentum from 0 to 1 to like kind of bringing him down quick

kattarrchak
Автор

TYSM! I've been looking for a solution that was simple and easy to understand.

David-hlwo