Menu

To Do

Joshua Braun

Bugs

As of version 1.4, the following bugs need fixing:

  • In Firefox, a single move (using the arrow keys or h,j,k,l) will occasionally not work immediately after a multi-move (Shift-h, Shift-j, Shift-k, Shift-l) has been called. As this bug is browser-specific and because it does not affect gameplay substantially even in Firefox (re-tapping the arrow or h, j, k, l key resumes the expected behavior), I have dubbed it low priority.

To Do

As of version 1.1, JS Worm has nearly all the features of the original 'Worm' included in the BSD Games package of most BSD and Linux distros.

Here are few things that could still be done to improve the faithfulness of the clone to the original and/or make it more usable in the browser. This isn't a formal roadmap, just a simple list of features that I may implement in my spare time, or that you, dear reader, might wish to try adding yourself:

  • Starting worm length. The original Worm game takes an optional argument on the command line that sets the starting length of the worm to a value between 1 and 75. I may implement this at some point, allowing the user to type in an integer or select a starting worm size from a dropdown menu.

  • Improved keyboard menu navigation. Keyboard navigation for menu items was added in v1.2, however it does not yet extend to the selection of themes. This would be nice to do. Because in the future themes may be simpler to add and remove, the list of themes may eventually be dynamic. As such, it seems unwise to add shortcuts to themes that involve letters from their titles in the way I have for other menu items. It may be best to instead create an automated numbering system for themes, such that the user can easily select a theme by entering a number on the keyboard.

  • Simpler theming. I may streamline the theming of JS Worm, allowing the person hosting the HTML document to define color schemes and/or backdrops for the board by simply changing some JavaScript state variables. This would also make it simple to allow users to define their own color schemes using a simple form.

  • Better mobile support. Right now the mouse controls allow for basic play on mobile browsers. But the screen real estate could likely be used better. Also, like the original Worm, JS Worm uses the even width of monospace fonts to properly determine the spacing of characters on the game board. However, mobile browsers without a monospace font and without the ability to load one using @font-face (like Amazon's Silk browser, as of this writing) will probably never display the board properly. One potential solution would be to rewrite the code using the HTML5 canvas element to plot characters on the screen. Since just one function, plot() actually does most of the heavy lifting when it comes to plotting the location of characters, this may not be as extensive a project as it sounds.

  • High score list. I fear spambots once I allow JS Worm to begin saving user data, but this might still be fun. We'll see.

Completed

  • Added in v1.4 Dynamic board size. When the original Worm game starts, it generates a board automatically sized to the console window/framebuffer. Right now, JS Worm generates an 80x25 character board, which is the size of the usual default frame buffer for a Unix system. However, it may be possible to automatically generate a board sized to the width of the browser window, or at least let the user select between different board sizes prior to the start of the game.

    Postscript: Since the original Worm game automatically sizes the game board to the terminal window or framebuffer on launch, I tried making this the default for JS Worm as well (having the game board size itself to the browser window on load), but I found that the game performance lagged in larger browser windows. As such, I decided to make 'maximizing' the board to fit the browser window a user option and to leave the 80x25 character game board as the sane default on pageload. Additionally, I've made it such that the board will only maximize if the screen size is larger than the original board. Unlike with the original Worm, the screen size here can be maximized during play, since all the dimensions of the smaller board will be legal within the larger one to which the user switches. However, to avoid legality issues that might result from the user resizing the screen in the opposite direction, the board may only be 'maximized' once and may not be returned to its original size except by reloading the page.

  • Bug fixed in v1.3 The multi-move shortcuts (Shift-h, Shift-j, Shift-k, Shift-l) stop working after a prize is claimed.

  • Added in v1.2 Keyboard menu navigation. The original Worm has no navigation menu, but since JS worm has a navigation menu, it might be nice to have some nice Unix-y keyboard shortcuts for navigating the menu options. These could be along the lines of the alt-character navigation you see in GNOME desktop applications. For example, the "About" navigation item could be displayed as "About" and accessed with the shortcut alt-a.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.