npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

html-scrabble

v0.1.2

Published

Multi user Scrabble game

Downloads

6

Readme

Online multiplayer Scrabble with HTML/JavaScript UI

History

This repository contains the code for a multiplayer Scrabble game. I have written it because my wife and I got increasingly frustrated by the sluggish Web 1.0 interface that http://thepixiepit.co.uk/ provides. Coming up with something better was on my To-Do-List for years, but I never found enough time to get a decent board UI implemented, and The Pixie Pit served us well enough through those years.

Much to my pleasure, I stumbled over http://code.google.com/p/html-scrabble/ one day, which implemented the interactive parts of a Scrabble board in a very nice manner. The implementation was lacking the game logic and server parts, though, so I decided to fork the project and add the missing pieces.

Little of the original board code is left now, but I owe the original author, Daniel Weck, lots of kudos for getting CSS and Drag&Drop under control. Without his work, I'd not be able to get the game to run. I also owe an apology for ripping his code apart and removing the dictionary functionality, as we are playing without a dictionary and want to keep it that way.

Features

  • Two to four players
  • German, English and French letter sets
  • Written in JavaScript, runs in browser
  • Scalable user interface
  • Desktop notification support
  • Moderate sound effects
  • Tile placement by clicking, drag&drop or keyboard entry
  • Chat
  • Standard Scrabble rules including "Challenge" with simple penalty
  • No dictionary enforced
  • Player online status display
  • Participation in multiple games from one browser possible
  • Uses node.js on the server
  • No database required, no deployment complexities

Limitations

  • Human players only. No computer players are available.
  • No dictionary. Any word can be entered.
  • No security. The server uses sufficiently long random numbers as keys for games and players to make guessing a key impossible. The game and player keys are enough to join the game and make moves, though.
  • Limited browser support. We're using Chrome and Firefox and I am not testing on other browsers.
  • Unlicensed. "Scrabble" is a registered trademark by Hasbro and Spear, and the word is used in this program without permission.
  • Bugs. There are some minor (and maybe even some major) bugs which I have not come around to fix yet, and maybe never will.
  • Ugly code. I did not understand much of the original code when I started adding features, and did not refactor thoroughly in the course of action. There are several things in the code that I'd do differently now, but as the game works well enough as it is, I'm not doing it. If you want to hack this code, expect a high WTF rate.
  • Ugly UI. Daniel's original work was very nice-looking, and my additions to the user interface can't compete with what he did.
  • UI not translated. The user interface is available in English, only.
  • Simple database. All game data is kept in memory and serialized to a JSON log using the node-dirty database system. This works well, but has limited capacity and the database file grows without bounds.

As I am not planning to provide the game as a public service, but rather run it for me and my friends to use, these limitations do not bother me. If you look at the game, please consider that it is a game meant to be played between friends, not an Internet service open to the general public.

Future changes

I am open to patch submissions as long as the playability of the game is preserved. In particular, we want no dictionary matching, fast next game creation, no passwords, keyboard operability. I also want zero-effort deployment (i.e. no mandatory dependency on a database server).

It would be somewhat nice to grow the game into a public service, but there is a lot of work left towards that goal, and I don't intend to make such an effort given the uncertain licensing issues. If you want to deal with the legal aspects, let me know.

Running the game server

The game uses node.js as server and depends on some npm packages:

$ npm install
$ node server.js

Open your web browser on http://[hostname]:9093/new-game.html to create a new game.

If you have trouble getting the server to run, feel free to contact me. Be aware, though, that you will need a machine to run the server on (I'm using my Mac, but FreeBSD or Linux will work as well) and have some command line knowledge. I cannot help you if you don't know your way through the shell and development tools.

Enjoy, Hans ([email protected])