💾 Archived View for stack.tilde.cafe › gemlog › 2021-11-23.game.gmi captured on 2024-07-08 at 23:52:16. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-09-08)
-=-=-=-=-=-=-
I am happy to introduce a new game for the Gemini network. SpellBinding is a word puzzle game (much like the New York Times Spelling Bee), in which you are given 7 letters, and asked to construct as many words as possible.
The game uses client certificates to keep track of the game progress (the layout of the letter hexagon, previously-guessed words, score, etc). Not all Gemini browsers support client certificates; the game has been tested with LaGrange.
It took exactly one y ear for me to write this. Last November I was called away to help my partner take care of her parents, and to fill the time away from my lab, I decided to reimplement the game I enjoy so much. I remember being frustrated that the word 'gnomon' was not included...
I quickly implemented the puzzle construction program in Lisp, but the sticking point was the dictionary. NYT does not reveal the source of its game's dictionary, so I had to look elsewhere.
The dictionary is crucial to the gameplay. Too many obscure words frustrate the player, but missing common words is truly annoying. Most common dictionaries suffer from one of the above. In addition, many are hopelessly outdated being more than a century-old, while newer ones contain tons of garbage words like 'aaa'. Many are scrubbed from the internet and contain things that are like words, but are not words at all, such as words that should be hyphenated...
This became a big conundrum. I started with some reasonable dictionary of around 50K words and started systematically cleaning it by eliminating places, nationalities and names, as well as complete garbage. I found that I had to add a lot of common words that were omitted.
This is an ongoing process still - I paginate through words editing them almost every day. I learned many interesting words in the process - as I encounter words I am not familiar with I look them up on Merriam Webster dictionary.
As the dictionary was almost ready and the puzzle construction kit was able to identify close to 6000 possible puzzles, I started prototyping an HTML5 UI and contemplating the design of the server. But life had a different plan for me, and in February I contracted a bad strain of Covid.
After a month of being violently ill, I more or less recovered physically, but my brain was wrecked. I became very dumb, unable to logically follow sequential steps to their conclusion and evaluate consequences of various actions reliably. Heck, I was unable to go to the kitchen to get a cup of tea without forgetting what I was there for. Needless to say it made me a bad coder.
The loss of my abilities was devastating, as writing code and exploring complex algorithms and datastructures is essential to my well-being. I draw deep joy from coding - it is an almost religious experience for me.
Partly from depression, during the next few months I was so tired that I spent a lot of my time sleeping or vegging. Slowly I was able to think more clearly again, and became capable of coding and diddling with hardware. I managed to wire-wrap a 6502 computer and catch up on a couple of other research project by the end of the summer. The word game was all but forgotten.
In the fall my partner was again needed by her parents, and there I was with the unfinished code almost a year later. Was my brain capable of picking up the project and carrying it to the end? I was determined to find out.
It was slow going in October. I had a hard time focusing in a pretty uncomfortable environment with only a laptop to work with. But this time around I was really excited about Gemini and minimal computing. I decided to create a Gemini front-end and run it on a tilde server.
The client would run as a cgi script, using client-side sertificates to identify users in order to persist sessions. It seemed that Gemini was made for this; it almost made up for the clumsy data entry capabilities and lack of expressive rendering features. But minimal is good, and I pushed on.
I decided to code the front-end in C. I don't want to use up tilde resources to spin up a 100MB Lisp engine, or any big interpreter, every time a word is entered. There is not much going on - I just get the input, check if the word is in the solution set, score, and draw the board. C is perfectly adequate for that, and it is minimal - the executable is around 30Kb of code.
And so here it is, the product of an entire year of my life. I am proud to host it on a tilde server and hope it will become an enjoyable part of the Gemini ecosphere.
Feel free to contact me, stack, at ctrl-c.club via email.