[casual_games] Text Twist type game

Joe Pantuso jpantuso at traygames.com
Thu Nov 16 21:18:09 EST 2006


You can be elegant and generate the word lists ahead of time, and store them
in a binary tree. Every word that can be made up of a particular group of
letters is in each node etc. etc. However it's not worth the bother.

Even a Pentium III 400Mhz is fast enough to brute force all possible results
for 3-7 letters in length from a 7 letter word out of a dictionary of ~25000
words. Well under a second if your match algorithm is written well.

You need to be careful of a couple things; depending on the type of word
game you are doing you will find that in a generic dictionary there are
words that give you TOO many matches, i.e. when we were building the
dictionary for Spell Combat we didn't want any 7 letter words that could
produce more than 50 different words of 3-7 letters as it wouldn't fit our
screen. A surprisingly large number of 7 letter words had to be thrown
out. So you'll want to pre-process you word list to ensure it conforms to
your basic criteria.

The other thing to be careful of in the matching algorithm is that you
ensure a match word not only has all its letters contained in the original
word, but that the letters appear the correct number of times (i.e. there
must be 2 P's in the original word if APPLE is a valid match). Obvious when
pointed out but maybe not the first time you implement a match algorithm.

-J


On 11/16/06, Rajat Paharia <rpaharia+lists at gmail.com> wrote:

>

> Hi all - a quick question - how do they generate all the 3, 4, 5, etc.

> letter words in a given sequence of letters in a game like Text Twist? I

> assume there's some algorithm that does it? And does it do it on the fly or

> is everything computed in advance and saved?

>

> thanks, - rajat

>

> --

> Rajat Paharia

> rajat at bunchball.com

> http://www.bunchball.com/about/jobs.html

> BUNCHBALL IS HIRING

>

> _______________________________________________

> Casual_Games mailing list

> Casual_Games at igda.org

> http://seven.pairlist.net/mailman/listinfo/casual_games

>

>

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://seven.pairlist.net/pipermail/casual_games/attachments/20061116/04314b32/attachment.htm


More information about the Casual_Games mailing list