Snake
- 57 tools
- No watermark
- No daily limit
The game off the old Nokia handsets, written properly. Eat, grow, do not run into the walls or into yourself. It runs at the same speed on a 60Hz laptop and a 120Hz phone, it lets you turn a corner with two quick presses rather than eating one of them, and it does not kill you for following your own tail. The whole thing is a few kilobytes and it keeps working with the network switched off.
Press an arrow key to start. Eat the gold dot. Do not hit the walls or yourself.
Score 0
Best 0
Arrow keys or WASD to steer, space to pause, Enter to start again. On a phone, swipe across the board or use the buttons. The best score is kept on this machine only, in this browser, and goes no further.
Frequently asked questions
Is anything sent to a server?
No, and there is no server to send it to. The site’s security policy sets connect-src ‘none’, so the browser blocks network requests from these pages, so the page could not report a score even if the code tried. Your best score is kept in this browser on this machine and nowhere else, which also means it does not follow you to your phone.
Does it work offline?
Once the page has loaded, yes. There is no network call during play, so pulling the cable out or switching to flight mode changes nothing. That is not a feature that was added; it is what a page with no network access does by default.
Why does the snake sometimes ignore a key?
Only two presses are held at a time, and a press that would turn the snake back into its own neck is dropped. Turning a corner needs two presses and they both count, which is the part most versions get wrong: they keep only the newest press, so up-then-left from a rightward run throws the "up" away and you go straight into yourself. Here both land, one per step.
I followed my own tail and died in other versions. Not here?
Not here, and here is right. The tail leaves its cell in the same step the head arrives in it, so the head lands on an empty square. Versions that test the head against the whole body kill you for driving in a tight circle. The exception is when you eat on that same step: eating holds the tail in place, so the cell really is still occupied.
Does it get faster?
Yes, up to a point. It starts at about seven steps a second and speeds up as you eat, then stops at about twelve. Past that a person cannot reliably place a turn on the cell they meant, and the game stops being about planning ahead and becomes a test of reaction time, which is a different and worse game.
Is it the same speed on every screen?
Yes, and that is worth saying because it usually is not. Most browser games step once per drawn frame, so the same game runs at double speed on a 120Hz phone. This one counts milliseconds instead, so the pace is the same on any display, and a frame the browser drops costs nothing.
What happens if I fill the whole board?
You win, and the game says so. It is 400 squares on the classic board, so it takes 397 apples without a single mistake. It has been tested rather than assumed: the code that places food looks for a free square instead of guessing at one, so the last apple of a perfect game is placed instantly rather than hanging the tab.
Can I play it with a keyboard only?
Yes. Tab to the board, then steer with the arrow keys or WASD, pause with space and start again with Enter. The board takes focus and only swallows the arrow keys while it has it, so the rest of the page still scrolls normally.