Snake game: Lanterncoil

Lanterncoil is a snake game where you gather lanterns in a garden and move faster as your tail grows.

Genre
Arcade
Players
1
Works on phone
Yes
Length
Until you hit a wall or tail

Make a game like this with Claude Code

How to play

  • Press Start game, then steer with arrow keys, WASD, the four direction buttons or a swipe across the garden.
  • Collect the amber lanterns. Each one adds a segment and raises your score by one. Hitting a wall or your body ends the round.
  • Space or Pause stops the snake. Restart gives you a fresh garden immediately. A hidden tab pauses the round.

Tips

  • Leave space for a wide turn. Reversing straight into your neck is blocked, so turn twice around an empty square instead.
  • Make one turn at a time. The game accepts one direction change between steps, which keeps a quick pair of swipes from turning you into your own body.
  • Follow the outside of your tail when the garden gets crowded. You can move into the square the tail leaves on that step.

About Lanterncoil

Lanterncoil takes place in an 18 by 18 garden, with amber lanterns hanging between the reeds. You start with three green segments near the middle. A lantern appears only in an empty square, and the next one appears as soon as you collect it. There are no enemies or extra obstacles inside the garden.

The opening pace is one step every 210 milliseconds. Each lantern removes 7 milliseconds from that interval, down to a limit of 65 milliseconds. That makes the same garden harder in two ways: the tail occupies more squares and you have less time to choose a turn. Filling every square wins the round.

Your best score is saved in this browser on this device. The current score starts at zero each round. The rules check includes a full-board win, a collision with the wall, a collision with the snake and a legal move into its departing tail square.

Why does this snake game get faster?

Each lantern shortens the time between steps by 7 milliseconds. The interval falls from 210 to a minimum of 65 milliseconds, reached after 21 lanterns.

Does my best snake score carry to another device?

It stays in the browser where you played. Clearing this site's browser data clears the saved best score too.

Can I finish the whole garden?

Yes. Filling all 324 squares wins. Since the snake starts three squares long, a full garden means collecting 321 lanterns.

About the rules and tools

  • Snake rules. The familiar goal is to collect food while avoiding a growing tail. Lanterncoil uses that loop with its own garden, art and speed curve.
  • MDN: browser storage. Explains the browser storage used to keep the best score between visits.

Software credits

How this game was made

The rules tests check wall and body collisions, a legal move into the departing tail square, the speed limit and a complete 324-square garden. The four-game batch took 5.8 minutes from the kit's setup stamp to its first compiled builds and passing Node checks.

This was the prompt:

Make an original snake game called Lanterncoil in a lantern garden. Use the puzzle starter. Arrow keys, WASD, swipe and direction buttons; speed rises as it grows; score and best score in localStorage, game-over screen and instant restart. Draw the garden and snake ourselves.
Four-game build
5.8 minutes
Model cost
Not reported
Game file
11.0 kB

OpenAI Codex wrote these games using the kit's puzzle starter and builder. The clock covers all four games from setup to their first compiled builds and passing rules checks. Codex session pricing was not supplied by the runtime. Open the build measurements.

Make one like this

One email a week. Unsubscribe anytime.