Git Product home page Git Product logo

spaceinvaders's Introduction

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.

spaceinvaders's People

Contributors

0xcafed00d avatar asib avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.