MCPcopy Index your code
hub / github.com/CleanCut/invaders

github.com/CleanCut/invaders @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
46 symbols 75 edges 10 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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. 💖

Extension points exported contracts — how you extend this code

Drawable (Interface)
(no doc) [6 implementers]
src/frame.rs

Core symbols most depended-on inside this repo

increment_level
called by 4
src/level.rs
update
called by 2
src/shot.rs
draw
called by 2
src/shot.rs
reset_game
called by 2
src/main.rs
render
called by 2
src/render.rs
change_option
called by 2
src/menu.rs
new_frame
called by 2
src/frame.rs
explode
called by 1
src/shot.rs

Shape

Method 31
Class 7
Function 7
Interface 1

Languages

Rust100%

Modules by API surface

src/player.rs9 symbols
src/invaders.rs9 symbols
src/level.rs7 symbols
src/shot.rs6 symbols
src/menu.rs5 symbols
src/score.rs4 symbols
src/main.rs3 symbols
src/frame.rs2 symbols
src/render.rs1 symbols

For agents

$ claude mcp add invaders \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact