• Stars
    star
    106
  • Rank 316,232 (Top 7 %)
  • Language
    Shell
  • Created about 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A game, written in Bash, that is a somewhat retro-a-like shoot 'em up. Hopefully.

Antsy Alien Attack!
Antsy Alien Attack!

A game, written in Bash, that is a somewhat retro-a-like shoot 'em up. Hopefully.

Antsy Alien Attack!

Made with 💝 for

Building, Testing, and Installation

Ubuntu

You'll need the following dependencies:

  • coreutils for stty
  • joy2key (optional)
  • lolcat
  • mpg123
  • ncurses-bin
  • procps
  • vorbis-tools
sudo apt install coreutils lolcat mpg123 ncurses-bin procps vorbis-tools

Or with Nix:

nix shell nixpkgs#lolcat nixpkgs#mpg123 nixpkgs#ncurses nixpkgs#procps nixpkgs#vorbis-tools --command ./aaa.sh

Execute ./aaa.sh to run the game.

./aaa.sh

XBox controller support

This step is optional.

sudo apt install libx11-dev x11-utils
wget -c http://sourceforge.net/projects/joy2key/files/joy2key/1.6.3/joy2key-1.6.3.tar.bz2
wget -c http://sourceforge.net/p/joy2key/patches/_discuss/thread/e73f20a1/33d7/attachment/button_list_segfault.patch
tar xvf joy2key-1.6.3.tar.bz2
patch -p0 -i ../button_list_segfault.patch
cd joy2key-1.6.3
./configure --prefix=/usr/local
make
sudo make install

Steam Controller

Player 1 and Player 2 control profiles for sc-controller can be found in the cfg/ directory.

  • Antsy Alien Attack - P1.sccprofile
  • Antsy Alien Attack - P2.sccprofile

Plans

  • Tick
    • Hardware interrupt trap to govern the game loop via a subshell.
  • Input handler
    • Keyboard
    • Xbox360 Controller
  • Graphics
    • Framebuffer
    • Sprite engine
    • Sprite collision detection
    • Sprite overlays
    • Starfield
    • Performance metrics
  • Animators
    • Player thrust
    • Player roll
    • Explosion animations
  • Audio
    • Sound effects engine
    • Music engine
    • Disable audio for remote connections
  • Title screen engine
    • Main screen artwork
    • Game over artwork
    • Victory artwork
  • Enemies
    • Fighters
    • Hunter Fighter AI
    • Sniper Fighter AI
    • Boss ships
    • Boss ship AI
  • Power ups
    • Bonus points
    • Weapon upgrades
    • Shields
    • Smartbomb
    • Extra life
  • Level progression
    • Number of enemies rises
    • Enemy firepower increases
    • Enemy speed increases
    • Bonus spawn rate decreases
    • Bonus value increases
    • Canyon levels, narrow playable area
    • Level progression announcements
    • Level-up skill points
  • 2P
    • Local
    • Network
  • Title screen attract mode
    • High score
    • Configuration
    • Credits
  • Install
    • Script
    • PPA
    • Snap

Title Screens

The title graphics are using toilet and lolcat via tools/render-titles.sh. You can preview of all the toilet font styles using this:

for FONT in /usr/share/figlet/*.tlf; do echo $(basename $FONT) && toilet -t -f $(basename $FONT) --filter border "Antsy Alien Attack!" | lolcat -f -F 0.2; done

Game Assets

I found music and sound effects on Open Game Art. I ended up using Creative Commons licensed music from Patrick de Arteaga and sound effects from Kenney Vleugels and Viktor Hahn.

Fonts

Terminal fonts

ANSI & ASCII

Editors

Learnings

  • subshells and traps.
  • case is twice as fast as if, elif, else, fi.
  • echo -e is faster than tput and tput is faster that printf.
  • Arithmetic comparison are faster than tests
    • For example if ((HUNT_P1 == 1)); then is faster than if [ ${HUNT_P1} -eq 1]; then
  • Bash has C style loops
    • Like this for (( FIGHTER_LOOP=0; FIGHTER_LOOP < TOTAL_FIGHTERS; FIGHTER_LOOP++ )); do
  • I never knew about ((TOTAL_STARS++)) or ((TOTAL_STARS+=5)) or ((TOTAL_STARS+=MORE_STARS))
  • Px437 IBM VGA Regular at 16px is best font.

Slides from a presentation I gave at FOSS Talk Live 2019 as part of the Ubuntu Podcast live show are also available:

More Repositories

1

deb-get

apt-get for .debs published via GitHub or direct download 📦
Shell
1,186
star
2

desktopify

Convert Ubuntu Server for Raspberry Pi into a Desktop
Shell
521
star
3

rolling-rhino

Rolling Rhino; convert Ubuntu into a rolling release. As seen on YouTube 📺
Shell
432
star
4

nix-config

Wimpy's NixOS & Home Manager Configurations ❄️
Nix
270
star
5

umpc-ubuntu

Scripts for UMPCs such as GPD Pocket, Pocket 2, MicroPC & TopJoy Falcon
Shell
194
star
6

retro-home

Retro Home; your home for retro-gaming 🕹
Shell
105
star
7

obs-studio-portable

Portable OBS Studio for Ubuntu bundled with 50 plugins
Shell
77
star
8

argon1-ubuntu

Argon 1 Case and Argon Fan HAT controller for Ubuntu
Shell
64
star
9

obs-fully-loaded

OBS Studio, fully-loaded, for Ubuntu
Shell
56
star
10

little-spy

Airdrop into an enemy stronghold, recover stolen intelligence and technology. Fight your way out! 🎮
GDScript
39
star
11

ia-get

File downloader for archive.org ⬇️
Rust
34
star
12

machinespawn

Wrapper for machinectl and systemd-nspawn for creating containers
Shell
18
star
13

redirect-livechat

A simple Python 🐍 server that redirects to a YouTube 📺 channel's most recent live chat 💬 URL
Python
16
star
14

trackmania-2020-ubuntu

Ubuntu Install & Launcher script for TrackMania 2020 🏁🏎
Shell
11
star
15

ubuntu-pi-image

Raspberry Pi 🥧 image creator for Ubuntu MATE 🧉
Shell
8
star
16

antsy-alien-attack-pico

The year is 2139. Planet Earth is under attack by aliens, and they're (still) antsy! 👾🛸💥
HTML
6
star
17

obs-studio-flaking-loaded

OBS Studio for NixOS ❄️ that bundles an extensive collection of 3rd party plugins
5
star
18

kruiz-control-triggers

Kruiz Control 🎛️ Triggers for Twitch Chatbot, OBS Studio Automation & DecAPI
HTML
3
star
19

obs-dvd-screensaver

DVD screen saver for OBS Studio 📀
CMake
1
star
20

obs-rgb-levels

RGB levels plugin for OBS Studio 🎚️🌈
CMake
1
star