Skip to content

hansilverl/Imgui-Wordle-Clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Imgui-Wordle-Clone

image

This project is a clone of the popular word game Wordle, implemented using ImGui for the user interface and a custom API for game logic.

Features

  • Wordle API: A simple API to host your own Wordle game.
  • Custom Fonts: Special fonts used for backspace and score icons based on FontAwesome.ttf.
  • Leaderboard: Display high scores in a styled window.
  • File Handling: Scores are appended to the file instead of rewriting the entire file.

Wordle API

The Wordle API is hosted at Wordle API. By default, this word list uses combined_wordlist.txt.

Usage

To find out the answer for today's Wordle, you can make a GET request to https://wordle-api-kappa.vercel.app/answer.

To consume the API, send a POST request to https://wordle-api-kappa.vercel.app/{GUESS}, where {GUESS} is the guessed word.

Example:

https://wordle-api-kappa.vercel.app/quote

Response

If the guessed word is correct, the API response will be:

{
  "guess": "QUOTE",
  "is_correct": true,
  "is_word_in_list": true
}

If the word is not in the word list, the API response will be:

{
  "guess": "ABCDE",
  "is_correct": false,
  "is_word_in_list": false
}

If the guessed word is in the list but the guess is incorrect, the API response will be:

{
  "guess": "QUOTE",
  "is_correct": false,
  "is_word_in_list": true,
  "character_info": [
    {
      "char": "Q",
      "scoring": {
        "in_word": false,
        "correct_idx": false
      }
    },
    {
      "char": "U",
      "scoring": {
        "in_word": false,
        "correct_idx": false
      }
    },
    {
      "char": "O",
      "scoring": {
        "in_word": true,
        "correct_idx": true
      }
    },
    {
      "char": "T",
      "scoring": {
        "in_word": false,
        "correct_idx": false
      }
    },
    {
      "char": "E",
      "scoring": {
        "in_word": false,
        "correct_idx": false
      }
    }
  ]
}

Custom Fonts

Important Files

  • Colors.h: Defines the color palette used in the application.
  • CommonObjects.h: Contains common objects and structures used throughout the application.
  • ConnectedApp.cpp: Handles the connection logic for the application.
  • DownloadThread.cpp/h: Manages the downloading of necessary resources.
  • DrawThread.cpp/h: Handles the rendering of the game board and user interface.
  • GameLogic.cpp/h: Contains the game logic and API interaction.
  • imgui.ini: ImGui configuration file.
  • OnScreenKb.cpp/h: Manages the on-screen keyboard rendering and interaction.
  • Scoreboard.cpp/h: Handles the rendering and management of the high scores.

Acknowledgments

This README.md file provides a comprehensive overview of your project, including its features, usage instructions, custom fonts, important files, and acknowledgments. It is formatted with Markdown for better readability and presentation.

About

A clone of the popular word game Wordle, implemented using ImGui

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •