Perfect Word Wrap | Epic Scratch Text Engine
Coding a custom text engine in Scratch, a Griffpatch tutorial - and now we add perfect word wrapping. We don't skip any corners, and we do this the right way resulting is super fast, word wrap with line breaks and the ability to break long words if necessary. Word wrap and text alignment is upgraded to work within a specified page bounds and can be coded to work like a text console. Works with clones or switch to stamping to easily handle a whole page of text at 30fps. Scratch On Guys!
â Support this channel (Join for perks like Early Access):
https://www.youtube.com/channel/UCawsI_mlmPA7Cfld-qZhBQA/join
đ Episode 1 - https://youtu.be/BAy0SUnB1J0
đ Episode 2 - https://youtu.be/lhHLAQSzQvo
đą Scratch Links
Scratch Font Studio - https://scratch.mit.edu/studios/31947389
đž Font Resource Websites
Cava's Pixel Resource - https://caveras.net/
Google Fonts - https://fonts.google.com/
âī¸ Image / Sprite sheet Splitter
EZGif - https://ezgif.com/sprite-cutter
Google Font to SVG Path - https://danmarshall.github.io/google-font-to-svg-path/
--------------Video Chapters--------------
0:00 Intro
0:45 Defining The Page Bounds
4:01 Positioning the text within the Page bounds
6:18 New Line, and Line Height
8:03 Page Width Overflow
9:29 Word Wrap â But where?
11:15 Quick Tidy up before we add more scripts
12:22 Lots of new variables, and a change of loop
14:36 Find txt wrap index
17:05 Modify the Alignment Script
17:31 Splitting our text at a space character / gap
18:19 Splitting the text at the last space before overflow
19:53 Wrapping the remaining text onto the next line
21:23 Testing Time
22:08 Breaking up very long words
24:30 Outro
Other Videos By griffpatch
Other Statistics
Scratches Statistics For griffpatch
griffpatch currently has 24,500,415 views spread across 87 videos for Scratches. There's over 1 day worth of watchable video for Scratches published on his channel, roughly 49.28% of the content that griffpatch has uploaded to YouTube.