Classic "Snake" game, implemented in Go using the fantastic Ebitengine.
- 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.
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.
- Golang version 1.22
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.