https://github.com/cdent/twords
word finding game for tsapp
https://github.com/cdent/twords
Last synced: 24 days ago
JSON representation
word finding game for tsapp
- Host: GitHub
- URL: https://github.com/cdent/twords
- Owner: cdent
- Created: 2013-04-02T17:36:41.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-04-03T12:52:39.000Z (about 13 years ago)
- Last Synced: 2025-02-01T03:28:49.838Z (over 1 year ago)
- Language: JavaScript
- Size: 10.7 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What
Messing around with [tsapp](http://tsapp.tiddlyspace.com) to create
a word finding game. See it in action at
[twords](http://twords.tiddlyspace.com/twords).
The code is mostly a straight port (with added UI) of an earlier
[gist in Python](https://gist.github.com/cdent/268079) to experiment
with a trie-like (but not actually a trie) data structure. That
structure worked very well for Python idioms but makes less sense in
a JavaScript context because it makes itself very large to support
easy queries. This is great when local, but less great when wanting
that data structure available in a browser. `words.js` is a 37M
file... With a `_cache-max-age` it's better but still needs to be
interpreted.
**Update**: Switching to a more formal trie gets the size down to
just under 7M. Still large but much better.
# Why
Cuz, why not?
To learn stuff.
# How
If you add a `#` arg to the
[URI](http://twords.tiddlyspace.com/twords#6) that number controls
the size of the square that makes up the game.
# Wrong
* Letter frequencies are not aligned with Boggle norms.
* The letter `Q` is not used at all, to make life easier.
* The dictionary (`web2`) is full of all kinds of bizarre words
which are not legit.
# Next
If I get sufficiently motivated what it would be nice for this to do
is:
* Use a better data structure.
* Be pretty with lovely CSS etc.
* Be multi-player.
I think it ought to be possible to hack the websocket handling to:
* Use a tiddler which serializes a board to announce that that board
is getting ready.
* Various listening clients hear that board and load it, counting
down to a start.
* Upon completion each individual saves a tiddler with the
serialized results of their game, with the title of the board, such
that everyone else can `GET` and compare, also over the sockets.
* Some kind of tiddler cleanup would be done after the game is over.
# Who
[cdent](http://cdent.tiddlyspace.com)