# Procedural Generating Text (PGT)

**URL:** <https://forum.makecode.com/t/procedural-generating-text-pgt/21506>\
**Category:** Arcade\
**Tags:** tool\
**Created:** [July 26, 2023, 4:51pm UTC](https://forum.makecode.com/t/procedural-generating-text-pgt/21506 "2023-07-26T16:51:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mariogamer191](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mariogamer191/32/6496_2.png) [@mariogamer191](https://forum.makecode.com/u/mariogamer191)\
**Post date:** [July 26, 2023, 4:51pm UTC](https://forum.makecode.com/t/procedural-generating-text-pgt/21506/1 "2023-07-26T16:51:53Z")

</div>

This group of functions could be used to display text in a procedural generating manner. This can be useful in certain dialogues where you don’t want all the text to load simultaneously. You can modify the code to choose where you want the message displayed on the screen. You can also modify the ‘Generation’ function to select what message you want printed. Though every character has to be put in manually with this code, it is still useful. (If anyone can simplify the ‘Generation’ function with a loop, please let me know.) This was a quick project and I didn’t have the time to implement a loop that makes the ‘Generation’ function shorter.

```
      https://arcade.makecode.com/S37127-82810-75269-82229

```

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [August 15, 2023, 8:51pm UTC](https://forum.makecode.com/t/procedural-generating-text-pgt/21506/2 "2023-08-15T20:51:25Z")

</div>

Listen, i’m not the one to usually comment negatively on code, but 😭

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/a3f675aa3163f703e277771331fbe577c311a930.png)

THIS IS A DAMN WARCRIME 😭 😭

---

<div class="post-metadata">

**Author:** ![mariogamer191](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mariogamer191/32/6496_2.png) [@mariogamer191](https://forum.makecode.com/u/mariogamer191)\
**Post date:** [August 16, 2023, 4:28pm UTC](https://forum.makecode.com/t/procedural-generating-text-pgt/21506/3 "2023-08-16T16:28:00Z")

</div>

I agree, it was very rushed.

---

<div class="post-metadata">

**Author:** ![mariogamer191](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mariogamer191/32/6496_2.png) [@mariogamer191](https://forum.makecode.com/u/mariogamer191)\
**Post date:** [March 25, 2025, 8:38pm UTC](https://forum.makecode.com/t/procedural-generating-text-pgt/21506/4 "2025-03-25T20:38:17Z")

</div>

So I decided to finally fix this code. Was scrolling through the forms and saw this again, I know there is already an extension for this by now but I still decided to make a Class for this to make it more integratable into other projects. I cleaned up the code for better use of resources and more readability & maintainability. There is a lot more customability with the classes with lots of abstraction to the user.

> **[PROCEDURAL GENERATING DIALOGUE](https://arcade.makecode.com/S94441-28305-52503-14218)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.
