Twitch Chat Word Guessing Game - Twordle

Description

This is a word guessing game for Twitch chat using OBS, similar to the famous Wordle game. Chat has six chances to guess a five-letter word pulled from a list of words supplied by the streamer.

When a word is guessed, the correct and semi-correct letters are show, yellow for correct, but in the wrong place, and green for correct in the right place. A keyboard below the six guesses keeps track of which letters have been used.

This will only work in Streamer.bot 1.0.0 and up.

Requirements

  • Streamer.bot 1.0.0+
  • OBS 31+
    • shaderfilter plugin
    • Source Copy plugin (to import scene)

Files

Other Resources

  • Minecrafter font (this is the font I used in the scene, which can be replaced before importing, but may suffer alignment issues if the various bits aren’t moved/sized for the different font)

Installation

  1. Using the Source Copy plugin, import the Twordle scene to OBS
  2. Add the Twordle scene to any of your scenes you want to be able to play the game on as a source, position and size as you wish. Hide the Twordle source
  3. Note the name of the scenes you are using, and choose whether they are “normal” scenes or “restart” scenes
    1. “Normal” scenes are where the game can be played, and after it has been completed, the interface will disappear. eg your main playing or chatting scenes
    2. “Restart” scenes are where the game will appear when you switch to them, and when a game is completed, it will restart automatically. eg taking a break scene
  4. Drag the Twordle import file into the import window and import
  5. Enable the commands
  6. If needed, add a group to store the usernames of your bots. Twordle is set to use one called “My Bots” for this, so if yours is different, you’ll need to change the name in the “Twordle Message” action
  7. Add another group called “playedTwordle”. This should be left empty, and is used to track who plays a round of Twordle
  8. Add some persistant global variables
    1. twordleWordFile - full path to the list of words to use (you will have to make your own, each five letter word should be on a separate line, and make sure the final line has a return at the end, otherwise when words are added, it will add on a new line). Example “X:\Texts\twordles.txt”
    2. twordleRemoveFile - full path to a file where words you want to remove from the working list (for when you grabbed a big list of words, and decide you don’t want some). File does not need to exist. Example “X:\Texts\tremove.txt”
    3. twordleNormalScenes - the scene or scenes which “normal” operation should occur. For multiple scenes, use commas. Examples “Main,Chatting” or “Main”
    4. twordleRestartScenes - same, but for scenes where the game will keep restarting
    5. twordleSaveLocation - full path to a directory where a screenshot of successful games will be stored. Set to “None” to disable. Do not use a trailing slash on the directory. Example “X:\TwordleGrabs”
  9. If you don’t want to use a channel point redeem, disable the “Twordle Redeemed” action, otherwise name the redeem “Twordle!” or change the places it’s used in the code (actions: Finish Twordle, Reset Twordle, Start Twordle, Twordle Redeemed and Twordle Scene Change)

Commands

  • !addtwordle - adds a word to the list of words, does not take effect until the file is reloaded (Mods)
  • !clearstats - clears a user’s stats (Mods)
  • !mystats - shows a user’s their stats
  • !removetwordle - adds the word to the remove file for later removal
  • !resetwordle - resets the game (Mods)
  • !twordle - starts the game (Mods)
  • !howtoplay - shows brief instructions

How To Play

Once the game is started (by !twordle command, channel point redemption or switch to a “restart” scene) the interface will appear on screen, and an announcement is made in chat.

Any chatter can type a single five letter word to make a guess. Only words that are on the list can be used as guesses.

If a word is accepted, it will be displayed on the interface, with the letters marked in yellow if they are in the word to guess, but are not in the right place, green if they are in the right place or black if they are not in the word.

The keyboard under the potential guesses shows the current state of all letters, as above, but with letters in white not yet used.

If the word is guessed within six guesses, chat wins. If they do not guess within six, they lose.

The time taken for the round is then shown, and the interface stays up for a while before being removed, or restarted.

If screenshots are enabled, one will be saved with the timestanp and the user who made the final correct guess.