Chris Collins

Tools · games

Cube Serpent

A snake game on the six faces of a cube: run over the edges, eat gems, use portals, dodge walls — or ride light cycles against one to three AI rivals. Keyboard, touch and gamepad.

Added

How to use it

A snake that lives on the outside of a cube. Each face is a grid; run off one and you carry on over the edge onto the next, and the camera swings round the cube so the face you are on is always in front of you, with your snake heading up the screen. You only ever turn left or right.

There are two games:

  • Snake. Eat the red gems to grow (three segments each) and speed up. Eat enough and the level clears; the next one has bigger faces and more gems to find. From level 2 there are portals — matching coloured rings on two faces, and you come out of the other one still heading the same way relative to its face. From level 3 there are walls. Every level is generated from a seed and checked before you get it: the open cells all join up and none is a dead end.

  • Light cycles. You and one to three AI riders start on different faces, each leaving a wall of light behind. Hitting any wall — yours included — ends your ride; two riders entering the same cell head-on both crash. The last one moving wins the round, and the next round is faster with sharper rivals. The riders look for the most room they can reach and the territory they can claim before anyone else.

How to play

Keyboard

← / → (or A / D) turn left and right. P, Esc or Space pauses, M mutes, F goes full screen, Enter starts.

Touch

the ◀ and ▶ buttons, a tap on the left or right half of the game, or a sideways swipe. The game fills the screen in portrait or landscape; ⛶ Full screen hides everything else.

Gamepad

d-pad left/right, the left stick, or the shoulder buttons turn; A starts and continues, Start pauses. Any standard-mapping pad works in Chrome, Edge, Firefox and Safari.

Up to two turns queue, so a quick left-left makes a U-turn over two moves. Scores (snake: points and level; light cycles: rounds won, then how long you lasted) go in a table of your best eight.

Shake and Low graphics sit under the game. Low graphics renders at one pixel per CSS pixel and drops the glows and particles; the game switches to it by itself if frames stay slow. With reduce motion set in your system, shake starts off and the bursts are smaller.

The game needs WebGL, which every current browser has. Sound starts on your first click or key.

Privacy

The page loads three.js 0.147.0 (MIT licence) from cdn.jsdelivr.net the first time it opens. Nothing else is fetched and nothing is sent anywhere: your scores, the mode you last played and your sound and graphics settings stay in this browser’s local storage.

The game, its levels, sound effects and music are my own; the snake and light-cycle ideas are old arcade genres.

Runs entirely in your browser — network requests go only to the services named on this page.