![]() |
VOOZH | about |
Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language. Now, itβs up to the imagination or necessity of the developer, what type of game he/she wants to develop using this toolkit.
.
Command to install pygame on windows based system :
pip install pygame
There are 7-basic steps to displaying Text on the pygame window :
Below is the implementation:
Output :
Now We Will See one of the applications of Displaying the texts but in a different way that is by scrolling the text in 6 different ways on the pygame window.
1. Scrolling the text on top of the Screen.
2. Scrolling the text at the bottom of the screen.
3. Scrolling the text on the left side of the Screen
4. Scrolling the text on the right side of the Screen
5. Scrolling the text in diagonal from left to right side of the Screen
6. Scrolling the text in diagonal from right side to left side of the Screen.
After Seeing the below Code you can implement your own pattern
Below is the Implementation
Output:
1. When text is Scrolling on top of Screen
2. When text is Scrolling on bottom of Screen
3. When text is Scrolling on left side of Screen
4. When text is Scrolling on right side of Screen
5. When text is Scrolling on diagonal from left side of Screen
6. When text is Scrolling on diagonal from right side of Screen