Snake written in x86-64 assembly (NASM) for Linux, made during Hack Week 2026.
Screencast_20261202_180320.mp4
There is no libc, only ioctl with termios to put the terminal in raw mode, read for the keyboard, write for the output and nanosleep for the game speed.
Everything on screen is drawn with ANSI escape codes.
You need nasm, ld (binutils) and make.
make # build
make run # build if needed, then start the game
make clean # remove the object file and the binaryThe terminal must be at least 124 columns wide and 32 rows high.
- Arrow keys: move
q: quit
Eat the food () to grow. Food does not stay forever: if you are too slow, it disappears and shows up somewhere else. Hitting a wall or yourself ends the game.
GPL-2.0. See LICENSE.