Friday, August 6, 2010

Welcome!

Welcome to the blog of a reclusive, technologically-inclined, and often slightly insane girl from Massachusetts. I'm a computer science major at Mount Holyoke College, and when I'm not going insane trying to juggle schoolwork, my job as a teacher's assistant, a social life, and sleep (read: not often) I like to program small projects to amuse myself. I've started this blog to chronicle and publish my programming projects, in the hopes that someone out there on the Internet will get a few minutes of enjoyment and maybe a chuckle out of what I churn out. Maybe that someone will be you.

Keep in mind that this is a programming blog. Where things may be unclear to the average layperson, I have tried to insert reasonable explanations, but my clarity is not guaranteed. I recommend having at least a basic understand of computer programming before you read this blog.

With no further ado, let me introduce to you Project 1: The Sliding Word Puzzle

It is dark. Before you is a grid of tiles bearing assorted letters. Both the rows and columns of the letter grid slide back and forth easily, almost as if this were a Flash game ignoring the problem of friction completely. The purpose becomes clear: you must slide the rows and columns to form words either vertically or horizontally. And so, your task begins.

The idea for this seemed so simple that I actually spent about an hour Googling to make sure no one else had made this game already. So far it looks like no, but please tell me if this already exists.

Problems I anticipate:
  • Storing the lexicon in a format that a.) is easily readable by Flash and b.) won't take up too much space. XML seems like the easiest format since Actionscript already has classes and methods for processing that.
  • The whole sliding thing. You can click and drag a mouse in any direction, but the tiles can only move up and down or left and right. How do I program this so that the tiles know which way they're going and don't move all weird?
  • Checking whether a word is valid without putting undue strain on the processor. Checking a lexicon of several thousand words one by one is going to take a lot of time and effort. Perhaps I could devise a way to check only words that start with the appropriate letter? Or... wait... perhaps I could form a trie of letters that when read from root to end spell out all the words in the lexicon! Yes, I think I will go with the trie option. Mostly because I've already written Java code for doing that that I can convert to Actionscript relatively easily.
So that's this month's flavor. In the meantime look for some older stuff of mine that I'll put up. In the words of the immortal Heidi Klum, auf wiedersehen!

No comments:

Post a Comment