by Sandro Maffiodo


Obviously this is a SPACE INVADER game. It use NCURSES to get the terminal screen size and handle inputs/outputs.

The program return 0 if the user win or not-zero if the user is A LOSER.


$(CC) prog.c -lncurses -o prog


To run the program type


You can move the ship to the LEFT using key A and to the RIGHT using any other key. Use SPACE to shoot a rocket.

The program return 0 if the user win so you can test it and make something usefull (or not), like that:

./prog && echo "you win"

Try the following alias! Every time you type ls you need to beat the aliens to list your files! :D

alias ls="'`pwd`/prog' && ls"

NOTE on MacOS terminal:

You need to disable your blinking cursor manually. Use escape codes, like that:

printf "\e[?25l"; ./prog && echo "you win"; printf "\e[?25h" 


The build process will generate some warnings (10~ on clang) about: