{"id":13596086,"url":"https://github.com/wimpysworld/antsy-alien-attack","last_synced_at":"2025-04-26T10:31:33.358Z","repository":{"id":41980561,"uuid":"187995524","full_name":"wimpysworld/antsy-alien-attack","owner":"wimpysworld","description":"A game, written in Bash, that is a somewhat retro-a-like shoot 'em up. Hopefully.","archived":false,"fork":false,"pushed_at":"2023-05-17T07:54:35.000Z","size":46573,"stargazers_count":106,"open_issues_count":2,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-04T11:47:02.754Z","etag":null,"topics":["ansi","bash","game"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wimpysworld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-05-22T08:25:34.000Z","updated_at":"2025-02-28T21:56:23.000Z","dependencies_parsed_at":"2024-01-16T22:35:12.037Z","dependency_job_id":null,"html_url":"https://github.com/wimpysworld/antsy-alien-attack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wimpysworld%2Fantsy-alien-attack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wimpysworld%2Fantsy-alien-attack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wimpysworld%2Fantsy-alien-attack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wimpysworld%2Fantsy-alien-attack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wimpysworld","download_url":"https://codeload.github.com/wimpysworld/antsy-alien-attack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250972855,"owners_count":21516432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansi","bash","game"],"created_at":"2024-08-01T16:02:07.663Z","updated_at":"2025-04-26T10:31:28.348Z","avatar_url":"https://github.com/wimpysworld.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"img/avatar.png\" width=\"128\" height=\"128\" alt=\"Antsy Alien Attack!\"\u003e\n  \u003cbr /\u003e\n  Antsy Alien Attack!\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\u003cb\u003eA game, written in Bash, that is a somewhat retro-a-like shoot 'em up. Hopefully.\u003c/b\u003e\u003c/p\u003e\n\n![Antsy Alien Attack!](img/title.png?raw=true)\n\n\u003cp align=\"center\"\u003eMade with 💝 for \u003cimg src=\"https://raw.githubusercontent.com/anythingcodes/slack-emoji-for-techies/gh-pages/emoji/tux.png\" align=\"top\" width=\"24\" /\u003e\u003c/p\u003e\n\n## Building, Testing, and Installation\n\n### Ubuntu\n\nYou'll need the following dependencies:\n\n  * `coreutils` for `stty`\n  * [`joy2key`](https://sourceforge.net/projects/joy2key/) *(optional)*\n  * `lolcat`\n  * `mpg123`\n  * `ncurses-bin`\n  * `procps`\n  * `vorbis-tools`\n\n```bash\nsudo apt install coreutils lolcat mpg123 ncurses-bin procps vorbis-tools\n```\n\nOr with Nix:\n\n```\nnix shell nixpkgs#lolcat nixpkgs#mpg123 nixpkgs#ncurses nixpkgs#procps nixpkgs#vorbis-tools --command ./aaa.sh\n```\n\nExecute `./aaa.sh` to run the game.\n\n```bash\n./aaa.sh\n```\n\n## XBox controller support\n\nThis step is optional.\n\n```\nsudo apt install libx11-dev x11-utils\nwget -c http://sourceforge.net/projects/joy2key/files/joy2key/1.6.3/joy2key-1.6.3.tar.bz2\nwget -c http://sourceforge.net/p/joy2key/patches/_discuss/thread/e73f20a1/33d7/attachment/button_list_segfault.patch\ntar xvf joy2key-1.6.3.tar.bz2\npatch -p0 -i ../button_list_segfault.patch\ncd joy2key-1.6.3\n./configure --prefix=/usr/local\nmake\nsudo make install\n```\n\n## Steam Controller\n\nPlayer 1 and Player 2 control profiles for [sc-controller](https://github.com/kozec/sc-controller) can be found in the `cfg/` directory.\n\n   * `Antsy Alien Attack - P1.sccprofile`\n   * `Antsy Alien Attack - P2.sccprofile`\n\n## Plans\n\n  - [x] Tick\n    - [x] Hardware interrupt trap to govern the game loop via a subshell.\n  - [x] Input handler\n    - [x] Keyboard\n    - [x] Xbox360 Controller\n  - [x] Graphics\n    - [x] Framebuffer\n    - [x] Sprite engine\n    - [x] Sprite collision detection\n    - [X] Sprite overlays\n    - [x] Starfield\n    - [x] Performance metrics\n  - [x] Animators\n    - [x] Player thrust\n    - [ ] Player roll\n    - [x] Explosion animations\n  - [x] Audio\n    - [x] Sound effects engine\n    - [x] Music engine\n    - [x] Disable audio for remote connections\n  - [x] Title screen engine\n    - [x] Main screen artwork\n    - [x] Game over artwork\n    - [x] Victory artwork\n  - [x] Enemies\n    - [x] Fighters\n    - [x] Hunter Fighter AI\n    - [x] Sniper Fighter AI\n    - [x] Boss ships\n    - [x] Boss ship AI\n  - [x] Power ups\n    - [x] Bonus points\n    - [x] Weapon upgrades\n    - [x] Shields\n    - [x] Smartbomb\n    - [x] Extra life\n  - [x] Level progression\n    - [x] Number of enemies rises\n    - [x] Enemy firepower increases\n    - [x] Enemy speed increases\n    - [x] Bonus spawn rate decreases\n    - [x] Bonus value increases\n    - [ ] Canyon levels, narrow playable area\n    - [x] Level progression announcements\n    - [x] Level-up skill points\n  - [x] 2P\n    - [x] Local\n    - [ ] Network\n  - [x] Title screen attract mode\n    - [x] High score\n    - [x] Configuration\n    - [x] Credits\n  - [ ] Install\n    - [x] Script\n    - [ ] PPA\n    - [ ] Snap\n\n\n## Title Screens\n\nThe title graphics are using `toilet` and `lolcat` via [tools/render-titles.sh](tools/render-titles.sh).\nYou can preview of all the `toilet` font styles using this:\n\n```\nfor FONT in /usr/share/figlet/*.tlf; do echo $(basename $FONT) \u0026\u0026 toilet -t -f $(basename $FONT) --filter border \"Antsy Alien Attack!\" | lolcat -f -F 0.2; done\n```\n\n## Game Assets\n\nI found music and sound effects on [Open Game Art](https://opengameart.org).\nI ended up using Creative Commons licensed music from [Patrick de Arteaga](https://patrickdearteaga.com)\nand sound effects from [Kenney Vleugels](http://www.kenney.nl) and Viktor Hahn.\n\n## Fonts\n\n### Terminal fonts\n\n  * https://int10h.org/oldschool-pc-fonts/\n  * http://www.fixedsysexcelsior.com/\n  * https://github.com/ansilove/BlockZone\n\n## ANSI \u0026 ASCII\n\n  * https://shiroyasha.svbtle.com/escape-sequences-a-quick-guide-1\n  * [Code page 437)](https://en.wikipedia.org/wiki/Code_page_437)\n  * [ASCII table , ascii codes](https://theasciicode.com.ar/)\n\n### Editors\n\n  * http://bruxy.regnet.cz/web/linux/EN/ansi-art-sh-paint/\n  * http://picoe.ca/products/pablodraw/\n  * http://tetradraw.sourceforge.net/\n  * https://sourceforge.net/projects/tundradraw/\n  * https://sourceforge.net/projects/mysticdraw/\n  * http://syncdraw.bbsdev.net/\n  * https://www.gridsagegames.com/rexpaint/index.html\n\n## Learnings\n\n  * subshells and traps.\n  * `case` is twice as fast as `if`, `elif`, `else`, `fi`.\n  * `echo -e` is faster than `tput` and `tput` is faster that `printf`.\n  * Arithmetic comparison are faster than tests\n    * For example `if ((HUNT_P1 == 1)); then` is faster than `if [ ${HUNT_P1} -eq 1]; then`\n  * Bash has C style loops\n    * Like this `for (( FIGHTER_LOOP=0; FIGHTER_LOOP \u003c TOTAL_FIGHTERS; FIGHTER_LOOP++ )); do`\n  * I never knew about `((TOTAL_STARS++))` or `((TOTAL_STARS+=5))` or `((TOTAL_STARS+=MORE_STARS))`\n  * Px437 IBM VGA Regular at 16px is best font.\n\nSlides from a presentation I gave at [FOSS Talk Live](https://fosstalk.com/) 2019 as part of the [Ubuntu Podcast](https://ubuntupodcast.org) live show are also available:\n\n  * [fosstalklive-2019-06.odp](slides/fosstalklive-2019-06.odp)\n  * [fosstalklive-2019-06.pdf](slides/fosstalklive-2019-06.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwimpysworld%2Fantsy-alien-attack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwimpysworld%2Fantsy-alien-attack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwimpysworld%2Fantsy-alien-attack/lists"}