# Introducing - Wordle in MakeCode! 📚

**URL:** https://forum.makecode.com/t/introducing-wordle-in-makecode/19780
**Category:** Show & Tell
**Tags:** game
**Created:** [May 8, 2023, 4:48pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780 "2023-05-08T16:48:13Z")
**Posts on this page:** 20
**Page:** 1

<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: [May 8, 2023, 4:48pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/1 "2023-05-08T16:48:13Z")

</div>

This game adheres to the [age rating games project](https://forum.makecode.com/t/age-rating-games-on-the-forums/19119) (ARGP) standards.  
🟢 - this game is suitable for all ages  
🤬 - This game might contain profanity - unfiltered words)

So, I’ve been busy with school and some other stuff recently, but I should be more active now, especially with @Unique’s [UAT 2](https://forum.makecode.com/t/unique-a-thon-2-non-official-game-jam/19695) approaching on 2023-05-11T04:00:00Z.

* * *

Sooo… it looks like @AlexK [made the game](https://forum.makecode.com/t/introducing-whats-my-word/11998) way back in 2022, and I just didn’t know 😅. I found this out while writing this post

But anyway, I’m sure almost everyone is famliar with the hit game [Wordle](https://www.nytimes.com/games/wordle/index.html). If you’re not, allow me to cover the basic rules and the gist of the game.

# Rules of the game

Wordle is a game about guessing words. Each day, a new **5** letter word is generated. You are given 6 attempts to guess the word using real English words. After entering each word, the letters will be marked **yellow** if they appear in the word _somewhere_, and **green** if they are in the correct spot.

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

* * *

Now, for my implementation of the game. The dictionary I used is a direct port of the one found in the original game, which is something Alex’s game didn’t accomplish. 12,000+ words are available as legal words, and about 600 or more are available as picks for the “target word”.

All of the words are stored in `words.ts`, within the variables `legalWords` (all legal words to enter) and `gameWords` (which get selected as the word you’re guessing). The lists i downloaded contained some vulgar words too, and while I did my best to scrub them, I might have missed some. If you find any, please report their line number so I can remove them ASAP!

# How does the game work?

The game will generate a random word from it’s dictionary every time you start the game. If you end a game (guess the word or run out of guesses), the word you played will be removed from the list of target words. If you use them all up somehow, the game will reset the list.

I also created a custom keyboard for ease of use. Note that the key will also get colored according to the above mentioned standards. You can also erase the last letter using the **Backspace** key (⬅) on the right hand side, or by pressing **B** (ENTER) as a shortcut.

To submit the typed word as a guess, press the **Submit key** (➡) on the left hand side.

> **[Wordle](https://arcade.makecode.com/S87355-07977-97647-97218)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

And of course, enjoy the game! After all, it was made with ❤ in MakeCode.

# Future plans

For now, I’m guessing the game is absolutely unplayable on hardware, and there’s no doubt about it. I don’t want to even try it, because I don’t want my PyGamer to explode.

The huge variables holding the words are definitely hogging the memory, and the game concurrently loads 88 sprites on startup. For hardware, I’m looking to some optimisations on this list, sooner or later in no particular order so I can (hopefully) get this running on hardware.

- Encode words in a static image to save space
- Remove the `usedWords` setting (sacrifice convenience for functionality)
- Render the board, keys and title as a part of the background image

Oh, and I don’t know how stable this actually is… I kind of just mashed it together, so if you find any 🪲s, please report them so I can bang my head against a wall until I obliterate them 🫠

---

<div class="post-metadata">

### Author: ![BoostedGames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/boostedgames/32/29419_2.png) [@BoostedGames](https://forum.makecode.com/u/BoostedGames)
#### Post date: [May 8, 2023, 5:14pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/2 "2023-05-08T17:14:31Z")

</div>

Radical!

---

<div class="post-metadata">

### Author: ![Blobbey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobbey/32/20831_2.png) [@Blobbey](https://forum.makecode.com/u/Blobbey)
#### Post date: [May 8, 2023, 5:14pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/3 "2023-05-08T17:14:58Z")

</div>

**This is AMAZING! I love Wordle, and this an EXTRAORDINARY replica of it! Great job!**  
**🥳 👏**

---

<div class="post-metadata">

### Author: ![Blobbey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobbey/32/20831_2.png) [@Blobbey](https://forum.makecode.com/u/Blobbey)
#### Post date: [May 8, 2023, 5:16pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/4 "2023-05-08T17:16:26Z")

</div>

I may have found a bug:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/d40ca21c6a6fe5ab183594d3181566b395d8a358.png)  
There’s supposed to be another I according to the game, but there’s no where for the I to go. 😕

---

<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: [May 8, 2023, 5:17pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/5 "2023-05-08T17:17:39Z")

</div>

The game considers the “I” as a letter that appears in the word. That means the yellow “I” is just pointing to the one that’s in the middle (the one you found the placement of)

---

<div class="post-metadata">

### Author: ![Blobbey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobbey/32/20831_2.png) [@Blobbey](https://forum.makecode.com/u/Blobbey)
#### Post date: [May 8, 2023, 6:26pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/6 "2023-05-08T18:26:30Z")

</div>

Okay, but wouldn’t that make it a little hard to know if there were two I’s?

---

<div class="post-metadata">

### Author: ![Nerdiest](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/nerdiest/32/10678_2.png) [@Nerdiest](https://forum.makecode.com/u/Nerdiest)
#### Post date: [May 8, 2023, 9:14pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/7 "2023-05-08T21:14:47Z")

</div>

Hey thanks For using the ARGP standars!

---

<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: [May 9, 2023, 4:22pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/8 "2023-05-09T16:22:21Z")

</div>

I might update that soon, I’ll see how the real game handles it.

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [May 9, 2023, 4:24pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/9 "2023-05-09T16:24:53Z")

</div>

I love the effort- I suck at these spelling games but it is so cool to see you manage 12 THOUSAND words in one game!

---

<div class="post-metadata">

### Author: ![personalnote](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/personalnote/32/31359_2.png) [@personalnote](https://forum.makecode.com/u/personalnote)
#### Post date: [May 9, 2023, 4:34pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/10 "2023-05-09T16:34:10Z")

</div>

I thought Wordle in Makecode sounded familiar…

---

<div class="post-metadata">

### Author: ![AbstractDesigner](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/abstractdesigner/32/22531_2.png) [@AbstractDesigner](https://forum.makecode.com/u/AbstractDesigner)
#### Post date: [May 9, 2023, 4:44pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/11 "2023-05-09T16:44:19Z")

</div>

How did I get a curse word on my first try… My luck is just crazy ￣^￣

---

<div class="post-metadata">

### Author: ![BoostedGames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/boostedgames/32/29419_2.png) [@BoostedGames](https://forum.makecode.com/u/BoostedGames)
#### Post date: [May 9, 2023, 6:57pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/12 "2023-05-09T18:57:20Z")

</div>

wild.

---

<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: [May 9, 2023, 6:57pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/13 "2023-05-09T18:57:38Z")

</div>

What? Could you reference the word? You can censor it, but I need to find this word and eliminate it. As I was saying, I’m working on scrubing the dictionary at the moment.

---

<div class="post-metadata">

### Author: ![Nerdiest](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/nerdiest/32/10678_2.png) [@Nerdiest](https://forum.makecode.com/u/Nerdiest)
#### Post date: [May 10, 2023, 5:10pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/14 "2023-05-10T17:10:14Z")

</div>

I got the word Vaped I know its not a bad word necassarily, but its not the best thing to show younger children (played this with my little sibs)

---

<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: [May 10, 2023, 5:15pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/15 "2023-05-10T17:15:12Z")

</div>

Yeahh… I don’t think it’s critical. I understand the concern about topics like that but I don’t find it super vulgar. That’s also why I put the disclaimer at the top. While the game is SFW, it might contain some not-so-great words. I’m mainly worried that a swear or otherwise vulgar word is left in

---

<div class="post-metadata">

### Author: ![AbstractDesigner](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/abstractdesigner/32/22531_2.png) [@AbstractDesigner](https://forum.makecode.com/u/AbstractDesigner)
#### Post date: [May 10, 2023, 5:16pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/16 "2023-05-10T17:16:08Z")

</div>

I took a picture of it, but right before posting the image, I realized the word was a different meaning than what I expected… (I checked the word multiple times in my super thicc dictionary 😅)

Also, you shouldn’t ask people to post curse words, even if they are censored, cause people would know the meaning anyways…

---

<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: [May 10, 2023, 5:33pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/17 "2023-05-10T17:33:44Z")

</div>

Well, how else am I supposed to do anything about it? It’s not mean in an insulting way or anything, we all know it’s being posted in good faith in order to help with removing it. Also, the first two letters would have been enough for me to search for it, but I digress

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [May 10, 2023, 5:33pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/18 "2023-05-10T17:33:51Z")

</div>

(Just mentioning that this is such a complicated topic, perhaps moving to [Age rating games on the forums](https://forum.makecode.com/t/age-rating-games-on-the-forums/19119) would keep this clutter out of the Wordle discussion?)

---

<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: [May 10, 2023, 5:49pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/19 "2023-05-10T17:49:44Z")

</div>

I have a feeling it’s still relevant here as a part of my game

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [May 11, 2023, 8:48pm UTC](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780/20 "2023-05-11T20:48:30Z")

</div>

Sure!

[Next page](https://forum.makecode.com/t/introducing-wordle-in-makecode/19780.md?page=2)
