Free to use, no account

Snake-spill

Før slangen til maten, få den til å vokse og unngå veggene og din egen hale. Spill med piltastene, WASD eller kontrollene på skjermen.

Bruk piltastene, W A S D eller retningsknappene. Unngå veggene og din egen kropp. Sett spillet på pause for å stoppe spillklokken.

Score: 0

Best this session: 0

Trykk Start for å begynne.

Bruk piltastene, W A S D eller retningsknappene. Unngå veggene og din egen kropp. Sett spillet på pause for å stoppe spillklokken.

Beste resultat gjelder bare mens denne fanen er åpen; poengsummen lagres eller sendes ikke.

Hvordan spiller man slangespillet?

Start runden, styr mot maten med piltastene, WASD eller berøringsknappene, og unngå veggene og din egen kropp. Sett spillet på pause når som helst. Når slangen spiser, vokser den og får ett poeng.

Veiledning

Slik bruker du snake-game

This is a classic Snake game on a square grid. You steer a snake toward food, and each piece it eats makes it longer and adds one point. The game ends if the snake hits a wall or its own body. Play with the arrow keys, WASD or the on-screen buttons, at one of three speeds.

Slik gjør du

  1. Pick a speed from the menu: Relaxed, Classic or Fast. Then press Start game, and the snake begins to move to the right.
  2. Steer with the arrow keys, W A S D, or the four direction buttons. The snake cannot turn straight back into itself.
  3. Reach the red food to score a point and grow. Press Pause or the space bar to stop the clock, and Resume to continue.
  4. When the game ends, press New game to start again. The page also shows the best score you reached in this tab.

Eksempler

The starting position

Du skriver inn
Handling
New game
Du får
Brett
20 by 20
Slangelengde
3
Hode
column 10, row 10
Retning
right
Poengsum
0

The snake starts as three squares in the middle of the board and faces right. The first piece of food appears on a random empty square, and nothing moves until you press Start.

Kjørt med verktøyets egen kode.

Eating one piece of food

Du skriver inn
Matposisjon
the square directly ahead of the head
Trekk
one step
Du får
Poengsum
1
Slangelengde
4
Status
running

When the head moves onto the food, the tail stays where it is for that step, so the snake grows by one square and the score goes up by one.

Kjørt med verktøyets egen kode.

Doing nothing after Start

Du skriver inn
Hastighet
Classic (120 ms per step)
Styring
none
Du får
Trekk før veggen
10
Tid til spillet er over
about 1.2 seconds

The head begins in column 10 on a 20-column board, so the tenth step takes it off the board. At Relaxed (180 ms) that takes about 1.8 seconds, and at Fast (75 ms) about 0.75 seconds.

Kjørt med verktøyets egen kode.

Når det er nyttig

  • A short break game that needs no account and no download.
  • Practising quick reactions on a keyboard or on a phone with touch buttons.
  • Teaching a child how a grid game, a score and a game over screen work.
  • Testing how a browser handles a small canvas game.

Begrensninger

  • Your score and best score live in this tab only. They are not saved or sent anywhere, and they vanish when you leave the page.
  • The board is a fixed 20 by 20 grid with solid walls, so the snake cannot wrap around the edges.
  • The game pauses by itself when the tab is hidden, so it does not run while you look at something else.
  • There are only three speed settings, and the speed does not increase as your score grows.

Tips

  • Make wide turns early. The snake gets longer, so the space to turn in gets smaller as you score.
  • Pick Relaxed while you learn the controls, then move to Classic or Fast once the turns feel natural.
  • On a phone, hold the device steady and use the four on-screen arrows instead of swiping.
  • If you change the speed during a game, the clock restarts at the new speed and play continues.

Vanlige spørsmål

How do I play Snake?

Press Start, steer with arrows, WASD or the buttons, eat the red food to grow, and avoid the walls and your own body. Each food item is worth one point.

What are the controls?

Use the four arrow keys, or W, A, S and D, or the on-screen direction buttons. The space bar pauses and resumes while a game is running.

Can I play on a phone or tablet?

Yes. The page has direction buttons you can tap, so a keyboard is not needed. On a computer, the keyboard works as well.

Why can't I turn around?

A snake cannot reverse onto its own neck, so a move straight back is ignored. Turn to the side first, then to the new direction.

Is the food in the same place each game?

No. The snake starts in the same place each time, but the food appears on a random empty square, so every game is a little different.

Are my scores saved?

Only for the session. The current score and best score are kept in memory in this tab and are not stored or uploaded.

Ofte stilte spørsmål

Hvordan spiller man slangespillet?

Start runden, styr mot maten med piltastene, WASD eller berøringsknappene, og unngå veggene og din egen kropp. Sett spillet på pause når som helst. Når slangen spiser, vokser den og får ett poeng.

Lagrer slangespillet poengsummen min eller bruker det en konto?

Du trenger verken konto eller nedlasting. Poengsummen din og øktens beste resultat ligger bare i minnet i denne fanen; de lastes ikke opp eller lagres når du går ut.

Kan jeg spille på telefon eller nettbrett?

Ja. Bruk retningsknappene på skjermen. På en datamaskin fungerer også et tastatur med piltaster eller WASD.

Kan jeg sette spillet på pause?

Ja. Velg «Pause» når som helst; slangen slutter å bevege seg til du fortsetter.

Får jeg det samme spillet hver gang?

Brettoppsettet er kjent, men matposisjonen trekkes tilfeldig for hver nye runde. Poengsummen for den nåværende økten og beste resultat lagres ikke når du forlater spillet.