Skip to content
/ snake Public

Classic "Snake" game, implemented in Ebitengine Go

License

Notifications You must be signed in to change notification settings

mikenye/snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake

Classic "Snake" game, implemented in Go using the fantastic Ebitengine.

Instructions

  • Arrow keys set the snake's direction (Nokia style).
  • Eat the cupcakes.
  • Don't eat yourself.
  • If the snake goes off the edge of the screen, it will wrap around to the opposite edge.

Screenshots

Main menu

In game

Game over

Background

I recently watched Code-It-Yourself! Snake! - Programming from Scratch (Quick and Simple C ) by One Lone Coder, and thought this would be cool to implement in Go using Ebitengine.

I'm trying to get better at Golang and Ebitengine so this was a fun little exercise.

Requirements

  • Golang version 1.22

Building

You can build by:

  • Cloning the repo
  • Run go mod tidy from the root of the repo to download Ebitengine and other required modules.
  • Run go run main.go to run the app.
  • Run go build -o <path_to_binary> to build an executable binary.