posted by
lauraredcloud at 01:22pm on 29/10/2009 under coding
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Do you enjoy Boggle? Of course, we all do. Do you wish you had the opportunity to play Boggle alone, perhaps occasionally bragging about your score to a friend, but they've disabled Flash at work so the Facebook Scramble application won't work and you suspect it might be too conspicuous to shake the board violently in the middle of your cube farm? Well, have I got news for you. The time has come to playtest "Word Find," my PHP-based Boggle-like game.
http://duneguy.com/laura/wordfind/
Features:
* Speedy and minimalist: No special plug-ins, animations, sound, or even images required. Most games scored within 1/20th of a second. Optional even more minimalist "worksafe" mode allows you to get the letter table and everything totally unformatted so it looks, if not like actual work, at least not obviously like slacking.
* Choose between three tilesets (did you know the Boggle makers revised their tiles in the 1990s? So you can pick the old one, the new one, or the 5x5.). Also choose between several timing and minimum letter options.
* Score calculation: Your score is calculated and evaluated based on the standard Fibonnacci-like Boggle score rules, with acceptable words determined based on presence of the word on the board and in the TWL dictionary. Acceptable words produce a cute little mini-board showing where the computer found it.
* Timed play: Javascript live countdown automatically submits your wordlist when it hits "0:00". (No demerits for incomplete words, you just don't get the points.)
* Pseudo-competitive play: Send a friend to play the same board. Your friend will have access to the exact board you played, with all your preferences (she makes her own work-safe choice, since it doesn't affect scoring, but the rest stay the same), and she will know what score you got. (There is no high-score list, nor are your words saved anywhere. There's no database backend for this. Which makes this feature all the more impressive, no? Thanks to Paul for the idea.)
(Actually, thanks for Paul for a lot of ideas, as well as beta, troubleshooting, PHP lessons, and hosting. Although I stole the formatting from laurahughes.com, I can't host the game there because two of the key functions I use, the seeded randomizer and one of the file-reading functions, are disabled on that server. Darn hardened PHP.)
* Cheating: There are at least two known ways to cheat. See if you can find them!
I've been working on this for the past month or so, although most of the actual work was done in the last week. It's been big programming challenge for me, a feckless n00b. Making the random board turned out to be surprisingly easy, and not, actually, because I had done it before in Perl. Largely, actually, because PHP provides two functions--array_rand and shuffle--which basically do all the work for you!
Adjacency checking was the biggest problem. This game doesn't do what Scramble does--it doesn't play the whole game and produce all the possible words--it just checks users' words, but there were still a lot of things to take into account, including, but not limited to, the important distinction between a letter and the PARTICULAR INSTANCE (ie location) of that letter on the board, and the possibility that, even if a particular path doesn't work out, another path might still exist on the board.
Anyway, I look nervously forward to fixing the problems you run into! To report a problem with the scoring (ie. the game failed to give you credit for a word on the board, or gave you credit for a word not on the board - this should NOT be one of the ways you can cheat), send me the complete URL of the game plus the word that gave you the incorrect result.
http://duneguy.com/laura/wordfind/
Features:
* Speedy and minimalist: No special plug-ins, animations, sound, or even images required. Most games scored within 1/20th of a second. Optional even more minimalist "worksafe" mode allows you to get the letter table and everything totally unformatted so it looks, if not like actual work, at least not obviously like slacking.
* Choose between three tilesets (did you know the Boggle makers revised their tiles in the 1990s? So you can pick the old one, the new one, or the 5x5.). Also choose between several timing and minimum letter options.
* Score calculation: Your score is calculated and evaluated based on the standard Fibonnacci-like Boggle score rules, with acceptable words determined based on presence of the word on the board and in the TWL dictionary. Acceptable words produce a cute little mini-board showing where the computer found it.
* Timed play: Javascript live countdown automatically submits your wordlist when it hits "0:00". (No demerits for incomplete words, you just don't get the points.)
* Pseudo-competitive play: Send a friend to play the same board. Your friend will have access to the exact board you played, with all your preferences (she makes her own work-safe choice, since it doesn't affect scoring, but the rest stay the same), and she will know what score you got. (There is no high-score list, nor are your words saved anywhere. There's no database backend for this. Which makes this feature all the more impressive, no? Thanks to Paul for the idea.)
(Actually, thanks for Paul for a lot of ideas, as well as beta, troubleshooting, PHP lessons, and hosting. Although I stole the formatting from laurahughes.com, I can't host the game there because two of the key functions I use, the seeded randomizer and one of the file-reading functions, are disabled on that server. Darn hardened PHP.)
* Cheating: There are at least two known ways to cheat. See if you can find them!
I've been working on this for the past month or so, although most of the actual work was done in the last week. It's been big programming challenge for me, a feckless n00b. Making the random board turned out to be surprisingly easy, and not, actually, because I had done it before in Perl. Largely, actually, because PHP provides two functions--array_rand and shuffle--which basically do all the work for you!
Adjacency checking was the biggest problem. This game doesn't do what Scramble does--it doesn't play the whole game and produce all the possible words--it just checks users' words, but there were still a lot of things to take into account, including, but not limited to, the important distinction between a letter and the PARTICULAR INSTANCE (ie location) of that letter on the board, and the possibility that, even if a particular path doesn't work out, another path might still exist on the board.
Anyway, I look nervously forward to fixing the problems you run into! To report a problem with the scoring (ie. the game failed to give you credit for a word on the board, or gave you credit for a word not on the board - this should NOT be one of the ways you can cheat), send me the complete URL of the game plus the word that gave you the incorrect result.
from Caolan
(no subject)