go-invaders

module
v0.0.0-...-8f43889 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: MIT

README

Go Invaders

A Space Invaders emulator implemented in Go

Installation

$ go get -u github.com/danmrichards/go-invaders/cmd/go-invaders/...

Usage

In order to play Space Invaders you will need to supply the ROM files. For obvious reasons they are not included in this repo.

  -debug
        Run the emulator in debug mode
  -dir string
        Path to directory containing ROM files (default "roms")
  -scale-factor int
        Scales the original video resolution (224x256) (default 2)

Building From Source

Pre-requisites

The emulator uses the following packages which have requirements of their own before we can build with them. Follow the instructions for each:

Building

Clone this repo and build the binary:

$ make build
Cross compile for Windows

If you are running on Linux, it is possible to cross-compile the application for Windows.

In order to do this you will need a GCC compiler that targets Windows, such as mingw. Once installed, you can cross compile like so:

$ GOOS=windows GOARCH=${GOARCH} CGO_ENABLED=1 CC=${GCC} go build -ldflags="-s -w" -o bin/go-invaders-windows-${GOARCH}.exe ./cmd/go-invaders

Replace ${GOARCH} with your target architecture (e.g. amd64) and replace ${GCC} with the name of your Windows GCC (e.g. x86_64-w64-mingw32-gcc)

Directories

Path Synopsis
cmd
internal
sound
You can use the "packr clean" command to clean up this, and any other packr generated files.
You can use the "packr clean" command to clean up this, and any other packr generated files.
sound/packrd
You can use the "packr2 clean" command to clean up this, and any other packr generated files.
You can use the "packr2 clean" command to clean up this, and any other packr generated files.

Jump to

Keyboard shortcuts

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