GithubHelp home page GithubHelp logo

invaders's Introduction

invaders

GitHub tag (latest by date) Minimum Supported Rust Version GitHub Workflow Status

A Space Invaders TUI in Rust, built using tui and crossterm.

Demo

invaders-demo.mov

Install

To install, use cargo:

cargo install --git https://github.com/mattdowdell/invaders --tag v0.0.3

See here for a full list of tags.

Usage

To run the game:

# using build from `cargo install`
invaders

# with source code
cargo run

Some settings are available to tune gameplay:

  • -h, --help: Print help information
  • --max-cannon-lasers <MAX_CANNON_LASERS>: The maximum number of cannon lasers that can be present (default: 1).
  • --max-invader-lasers <MAX_INVADER_LASERS>: The maximum number of invader lasers that can be present (default: 3).
  • --mystery-ship-interval <MYSTERY_SHIP_INTERVAL>: The interval in ticks between appearances of the mystery ship (default: 2000).
  • --start-level <START_LEVEL>: The level to start at (default: 0).
  • --tick-length <TICK_LENGTH>: The number of milliseconds per tick (default: 50)

invaders's People

Contributors

mattdowdell avatar dependabot[bot] avatar

Watchers

 avatar

invaders's Issues

Hiscores support

  • Store hiscores in ${XDG_CACHE_HOME}/invaders/hiscores.toml
    • Commented-out helper function in main.rs.
  • Game over should check if the score is in the top 5.
  • If score is in top 5, write new hiscores to file.
    • Bonus: Accept name of player for hiscore.
  • Hiscores should be loaded on start, added to the start screen, game screen, and game over screen.

Handle insufficient sized terminals

Currently, we panic if the screen is too thin or short for play the game, whether that be initially or during a resize. If this happens, we should:

  • Pause the game if it's in progress.
  • Output the current and expected dimensions for the termial.

Create release workflow

Tag workflow:

  1. Trigger on-demand
  2. Run tests + build artifacts for Windows, Linux, MacOS (compress + checksum)
  3. Create tag based on the version in Cargo.toml.
  4. Create draft release, e.g. Version X.Y.Z.
  5. Attach builds + checksums to release.

Publish workflow:

  1. Trigger on release create/publish/released (unsure which is appropriate)
  2. Publish to crates.io

Improve signal handling

  • Respond to Ctrl+Z/SIGSTOP and SIGCONT correctly. Currently, this is swallowed by crossterm(?).
  • While we're there, improve Ctrl+C/SIGINT handling.
  • Consider handling Ctrl+\/SIGQUIT as well.

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.