snake

command module
v0.0.0-...-a5e81c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

README

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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL