Git Product home page Git Product logo

invaders's Introduction

Invaders Build Status Coverage Status

Generate random space invaders. The program works by generating a random block of pixels (4x6 by default), and then mirroring it on the Y axis.

Invaders can be produced as text (on stdout), or as a PNG image (to a file).

Usage

java -jar invaders-1.0-standalone.jar [options]

Basic options

  • -help: Display help text.
  • -p,--png: Generate output as a PNG. Cannot be specified with text.
  • -t,--text: Generate output as text. When this option is specified, a pixel (when specifying other options) will mean a single character. Cannot be specified with png.
  • -x <arg>: The number of un-mirrored, un-scaled pixels on the X axis of a tile (default: 4)
  • -y <arg>: The number of un-scaled pixels on the Y axis of a tile (default: 6)
  • s,--scale: <arg>: The scaling factor for a tile (default: 1). Tiles will be scaled by this number after all pixels have been generated.
  • seed <arg>: The random seed for tile generation. Specifying the same random seed will result in the same invaders being generated.

Tiling options

  • -b,--border <arg>: The border width for a tile (default: 0). This number of pixels will be left clear around each tile.
  • -tileX <arg>: The number of tiles to create along the X axis (default: 1). Cannot be specified with pxWidth.
  • -tileY <arg>: The number of tiles to create along the Y axis (default: 1). Cannot be specified with pxHeight.
  • -pxHeight <arg>: The height (in pixels) of the final output. The number of tiles will be calculated to give this height. Cannot be specified with tileY.
  • -pxWidth <arg> the width (in pixels) of the final output. The number of tiles will be calculated to give this width. Cannot be specified with tileX.

Image options

  • -guassian <arg>: The guassian blur radius to be used (image only, default: 3). Cannot be specified with text.
  • -o,--output <arg>: The output file name (image only, default: invader.png). Cannot be specified with text.

Building

The project uses Gradle. So long as you have a Java 7 or higher installed, you can just run ./gradlew standalone and a standalone jar file will be generated as ./build/libs/invaders-1.0-standalone.jar.

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.