Jump to content
  • Advertisement
Sign in to follow this  
Kallin

Implementing a dictionary

This topic is 4009 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings, I'm eagerly working away on a design for my first substantial game. At its core, it's a bit of a scrabble trainer, with vs. play.. I won't go into details right now, but the biggest design challenge I'm facing right now is how to implement a full dictionary. I need a complete (english for now, other languages afterwards) dictionary with details regarding synonyms, definitions, word frequency (how common is it in the language) and any other information about the words that I can garner. I have found a number of different files online, some CSV, some XML, and I'm debating parsing them all into a RDBMS. The size of all this information would be too large to distribute to mobile devices (which is one target platform I'm looking at) so I'm thinking of storing this information in a remote database and offering it as a service to my game (obviously the game then requires an internet connection). Can anyone comment on the appropriateness of this design decision? Also, does anyone know of a good place where I can find this dictionary data that I'm attempting to compile? It would be awesome if this is already offered publicly somehow. Regards, Kallin Nagelberg.

Share this post


Link to post
Share on other sites
Advertisement
In general I'd say that you don't want to be providing any support of the "phone home" variety. Not only does this raise privacy concerns (your server logs would tell you who is playing when); it also means you're on the hook for keeping that database up and running. Do you want to wake up in the middle of the night to bring your database back up when it crashes? Because if you aren't, then your game will have hours-long stretches when it's unplayable, because your database will crash, and at the most inopportune time.

Share this post


Link to post
Share on other sites
What are you going to do with definitions, frequency, synonyms, etc.? It seems like you could probably use Aspell as a good base for a scrabble game. The US English dictionary files are around 650k uncompressed and less than 200k compressed. However, if you need more info about the meaning/usage of words, then that wouldn't be enough. Perhaps it would be a good starting point though.

Edit: Perhaps it would be better not to use the default aspell dictionary since I think it includes illegal words. I did a google search for "machine readable scrabble dictionary" and found this site with a txt file of all the legal scrabble words. You could build a custom Aspell dictionary with that.

Share this post


Link to post
Share on other sites
Derakon,

You raise a good point about up-time concerns with this sort of architecture. It certainly would be better if the game did not depend on a connection for this information. On the other hand, if I wanted to make it commercial it would be a good sort of anti-piracy mechanism... My main concern is the size of the dictionary(s) / the cost of doing lookups. A RDBMS would allow for highly efficient queries regarding which words are synonyms of which, and all that good stuff. This could definitely be implemented manually against a homegrown db that comes with the game, although I'm hesitant to reinvent anything.. Perhaps package the game with an integrated db such as Berkeley?

Mr Grinch,
The type of game I'm aiming towards is something like Dungeon Scroll. That game simply contains a list of valid words that players attempt to build out of randomly assigned tiles. I would like to take that concept a few steps further. One way would be to offer the user clues about what the biggest possible words are that they could make with their tiles (synonyms and definitions would help here). I would also like to reward the use of less frequently utilized words (statistics on word frequency needed). I have a good number of other design ideas that I think would work well given the proper data set.

Thanks for all the feedback so far!
Kal.

Share this post


Link to post
Share on other sites
I don't think that requiring an internet connection just to gain access to a more complete dictionary is going to attract much players. Such a connection is often expensive, and most people would only expect it for a multi-player game.

Mobile phones can be very limiting. On many phones, you're limited to filesizes around 60 - 100 KB. The newer systems are less constrainted of course, but also less common. You'll often have to make trade-offs, especially for the older models.


As for the game design, perhaps you can rapidly prototype it using a high-level scripting language, to see how fun it really is, and what aspects you absolutely need and what aspects can or should be left out or modified. That would give you a much better idea on what trade-offs you can make for the more limited platforms.

Share this post


Link to post
Share on other sites
Do you really need an informative dictionary rather than a word list? Real-life Scrabble doesn't need dictionaries unless there is an argoments about obscure words; in front of a computer, a straightforward web search is going to be much more effective and convenient, and outside your responsibility as Derakon underlined.

If you really want a true dictionary, you might talk a book publisher into bundling your game along with a CD-Rom dictionary as a bonus feature; with a CD-Rom bound server and a freely redistributable client, dictionary owners (most likely students) will be able to host network games of your quasi-Scrabble for friends and strangers, effectively advertising the dictionary and without any server infrastructure on your part.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!