spaceinvaders

command module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: MIT Imports: 11 Imported by: 0

README

Space Invaders

Terminal Space Invaders game written in Go.

Screenshot 1 Screenshot 2

Joystick bug

I've just found out that Ubuntu recognises my Microsoft keyboard as both a keyboard and a joystick, meaning it creates /dev/input/js0 despite the fact that there is no joystick connected. The result is that the data read from this input can cause unwanted key press events in the game, making it unplayable.

The quickfix is to simply sudo rm /dev/input/js0.

Alternatively you can establish a rule for js0.

Installation
go get -u github.com/asib/spaceinvaders
cd $GOPATH/src/github.com/asib/spaceinvaders
go build

You can also simply download a binary for your OS/Arch from here.

Controls
  • Use the arrow keys to move left/right, spacebar to fire.
  • Press q at any time to quit.

The game will adjust the number of "invaders" to (roughly) fit your terminal's screen size. This means you can make the game more/less difficult by making your screen bigger/smaller. Just make sure you don't resize the screen once you've started playing, else the game will crash.

If you're having trouble fitting all the graphics onto your terminal screen, even when it's maximised, lower your font size.

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