PDA

View Full Version : GM Library: Dictionary



cairnswm
06-09-2007, 12:00 PM
Hi All

As a bit of a stress reliever I decided to create a Game Maker Dictionary, especially for all those people wanting to make a text game for Compo 16. I have used the base class from my Compo 15 Party Type game, included all the words inside the DLL and made it into a Library.

Version 1.01 can be downloaded here: http://gamedev.openhazel.co.za/filecloset/data/files/183/GMDictLib.zip
This download includes the Library, a Readme and a GM6 example project.

Here is the read me.
----------------
GMDictLib

Simple Dictionary of Words for Game Maker.

This word list is based on the 5000 most common words of the english language minus
those that contain an apostrophe (') - leaving a total of 4932 words.

The following method calls are exposed

GetWord - returns a random word from the list

GetCount - Returns the number of words in the dictionary.

Get/Set Min/Max Length - Gets or Sets the Min or Max length of the word to be returned. (If a word of the required length restrictions cannot be found, any random word will be returned)

Example


{
// Create the Links to the External Library
global.GetWord =external_define('GMDictLib.dll','GetWord',dll_cde cl,ty_string,0);
global.SetMinLength =external_define('GMDictLib.dll','SetMinLength',dl l_cdecl,ty_real,1,ty_real);
global.GetMinLength =external_define('GMDictLib.dll','GetMinLength',dl l_cdecl,ty_real,0);
global.SetMaxLength =external_define('GMDictLib.dll','SetMaxLength',dl l_cdecl,ty_real,1,ty_real);
global.GetMaxLength =external_define('GMDictLib.dll','GetMaxLength',dl l_cdecl,ty_real,0);
global.GetCount =external_define('GMDictLib.dll','GetCount',dll_cd ecl,ty_real,0);
// Get a word from the Dictionary
MyWord = external_call(global.GetWord);
}
----------------

Please note this is released as Free for any use. (With no threads attached - but if you do manage to see a copy let me know for interests sake :) )

FuzzYspo0N
06-09-2007, 12:09 PM
no threads attached???!

im posting on thar thread attached!

:) thats awesome contribution thanks cairnswm

Gldm
06-09-2007, 12:25 PM
Neat! About all I could ask for beyond that is some kind of search function that checks to see if a string matches a word in the dictionary. :P

cairnswm
06-09-2007, 01:08 PM
Version 1.01

Adds

Version - Returns the current version of the Library
MatchWord - returns 1 if word in Dictionary, 0 if not.

http://gamedev.openhazel.co.za/filecloset/data/files/183/GMDictLib.zip

FuzzYspo0N
06-09-2007, 01:40 PM
lol awesome. im also gonna look at makng gm libraries, i might be able to make something useful

dislekcia
06-09-2007, 02:23 PM
SWEET!

Awesome stuff there cairnswm, have you posted it to the GMC? I'm sure they'd go ape about it too :)

-D

Gldm
06-09-2007, 02:24 PM
Yay! Thanks! This makes my life a lot simpler. :)

cairnswm
07-09-2007, 07:51 AM
Awesome stuff there cairnswm, have you posted it to the GMC?

No I havn't - Dont have access from work :( Anyone that wants to post it there is welcome to :)

Nandrew
07-09-2007, 09:46 PM
cairnswm, you are legend. ^^

My current game is prolly not going to make use of this (well, heck, gonna *try* enter this compo), butcha never know when a dictionary is gonna come in handy ...

*downloads*

cairnswm
08-09-2007, 05:43 PM
http://gmc.yoyogames.com/index.php?showtopic=326616

Thaumaturge
09-09-2007, 04:10 AM
I doubt that I'll be using GameMaker for this project, but nevertheless I commend you for this work, Cairnswm. It sounds very useful indeed. ^_^

UntouchableOne
09-09-2007, 07:03 PM
Sounds like this is really usefull. I downloaded it for when/if I start using GM in the future. Thanks.