Outlines in Pygame

preview_player
Показать описание
Outlines are not natively supported in Pygame, but they can be implemented with some tricks using Pygame's mask functionality.

The script that tests different outlining methods:

The second thing shown:

Relevant Pygame Docs:

#pygame

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.
Рекомендации по теме
Комментарии
Автор

That animated magenta/purple background was rendered with Pygame btw.

DaFluffyPotato
Автор

Congratulations for the content, of a thankful brazilian apprentice

joaoantonio
Автор

There is a dedicated method for "enlarging" masks (and not only that), it is pygame.mask.Mask.convolve. You can convolve the image mask with a filled 3x3 mask to get the mask enlarged by one pixel in every direction.

mateusz
Автор

Hallo freund, thank you.
Good work.

bryantgrey
Автор

Did you use a pyhsic library in any of your games like pymunk? Also your videos are very good.

sevcandincel
Автор

increible!!!!, esto es lo que buscaba. estoy creando una app simulador de fisica

isaacpzaiwte
Автор

Hey could you do a video on how to do proper level transition?

dumbbmud