word rng open source.rbxl (1.6 MB)
I’m open sourcing the code as the original point of the game was suppose to be educational, so why not show how it works? May be some bad practices, not sure though, made most of the script logic in a week.
Now, the explanation part. How does the game have over 1 million definitions?
The first item you need is a big list of all the english words.
Oh look! How conveniently someone made a list of most if not all the words in english. GitHub - dwyl/english-words: 📝 A text file containing 479k English words for all your dictionary/word-based projects e.g: auto-completion / autosuggestion
Nice! Secondly, we need a way to find all the definitions of these words. Since there are over 479k words in our word list, we need to automate this, it’s not feasible to do manually. Now there is a TON of FREE dictionary api out there, however most are rate limited to only ~500 per day which is not feasible. Luckily, someone kind enough is hosting a dictionary api that is not only free but is not rate limited, so let’s just spam this one until either it stops working or we get definitions for all of our words.
https://dictionaryapi.dev/
Now we have our words and the definitions of words. The last and important step is to filter all the words and definitions using roblox’s own chat filter to make sure nothing bad is displayed in-game.
What about rarities? How did you assign those? Was it based on google’s ngram viewer based on the frequency on how often the word was used? Well… I can’t reveal all my secrets. I left only the words that start with X in-game. Since I gave you the layout, adding more words shouldn’t be an issue, good luck!