Neko is a cat that chases the mouse cursor across the screen, an app written in the late 1980s and ported for many platforms.
This code is a re-implementation using Golang and has no relationship to the original software. Furthermore, this version does not use any part of the original source code except sprites and sounds.
The goal is to demonstrate the Go language with a fun and very nostalgic example, without necessarily being tied to the behavior of the original version.
In this example, we used the Ebitengine, an incredibly easy-to-use gaming library with a vibrant community.
Note that some operating systems may restrict the execution of binaries downloaded from the internet for security reasons. Please consult your operating system documentation to learn how to enable Neko to run.
export CGO_ENABLED=1
go run main.goOr you can build the binary and run it:
export CGO_ENABLED=1
go build -o neko main.goParameters
-mousepassthroughEnable mouse passthrough (default false).-quietDisable sound.-scaleThe scale of the cat on the screen (default 2.0).-speedThe speed of the cat (default 2).-hShow help.
Before installing Neko, make sure you have Go installed on your system, as we will be using go install.
Install dependencies, build, and install the project into your Go bin directory:
cd neko
go mod tidy
go installTo use Neko globally across your system, check if your Go bin directory is in your $PATH by running:
echo $PATHIf you don't see a Go bin directory, you'll need to add the following line to your ~/.bashrc, ~/.zshrc, or the equivalent shell configuration file:
export PATH=$PATH:$(go env GOPATH)/binAfter that, you can simply run neko in your terminal. If you want it to start with your system, you can add it to your .xinitrc or a similar startup script.
Please follow our contribution guide.

