SCRAM -- for beta users

Incidentally, from the aspell dictionary files I got 77,008 words that consist of ordinary letters (a-z) and don’t begin with a capital letter. What would be a reasonable file size, do you think? My longest current file is the utf8 upper/lower case information file at just over 2000 lines. My old font files were of the order of 5000 lines. Before we could import our own images I had an image file at 40000 lines.

Probably one could trim the file a bit. I get 48,000 words that are 8 letters or more. Admittedly, one can combine words in Scrabble but even so it’s unlikely someone would be able to put down a really long word.

Actually, the tokens that can still be moved should already be different then those that are locked down. Active tokens have gold text and slightly brighter colors while the locked tokens have off white text and dark colors. If its not obvious (and clearly it isn’t) then its too subtle. I’ll add some other distinguishing factor.

Here’s a question: how did you get the words div’d up for a table? I suppose with a little code I could write them to data, then reimport them, but I’m guessing I missed something obvious.

I like the idea of different modes. I think I’ll implement time bonuses for letters, but limited tile sets as one mode, and unlimited sets and no time bonus as another.

When I get beyond 1000 lines or so, the performance degrades enough that I find maintaining the files something of a pain though, like you, I have image data crammed into a file that’s 30k+ lines and it still works.

Hmm, how about a compromise? I put the words in as strings, but have a routine that optionally parses them to a dictionary?

And OK, so it looks like I won’t be doing that. It seems to take a small slice of infinity to parse the list.

Modulo a small amount of preparation:

cat Alist.lua | perl -lne '@words = split(",", $_); $words = @words; for ($i = 0; $i < $words; $i++) {print "words[\"$words[$i]\"] = true";};' > AlistTable.lua

Or maybe I’m misunderstanding the question.

Incidentally, I’ve been playing a bit with word lists with the intention of extending the anagram game and I have a half-written hangman game, so I’m quite keen to get some sort of generic word-list capabilities.

Actually, the tokens that can still be moved should already be different then those that are locked down.

Now that I’ve had another go, the distiction is enough. I just didn’t notice it before.

Been thinking some more about this. Here’s some more thoughts.

  1. Be more adventurous with the board layouts. Have some with missing places. Some also could have pre-set letters.
  2. You could have a fixed bag of letters (per level) and draw them out of that. Then getting new letters means throwing away the old ones so puts a limitation on how often one would do that.
  3. When a word doesn’t match, do something. At the moment, there’s no reaction at all and it takes me a second to realise that I did press the check button.

http://devilstower.posterous.com/scram-beta-3

Beta three has a much bolder color palette, that I hope makes it easier to read and tell what’s going on. It also features some new levels – including some with missing places. There are some changes to sound and graphics to hopefully make the buttons more obvious (instruction page still coming). The board transition is cleaned up.

But I haven’t done anything yet to address the “word not found” response (or lack there of).

Thanks very much for all the feedback.

Looking at the (old) code, I see that it does give feedback when a word doesn’t match but it does so audibly. I often have the sound off on my iPad so I didn’t notice that.

I’d also like to be able to reorder the letters on the tray.

I added a “red flash” in which the lettering and border of squares used in not-found words turn red for a second then fade to normal.

Tray re-order coming up.

Thanks.

I’ve loaded the word list that comes with aspell into a “Dictionary” project and adapted Scram to use that (unfortunately, the “Dictionary” project is effectively unusable from the editor due to its size!). It takes a moment to load the dictionary, but does mean that you have a full word list (almost, it includes abbreviations such as km which you might not want, and it doesn’t have “aardwolf” which I find very disappointing).

Your dictionary is bound to be less disappointing than the existing one, which has failed me on several Scrabble standards.

Exchanging big files is problematic. I’d have put my little spell check files up, but both this board and gist have character limits that mean chopping each string into bits.

Working on a title screen and two game modes. ‘Standard Set’ limits the tiles to a fixed set per board, provides a penalty for tray swaps, and gives a time bonus for words. ‘Endless’ is essentially the as-is game: unlimited tiles, no penalty, no bonus.

Exchanging big files is problematic. I’d have put my little spell check files up, but both this board and gist have character limits that mean chopping each string into bits.

One of the advantages of University-based hosting. I’ll put my dictionary up soon.

Working on a title screen and two game modes. ‘Standard Set’ limits the tiles to a fixed set per board, provides a penalty for tray swaps, and gives a time bonus for words. ‘Endless’ is essentially the as-is game: unlimited tiles, no penalty, no bonus.

Nice. I’ve had a go at a “Bag”.

The Norwegian Scrabble Society publishes its word list under the GPL! So I’ve made a Norwegian version of your game - incidentally making it easy to swap languages. Unfortunately, the word list is so big (600,000 words) that it is crashing Codea even with loading it via project import.

Shame. I was hoping this would be a big help with improving my Norwegian!

A-ha. Turns out that if I restrict down to words of 10 letters or fewer then I can load the Norwegian dictionary. Fantastic.

You know, if there’s a way to work them in without breaking the editor, a dictionary would be an excellent pack in library for the next release.

Beta 4.

http://devilstower.posterous.com/scram-beta-4

Reworked the random letter to support both the limited and unlimited stacks (and made it a lot shorter through the joys of string handling).

Title screen with standard and endless modes.

General clean up, refactoring, all that jazz.