GithubHelp home page GithubHelp logo

invaders's Introduction

Invaders

Invaders is an open source terminal arcade game with audio, based off of the "Space Invaders" classic arcade game.

This game was initially developed for a presentation at OSCON Open Source Software Superstream Series: Live Coding—Go, Rust, and Python and then adapted for inclusion as an example project for the 2020 version of Ultimate Rust Crash Course. The tags part-1, part-2, etc. correspond to the various stages of the original presentation.

Since the original presentations, folks continue to tinker and improve the game. Feel free to fork this repository, make a change, and submit a pull request if you have a good idea!

Sound Files

If you want the sound files used in the course video, but don't want to clone the repository, here are all the sounds in two different archive formats (the sound files are the same):

Notice the new path to the sound files used in the course. It is now under audio > original. All new contributions can be placed under audio > contributions.

We have now a new set of instrumental music sound files in MP3 format. You may listen to the sounds on Musescore.com.

Dependencies on Linux

Audio should work out-of-the-box on macOS, Windows, and iOS. For Linux, the downstream package for actually playing sound ([CPAL]) requires the Alsa development libraries to be installed.

CentOS

sudo yum install -y alsa-lib-devel

Debian/Ubuntu

sudo apt install libasound2-dev pkg-config

Arch Linux

sudo pacman -S alsa-lib pkgconf libx11

You will also need pipewire-alsa or pulseaudio-alsa depending on the sound server you are using.

Community Games!

Were you inspired to make your own terminal-based game? Open a PR to add it to the list here!

Contribution

All contributions are assumed to be dual-licensed under MIT/Apache-2.

License

Distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See license/APACHE and license/MIT.

Sponsor

Star this repository and sponsor me to support projects like this. 💖

invaders's People

Contributors

0x7s0lt1 avatar basilkohler-inside avatar cleancut avatar gekh avatar madchicken avatar rbergevw avatar shining-chen avatar shuriken1812 avatar slindaue avatar sp-luciano-chinke avatar xoryouyou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

invaders's Issues

chore: Couldn't find audio file to add: Os

I ran cargo build && cargo build --release and after I did cargo run and I received this error

{ code: 2, kind: NotFound, message: "No such file or directory" }', /Users/{userName}/cargo/registry/src/github.com-1ecc6299db9ec823/rusty_audio-1.2.1/src/lib.rs:79:14
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

My cargo.toml is like this
[dependencies] crossterm = "0.20.0" rusty_audio = "1.2" rusty_time = "0.11"

can't move and shoot at the same time

in the current game, we can hold left/right to move the spaceship. However, once we pressed the shoot button, the spaceship stopped despite of us still holding the left/right key.

How can we modify the match key_event.code logic to make it support the move and shoot simultaneously? @CleanCut

Emojis

I tried running this using emojis instead of ascii characters, but it's causing rendering issues. In Windows terminal, when an emoji is removed from a coordinate, it leaves behind a smaller version of that emoji. In VS Code integrated terminal, it just doesn't show up in it's new spot after being moved.
The weird part is that in both of these issues only happen when the symbols are moved up, down, or left. Moving right renders correctly.

Sound Archives

If you want the sounds, but don't want to clone the repository, here are all the sounds in two different archive formats (the sound files are the same):

Error when moving

I get the following error when the invaders move "down"

thread 'main' panicked at 'index out of bounds: the len is 40 but the index is 40', src/invaders.rs:75:9

Is the game fully blind-accessible?

Hello. When playing this game, can I rely on the stereo position of the invader by sound? I am blind and use a screenreader and wander if this game is audio-only.

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.