A fullscreen Pygame window with a transparent background, always-on-top behavior, and smooth sprite animation.
- Transparent background (color key:
#FF0080) - Always stays on top
- Fullscreen, borderless window
- Continuous sprite animation
- Press
Escto exit
Install required libraries:
pip install pygame pywin32project/
├── main.py
└── sprites/
├── attack_1.png
├── attack_2.png
├── attack_3.png
├── ...
└── attack_10.png
python main.py-
The background color (255, 0, 128) is treated as transparent. Avoid using it in your sprite images.
-
If you want a different background color for transparency, change both BG_COLOR in code and the SetLayeredWindowAttributes color.
-
You can modify the scale_factor parameter when creating the Player to make the sprite bigger or smaller.