GameMaker Studio 2 (2.3)
Icon

GMDictionary

FrostyCat

You must be logged in to obtain assets

Description

This library provides utilities for verifying words and picking words from a list, useful for making word games. It also ships with 2 English language dictionaries to get you started --- "simple" for common words 2-12 letters long, and "full" for more comprehensive needs.

Examples

Checking if the user's input is a valid word

global.dictionary = new CheckWordDictionary(working_directory + "dictionaries/simple/full.txt");
var word = get_string("Enter a word:", "");
if (global.dictionary.check(word)) {
    show_message("\"" + word + "\" is a valid English word.");
} else {
    show_message("\"" + word + "\" is not a valid English word.");
}

Picking random words

global.dictionary = new PickWordDictionary([
    working_directory + "dictionaries/simple_by_length/3.txt",
    working_directory + "dictionaries/simple_by_length/4.txt",
    working_directory + "dictionaries/simple_by_length/5.txt",
]);
var wordOfTheDay = global.dictionary.pick();
show_message("Your word of the day is \"" + wordOfTheDay + "\"");
var words = global.dictionary.pickN(10);
show_message("Your words are: " + string(words));

For more details, please see the official GitHub Wiki for documentation on using this extension.

End User Licence Agreement (EULA).

Age Rating: 4+

Version

GMS2.3 - Version 1.0.1. Published November 18, 2021

Initial release.

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait