Level Up Your Wordle Game With Deepgram AI.

Well, Hello there. This is my first blog post and hackathon here. The following sections will give you an overview of a project I have been working on recently to participate in this event.

👉 Table Of Content (TOC).

Overview

What is Wo…


This content originally appeared on DEV Community and was authored by Mahmoud

Well, Hello there. This is my first blog post and hackathon here. The following sections will give you an overview of a project I have been working on recently to participate in this event.

👉 Table Of Content (TOC).

  • Overview
    • What is Wordle?
    • Wordle Rules
    • Why Wordle?
  • Submission Category
  • Link to Code on GitHub
  • Additional Resources/Info

Overview

In the past couple of weeks, I have been developing a TUI-based clone of the world-famous word game: wordle.

What is Wordle?

What is Wordle

If you haven't heard of Wordle, either you live under a rock or don't care about the news. Either way, I'll get you covered. So, Wordle is a web-based word game that has exploded in popularity since the first quarter of 2022. It has millions of active and growing users and was recently acquired by the New York Times for a seven-figure sum. What's impressive about this game is that it was developed by only one person, the same guy who created r/place, which would make it a great candidate for a hands-on Python project.

Wordle Rules

🔝 Go To TOC.

The rules of the game are pretty straightforward:

  • There is a secret five-letter word that you need to guess.
  • You have only six attempts to guess the word.
  • The word must be a valid English word.
  • If you guess the correct word, you win the game;
  • As you submit your guess, letters will be highlighted:
    • Yellow if they exist in the secret word but the wrong position.
    • Green if they're in the correct position.
    • Black/Grey if the word doesn't contain any of the submitted letters.

guesses

The game's simplicity is one of the key factors that made it so popular among us because it is effortless for an average human being to get their head around it. If you're a teacher, it can lead students into reading and spelling. It's easy to use, and it has the potential to make word games more fun for users. The concept of wordle is to make word games more interactive, which can lead to higher engagement rates among users and increased learning.

You may be wondering, Should I recreate such a game for this hackathon? And this is what we are going to find out in the next section.

Why wordle?

🔝 Go To TOC.

searching

At first, I spent a couple of days looking for a game idea for this hackathon. I was casually surfing the internet looking for ideas here and there, and I came across the popular wordle game. Then I decided to create a wordle clone because of its core features: simplicity, popularity, and engagement.

Then I thought: "well! How about playing wordle with spelling the word instead of typing it!
Well, maybe we can also add the ability to share the result of each game played on Twitter, like most people are currently doing, from your terminal with a press of a button. How cool is that!"

aha moment

Then I had that moment: "This is it. This is my purpose. This is why I need to participate in this event."
And deepwordle was born: A TUI based wordle clone powered by Python, Deepgram, Textual, Tweepy, and friends :-).

Submission Category

Gram Gamers.

Link to Code on GitHub

🔝 Go To TOC.

At any time, feel free to check out my project on Github. Contributions are welcome.

GitHub logo Harmouch101 / deepwordle

deepwordle is a wordle clone game powered by deepgram, textual, tweepy, and friends.

deepwordle

pre-commit.ci status circleci status Deepwordle Console

deepwordle is a TUI clone of the famous wordle game powered by Python, Deepgram, Textual, Tweepy, and friends.

1. Configurations

1.1. Tweepy:

1.1.1. Twitter Developer Account:

Developer Account SignUp
  • Fill out the required information and submit your request.
Developer Portal
  • Once approved, you can continue with the app setup.
Verify Email

Note that you need to provide detailed information about your use case for the API in order to speed up the process of reviewing your request.

1.1.2. Create an App:

Once your request gets approved, you will be prompted to create an app as shown in the image below:

Create App

Alternatively, you can go to: https://developer.twitter.com/en

  • click on the developer portal panel. By doing so, you will be redirected to your dashboard.
  • Navigate to the Projects & Apps --> Overview, Scroll to the bottom of the page and click on Create App.
Apps Overview
  • Choose…

Additional Resources / Info

exciting times

Working on this project was exciting because it is based on a relatively new TUI framework: Textual. That on its own would make the coding part more fun and challenging at the same time because I need to learn something new instead of utilizing my skills in other frameworks such as pygame and Tkinter.

Personally, I don't have a so-called 'favourite' framework/language, probably because of my 'result-driven' attitude, which allows me to always focus on achieving the end result regardless of the tools that have been used to achieve that end goal.

python

On the other hand, I used Python because it has been my go-to language ever since I graduated from college, as you may know if you have been following along the way. Moreover, I don't bother myself spending a lot of time trying to memorize the language syntax and such.

Aside from that, another question would come to the mindset of experts "why in the world would you recreate an already existing tool/game?" It is just a programming practice; I just wanted to see what Python is capable of. I'd also encourage all of you to take a bit more charitable mindset by sharing the information among us regardless of its motivation.

Anywho, back to our project, the following image illustrates the major components of our game.

deepwordle

On the left side, a panel is supposed to display statistics about your guesses(e.g. guess distribution, current streak, etc.). However, since I recently discovered this hackathon, I haven't implemented it yet, but it is being tracked in this issue; for future work!

In the centre of the screen, the grid displays the letters of the word being submitted. Each letter is basically a Textual Button that has the following properties:

  • character: the text is rendered on the button.
  • state: the state of the letter(e.g. in word, in position, etc.).
  • color: character's style, defined using the 'foreground on background' notation. for example: color = "white on dark_blue"
  • font_name: a string that can be set to "mini", or "small", or "standard", or "big".

rich_text

There is the message panel on the right-hand side, which helps you follow along with the game.

For more information about this game and how to install it, please refer to the README file.

Subsequent articles are going to be published to explain every step taken towards building this project from the bottom up.

That's pretty much it for today's blog. Happy Coding!

coding


This content originally appeared on DEV Community and was authored by Mahmoud


Print Share Comment Cite Upload Translate Updates
APA

Mahmoud | Sciencx (2022-04-10T17:40:17+00:00) Level Up Your Wordle Game With Deepgram AI.. Retrieved from https://www.scien.cx/2022/04/10/level-up-your-wordle-game-with-deepgram-ai/

MLA
" » Level Up Your Wordle Game With Deepgram AI.." Mahmoud | Sciencx - Sunday April 10, 2022, https://www.scien.cx/2022/04/10/level-up-your-wordle-game-with-deepgram-ai/
HARVARD
Mahmoud | Sciencx Sunday April 10, 2022 » Level Up Your Wordle Game With Deepgram AI.., viewed ,<https://www.scien.cx/2022/04/10/level-up-your-wordle-game-with-deepgram-ai/>
VANCOUVER
Mahmoud | Sciencx - » Level Up Your Wordle Game With Deepgram AI.. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/04/10/level-up-your-wordle-game-with-deepgram-ai/
CHICAGO
" » Level Up Your Wordle Game With Deepgram AI.." Mahmoud | Sciencx - Accessed . https://www.scien.cx/2022/04/10/level-up-your-wordle-game-with-deepgram-ai/
IEEE
" » Level Up Your Wordle Game With Deepgram AI.." Mahmoud | Sciencx [Online]. Available: https://www.scien.cx/2022/04/10/level-up-your-wordle-game-with-deepgram-ai/. [Accessed: ]
rf:citation
» Level Up Your Wordle Game With Deepgram AI. | Mahmoud | Sciencx | https://www.scien.cx/2022/04/10/level-up-your-wordle-game-with-deepgram-ai/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.