Space Invaders in your console
Project description
Console Invaders
A text-mode space invaders game (suggested from Austin Z. Henley's blog).
Install
Install by runing:
pip install consoleinvaders
Uses pynput
and windows-curses
dependencies.
Run
To play the game use arrow keys to move, and hold Left Shift to shoot, run on a terminal:
consoleinvaders
The game is over if you destroy all aliens or an alien destroys you or reaches the bottom.
Press ESC or Ctrl+C to quit.
Windows
The Windows Terminal doesn't seem to handle resizing while the game is running: microsoft/terminal#5094
MacOS
In order to detect keyboard state, your terminal needs Input Monitoring permission.
For some reason, when using iTerm2 the keyboard state doesn't work if iTerm2 is selected. Click to focus a different app and then play the game, or use a different terminal.
Developing
git clone https://github.com/darthwalsh/ConsoleInvaders.git
cd ConsoleInvaders
python3 -m venv env # Or on Windows, use python
. env/bin/activate # Or on Windows, use Activate.ps1
pip install -r requirements.txt
# On Windows: pip install windows-curses
Run with:
python3 -c "import consoleinvaders.app; consoleinvaders.app.main()"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for consoleinvaders-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3799ce5af025ba19dd2463b079b4a34c318b21546ff060ac0aae5ed3b03662ba |
|
MD5 | 44005cb80288e0deaade5d241ff70a5a |
|
BLAKE2b-256 | 7491ab92a97fff0cf0bda5b64142f7e8dca1fea0e67159376f9b7784b2080f6e |