PyGame Scrolling Shooter Game Beginner Tutorial in Python - PART 10 | Collision

preview_player
Показать описание
In this Python tutorial I code a Scrolling Shooter Game using the PyGame module. I'm going to cover collision with the level

Credits for assets used:

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

this guy is the best watching in 2024 tysm you're making this so easy

isya
Автор

these kinds of vids make me feel like im in 2011 - same type of vid, same type of comments, and to be honest im loving it

andeemengaming
Автор

pls never stop doing videos like this <3

MrX-mhuu
Автор

Guess, I run out of compliments, but still, your videos are very usefull, they help alot.
They help to continue learning and dont give up.
Thanks you, Russ, yet another time!

АнтонНазарук-щс
Автор

10:20 quite an interesting mistake. but instead check elif and >= 0 I think you can still keep the if but only check self.vel_y > 0 instead of >= 0. checking self.vel_y = 0 is kind of unneccessary since you always reset it back to 0 when we met the collision. And thank you very much for the series and this video I've learnt a lot

saury
Автор

Very useful video but I did found a bug when you stand extremely close to the wall and throw the grenade it will automatically be teleported on the top of the platform so I suggest using 0.4 as the multiplier in the offset for x direction for the start of throw instead of 0.6.
Loved your tutorial though

oqaistanvir
Автор

did i wave at my monitor when he said "hello folks"? Yes. Am i ashamed? No. After many ours of seeing this series i'm very familiar with this voice and i think we're slowly becoming friends, Russ...

gonzoxy
Автор

I hope you will release the video sooner

quanvu
Автор

Thank you very much Russ.. your videos are amazing, your voice is soothing as well., easy on the ears. However, these videos goes beyond just training alone, they are reference materials for future usage. Pls can you always label the videos based on the training content so one can always know how to search for a solution to a problem during coding in your videos. like the previous should be WORLD MAP processing or something in that nature. Thank you

wingielee
Автор

Can you please help me? So, out of curiosity I've changed the sprite of player to another one, and now the player stops exactly at 1 tile away than necessary. I can't figure out why.

mrap
Автор

I have learned from you soo much that I managed to make a small game by my self you are a legend <3 :)
plz do respound

thejas
Автор

hello; I was wondering how I would be able to edit this code so that I can add in masks for pixel perfect collisions?

dragogammingalandvlogs
Автор

thank you very much! This video really helped me!

АртёмПетров-ччы
Автор

Finally U released iw as waiting and btw i am first lol

Acrowbatics
Автор

I am trying to add the scrolling system from this series into my game from the platformer series. Nothing I try is working any help?

tntanimations
Автор

Hello Russ, I was trying adding moving platforms from your previous game, everything works, but my player walk through them, no collision, what I do wrong?

Edit: I got collision with platforms, but when the player collides with the platform, he stands on it for a second and then falls through it. Also when he collides with the platform from the side he gets stuck in it. I still don't know what the problem is

elderevil
Автор

Tell me what the expression dy = tile[1].bottom - self.rect.top is for here if it always gives the value 0 . Why does it give such a value? And then why is it necessary? 7:15
Thank You!

MrZAHAR
Автор

i have set up the collision and that all seems to be working ok for about 1 second then my players and enemies fall through the tiles and off the screen, i have searched for ant typos but im stuck... any ideas?

jamowba
Автор

Coming along nicely. But my collisions seem to effect ALL tiles not just number [1] if I change to [2] etc it says out of range?

philluvschips
Автор

Unless pycharm is causing this issue which is highly unlikely. It seems like a new version of pyton or pycharm broke the code. Even when directly copy pasted you can't jump up to the first platform like if there's an invisible wall in the way. It is also laggy and very slow

Stygymolic