Arcade1-3 min
Air Hockey
Slam the puck past the mallet and into the goal
How to play
- 1Pick a mode and a difficulty and press Start. The puck is placed in your half and the match begins a moment later - you may hit it before then.
- 2Move the mouse and the orange mallet follows. On a phone, hold the table and move your finger; on a keyboard, use the arrow keys or WASD.
- 3Push the mallet fast into the puck. Hit the middle and it goes straight; hit the side and it goes at an angle. The hardest shot to save is one that banks off a side wall on its way in.
- 4A puck in the top goal is yours, a puck in the bottom goal is the CPU's. The side that conceded gets the puck and play restarts. In First to 7, seven goals wins the match.
- 5The trophy button at the top is the achievements and the chart button is your record: matches, win rate, goals for and against, your fastest puck and how many days in a row you have played.
Controls
- Mouse movement
- Move the mallet (inside your own half)
- Press and drag
- Move the mallet (on a phone)
- Arrow keys / WASD
- Move the mallet up, down, left and right
- P
- Pause and resume
- Space bar
- Resume from a pause
Tips
- Do not leave the front of your goal empty. While the puck is in the CPU's half, put the mallet just ahead of your goal, on the line between the puck and the goal, and most shots are saved for you.
- A puck hit by a stationary mallet dribbles away. Pull the mallet back a touch and push forward into the puck to get any power behind it.
- The CPU attacks when the puck gets deep into its half. Send the puck off a side wall and the CPU has to go round behind it, which buys you time to attack again.
- The CPU sees the puck slightly late, so two quick strikes that change direction suddenly go in more often than one hard straight shot.
- The corners are rounded, so the puck bounces out instead of lodging. If it ever does stop, it is nudged back to the centre after 1.6 seconds, so a match never stalls.
- The result screen shows the fastest puck of the match, worked out by taking the table width as a metre.
- In the 60-second mode the clock keeps running after a goal. Attack pays better than defence there, so short exchanges where you take the puck near the halfway line and push straight back score the most.
What is Air Hockey?
Air hockey is the table where air comes up through little holes in the surface and the puck glides on it. It was built in the United States in the 1970s and became a fixture of arcades and amusement parks. You hit the flat puck with a round mallet, and getting it into the other goal is one point.
This table is laid out for a phone held upright. The bottom half is yours, the top half is the CPU's, and a mallet cannot leave its own half. The puck loses a little speed when it bounces off a wall and slows gradually on the surface. The speed your mallet was travelling at is added to the puck on contact, so holding it still just blocks, and a full swing sends the puck away like a bullet.
When the puck comes into its half, the CPU goes round behind it and aims at the goal or a side wall; otherwise it sits in front of its own goal. But it sees the puck slightly late, like a person, and its defensive position is a little off. Each level has its own lateness, jitter and mallet speed, tuned against measured win rates. Played out against a bot that strikes the way a person does, 40 matches per level, the CPU won 28% on easy, 57% on normal and 80% on hard. Even hard is beatable once you use the walls.
It is worth recording how the CPU was weakened. The old one read the puck's current x position every time it thought and stood at exactly the right spot in front of its goal, and against the same person-like bot over 40 matches it won 57% on easy, 93% on normal and 100% on hard - hard was a wall you could not get past. Now it sees the puck 0.03 to 0.08 seconds late depending on level, which means it is looking at where the puck was, and its defensive position wanders by 24 to 40 units either way. Measured again, that gives 28%, 57% and 80%. A match runs 63 to 76 seconds on average.
Whether the puck can get stuck and stall a match was counted too. In the same measurements, frames where the puck overlapped a mallet deeply were 0.45% to 0.70% of the total, and the longest such overlap was 0.85 seconds. The corners of the table are rounded, so it does not lodge in the first place. As insurance, a slow puck (under 22 units a second) that nobody touches for 1.6 seconds is nudged back to the centre by itself. In the measurements the longest a slow puck sat was 0.18 seconds, so that correction never actually fired.
The puck is capped at 1,500 units a second and the fastest one measured was 1,490. Taking the 400-unit table width as a metre, that is around 13 km/h. And so that a fast puck never passes straight through a mallet, each frame is stepped in pieces smaller than half a puck radius (8.5 units) with the collision checked in between.
There are three modes. First to 7 is the match: seven goals takes it and a win adds to your streak. 60 seconds gives the win to whoever has more goals after a minute, and the goals you scored are the record. The daily table lets the date fix the difficulty and every CPU shot, so on a given day everyone plays the same table.
Frequently asked questions
My mallet will not cross the halfway line.
Just like a real air hockey table, your mallet only moves inside your own half, the bottom one. While the puck is in the other half, wait in front of your goal and guard it.
What happens if the puck stops in the middle of the CPU's half?
The CPU always strikes a puck that has slowed inside its own half. And if a puck stays slow for 1.6 seconds anyway, it is nudged back to the centre by itself, so a match can never stall with nobody able to reach it.
Can hard actually be beaten?
Measured against a bot that strikes the way a person does, the hard CPU wins about 80% of the time, which means it is losable. It sees the puck slightly late and its defensive position is off, so mixing bank shots off the side wall with strikes that change direction opens a way through.
What is different about the daily table?
The date fixes the difficulty and every shot the CPU takes, so on a given day everyone plays exactly the same table, which makes results worth comparing. It rolls over to a new table at midnight Korean time.
How is the win streak recorded?
Wins, losses and your current streak are stored per difficulty in this browser, and the longest run you ever managed is kept as your best streak. A loss sends the current streak back to zero. The 60-second mode records goals scored instead of a streak.
The puck is so fast it goes straight through my mallet.
It should not. Each frame is split into pieces smaller than half the puck radius and moved a piece at a time, with the path the mallet swept checked in between. The puck's speed is capped at 1,500 units a second.
Can I play on the keyboard alone?
Yes. The arrow keys or WASD move the mallet at 520 units a second. The mouse is followed up to 1,400, so the keyboard is a little slower, but it is plenty for guarding the goal. P pauses and the space bar resumes.
What if I switch to another window mid-match?
Changing tab or hiding the window pauses the match automatically. P or the resume button picks it back up.