Sprite Mask Magic! - PyGame Thursdays 31

preview_player
Показать описание
In this video we'll add a Sprite Mask to our Platformer game with PyGame and Python.

Our player doesn't fall off the cliff when they hang over, because the transparent part of the image is still touching.

We can get around that problem by using Sprite Masks to mask just the outline of the player and use that for our collision detection.

#pygame #codemy #JohnElder

Timecodes

0:00​​ - Introduction
1:11 - Problem Explanation
2:00 - Rename Images & Sizes
3:27 - Draw Square Around Player
5:00 - Create A Mask
5:28 - Draw The Mask
6:48 - Mask Collision Update
7:53 - CPU Intensive
8:40 - Create Grass Mask
9:35 - Remove Blue Box
10:02 - Remove Red Lines
10:54 - Conclusion
Рекомендации по теме
Комментарии
Автор

Watch PyGame Playlist Subscribe To My YouTube Channel:
See More At: Join My Facebook Group:
Get The Code

Codemycom
Автор

It will be very cool, Aspen’s additional ability to throw or shoot something.

Alphabet_-_