About Hockey
Air hockey against a bot, made entirely of text characters.
Hockey is air hockey, played in your browser against a bot. Your paddle runs along the bottom of the table and the bot's along the top, with rails all the way round and a narrow goal in each end. Knock the puck into the bot's goal, straight or off the rails, and keep it out of yours. The first to 7 wins the match, and then a better bot steps up. Lose a match and the run is over.
Everything is a character
Every part of the table is a text character drawn in a monospace font:
- The paddles are rows of ▀ by default, or ▬, ═ or ━, picked in Settings, stretched to join into one bar. Yours is blue and the bot's is red.
- The puck is ◉ by default, or one of five others: ● ◎ ○ ◆ ★. It moves smoothly, not square by square.
- The rails are double lines: ║ down the sides, ═ across the ends and ╔ ╗ ╚ ╝ at the corners. The goal posts are ╡ and ╞.
- The air holes are a
·in every other square, staggered row by row. - The markings are a center line of
═, and circles drawn with•: the face-off circle, a ring round each of the four●spots, and the crease in front of each goal. - The score is in big faint digits beside the center line. A goal leaves a blinking ✖ where the puck went in.
The board is a grid of squares shaped like the font's own characters, a little over half as wide as they are tall, the same as in Paddles, which Hockey grew out of. The font is DejaVu Sans Mono, trimmed down to just the characters Charcadia uses. Because the board is a grid of characters rather than pictures, it stays sharp at any screen size, in both the light and dark themes.
How the bot plays
The bot plays the way a person might. Each time the puck turns its way, it waits a moment to react, works out where the puck will cross its paddle, bounces off the side rails included, and moves there at its own top speed. Its guess is a little off, and now and then a lot off. When it lines up a shot, it tries the angles off its paddle that would send the puck into your goal, straight or off a rail, and picks the one that goes furthest from your paddle. Each bot up the ladder reacts faster, moves faster, guesses better and shoots more often, and the puck starts each point a little faster too. The strategy guide has tips for beating them.
Small and fast
Hockey is written in plain HTML, CSS and JavaScript, with no frameworks. The whole game is a few kilobytes once compressed, plus the font.
There's no account and no server-side game data. Your best score and your choice of puck, paddle, theme and controls are saved only in your own browser.
Part of Charcadia
Hockey is part of Charcadia, a small family of games, each built entirely from text characters. Its siblings are Chase, a maze chase; Crash, a racer; Ships, a space shooter; Jump, a platformer; Snake, the arcade classic; Bricks, a brick breaker; Paddles, a paddle duel; Cross, a road-crossing game; Skeet, a clay shooting game; Launch, a trebuchet launcher; and Derby, a home run derby.
Who makes it
Hockey is made by Cory Webb Media. It's free to play.
How far up the ladder can you get?
Play Hockey