PyGame: Scroll Text - Technique and Code Walk Through @gjenkinsedu
PyGame: Scroll Text - Technique and Code Walk Through  @gjenkinsedu
Uploaded May 2022 | Updated September 2026, 3 weeks ago
I show you the technique to scroll text on a surface in PyGame and then walk though how the code works. This uses the Surface blit method to move the code up to make room for the new line. But it is all in the details.

Code is located at : github.com/gerryjenkinslb/pygame_text_scroll

0:00 Demo
0:05 Technique used
1:25 When and how to scroll
2:14 Actual Code
2:44 main method
4:14 TextScroll constructor
6:05 TextScroll _update_line method
7:17 TextScroll update method
8:19 TextScroll draw method
8:19 run Example1 again
8:56: run Example2 and remove debug rectangle
PyGame: Scroll Text - Technique and Code Walk ThroughPyGame draw cycle, flip, sprites, and dirty sprites for speedSearch:Sort 2 | Sequential and binary Search 2Introduction 6 | List methods, add method, & rangePyCharm python code profiling demo (2min)Introduction 7 | StringsIntroduction 10 | input, more about print functionLinear Data Structures 7 | queues1Introduction 11 | FormatingRecursion 9  | Min Coins - Dynamic Programming 1Introduction 16 | Fraction 2Analysis 3 | Anagrams Example 1
Professor Gerry Jenkins |

PyGame: Scroll Text - Technique and Code Walk Through

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER