Glowfish
Saved games stay in this browser only.
About the game
Glowfish is chess for a 160 by 160 screen. The board fills almost the whole display in shades of red, with white and black pieces drawn as small sprites, and a menu at the start asks two questions: whether you want to play against another person or against the computer (VS Player or VS CPU), and which colour you take.
All the rules are there: castling, en passant, promotion with a choice of piece, check, checkmate and stalemate, plus draws by threefold repetition, the fifty-move rule and positions where neither side has enough material left to win. When you pick up a piece, small dots mark every square it can legally reach, and the game will not let you make an illegal move. Each kind of move has its own sound: a plain move, a capture, a check and the end of the game.
The computer opponent is a small chess engine written for the cartridge. In the first moves it picks one of a handful of standard openings from a short book; after that it looks two moves ahead and follows the exchanges of pieces to the end before it decides, and it answers after a short pause. In a game between two people, the board turns around after every move so that the side to play always sees it from its own end.
Playing it here
Glowfish was made for WASM-4, a fantasy console: an imaginary handheld with a 160 by 160 screen, four colours, a D-pad and two buttons, for which independent developers write new games. It was written in Rust in 2022, on top of cozy-chess, a chess library also written by analog-hors, and runs here in the official WASM-4 runtime. Click Play, choose the mode and the colour with up, down and Z, and the game begins.
Games are not saved, but Enter opens the WASM-4 menu, where you can save and load the state while the page is open (2 and 4 do the same directly). A gamepad works too, and on touch screens an on-screen D-pad and buttons appear. For a game between two people, the player who chose the colour at the start uses the arrow keys and the other uses the second set of keys, or a second gamepad.
Controls
| Key | WASM-4 button | Action |
|---|---|---|
| Arrow keys | D-pad | move the cursor; choose in menus |
| Z | button 2 | pick up a piece; put it down on the target square; confirm in menus |
| X | button 1 | drop the selected piece; go back in the colour menu; cancel a promotion |
| Left / Right (promotion) | D-pad | choose the new piece |
| Enter | — | WASM-4 menu |
C or the comma key also work as Z, and Space, V or the period key as X. The second player in a VS Player game moves with ESDF, picks and places with Tab or Left Shift and cancels with A or Q.
A few things worth knowing
To castle, move the king onto the rook. The game follows the convention of its chess library: pick up the king and put it down on the rook of the side you want to castle to. The dot on your own rook shows that castling is allowed.
The cursor follows your point of view. When you play Black, or in a two-player game, the board is flipped, and up always means towards the opponent's side.
After the game, Z starts again. The final box says who won, or that the game was drawn; Z takes you back to the mode menu for a new game.
Credits and licence
Glowfish was created by analog-hors, who wrote the game, the computer opponent and the chess library it is built on, cozy-chess, in Rust, and drew the pieces and made the sounds in code. It is released under the MIT licence, published with the source code in the repository on GitHub. The compiled game also contains the Rust libraries heapless, hash32, stable_deref_trait and byteorder (MIT licence). It runs here in the WASM-4 runtime (ISC licence). The licence texts are linked from this page.