Skip to content

About

A small, retro Snake game built with LÖVE (Love2D) and Lua.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Tiny Snake

A small, retro Snake game built with LÖVE and Lua.

Lua LÖVE

Tiny Snake gameplay

Play

Install LÖVE 11, then run from the repository root:

love .
Key Action
Enter Start / confirm
Arrow keys Steer the snake
Esc Quit

How it works

The game renders at 320×240 and is scaled up 3× with push for crisp pixel art. A small state stack (game.lua) moves between title → countdown → play → score.

  • Ticks, not frames: the snake advances one grid cell every 0.25s, whatever your display's refresh rate.
  • Growth: on each tick the head moves forward. When the snake eats, it keeps its tail segment instead of dropping it.
  • Food spawns on a random free cell in the Room grid, never on the snake's body.
  • Game over when the head leaves the room or hits the snake's own body.
main.lua              entry point and LÖVE callbacks
game.lua              state stack
elements/snake.lua    movement, growth, collision helpers
elements/room.lua     playfield grid, random cell placement
elements/food.lua     food
states/*.lua          title, countdown, play, score
assets/               font and sound effects

About

A small, retro Snake game built with LÖVE (Love2D) and Lua.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages