- Rust 97.9%
- GLSL 1.8%
- Shell 0.2%
| assets | Fixed clippy warnings | |
| configs | Removed portals and effect zones | |
| data | Removed awkward exception from license | |
| dist/flatpak | Security fixes | |
| docs | Security fixes | |
| egui_glium | Using correct background colour | |
| scripts | Removed portals and effect zones | |
| src | More immediate changes | |
| .gitignore | Supporting multiple levels | |
| build.rs | Hello, World! | |
| Cargo.lock | Security fixes | |
| Cargo.toml |
Improved PlayerId management
|
|
| clippy.toml | Hello, World! | |
| deny.toml | Removed awkward exception from license | |
| LICENSE | Hello, World! | |
| README.md | Updated description | |
Spaceships
Spaceships is a free/libre space-themed shooter game written in Rust. In this game you are a spaceship that you can move around with the keyboard and shoot other spaceships to destroy them. Spaceships was originally created to support multiplayer, but has been extended to support singleplayer with a story mode that includes five levels.
The goal of the game in singleplayer to destroy all bot players to complete the level. In multiplayer the goal depends on the server configuration, which might be getting as many kills as possible, surviving the longest or capturing the most flags. See the documentation for more details.
Links
- Website: https://spaceships.me/
- Download: https://spaceships.me/download/
- Documentation: https://spaceships.me/docs/
- Source code: https://codeberg.org/rustydev/spaceships
- Blog: https://spaceships.me/blog/
- Development: https://spaceships.me/blog/dev/
- Videos: https://spaceships.me/blog/videos/
- Security: https://spaceships.me/blog/security/
- Matrix: #spaceships:matrix.spaceships.me
- Chat: #chat:matrix.spaceships.me
- Help and support: #help:matrix.spaceships.me
Screenshots
Red player shooting at blue player.
Orange player shooting at green player that has forcefield, with the bullets deflecting.
White player exploring with custom sky preset (Galaxy) shown.
Installation
This game is available on both Linux (including Flatpak) and Windows. It might also be possible to compile to macOS but I haven't yet tested it. Go to https://spaceships.me/download to download a copy or get instructions to getting the Flatpak. You can also build from source.
Building from source
Here are the steps necessary to build Spaceships.
- Checkout the correct version. If you're cloning the repository, the most recent commit on the
mainbranch is likely a development version. If you want to build from a stable release version, make sure you first checkout the tag of the version (example,v1.4.3) you want to build. - Download the latest version of Rust. If you're using Arch Linux (or any other cutting edge Linux distro), I recommend installing Rust through your distribution's package manager. If not, I recommend instead using installing Rust through
rustup, which allows updating to the latest version by runningrustup update. - Build the assets. All textures and sound effects in Spaceships are either procedurally generated or rasterised from vector graphics. This requires Inkscape to be installed and probably won't work on Windows. Build the assets by running
cargo run --releasein theassets/directory. If you want to skip this step, you can instead download a binary release of this game and copy overtextures/,sounds/andexplosionsfrom thedata/directory. - Build the game. Now build the game by running
cargo build --release. This will take a few minutes when compiling for the first time! Now you can play the game by running./target/release/spaceships.
TL;DR: Install Inkscape, the latest version of Rust and run the following:
cd assets
cargo run --release
cd ..
cargo build --release
Cargo features
client(default): This builds the game client as well as the game server. If you want to create a server-only build (which can save disk space if you're just interested in running a server), disable this feature by runningcargo build --release --no-default-featuresat step 4. If you do disable this feature, you can skip the previous step of building the assets during compilation.standalone: This is disabled by default but is enabled when building standalone releases. When this flag is set, the path to thedata/directory (which stores all assets used by the client) is based on the path of the Spaceships executable. This makes it convenient to play the game as a regular user as you don't need to worry about the current working directory being correct. However this is annoying during development as the binary is located intarget/debug/ortarget/release/, which would expect thedata/directory to be in this target directory, so it is disabled by default. To build using this flag, runcargo build --release -F standalonewhen at step 4.flatpak: This configures Flatpak builds to load files from/app/data,$XDG_CONFIG_HOMEand$XDG_DATA_HOME.
Licensing and contributing
Spaceships is free software, released under the GNU AGPLv3 license (but not at any later versions). If you contribute to this project, you own the copyright of your changes but you must release your work under the GNU AGPLv3 or another compatible software license.
The contents of the GNU AGPLv3 license is provided in the attached LICENSE file and also available online.
Fonts used
This game uses the Inter (stored at data/fonts/inter.otf) and Press Start 2P (stored at data/fonts/press_start_2p.ttf), both of which are released under the SIL Open Font License version 1.1. The license and copyright details are available in data/fonts/inter.otf.license and data/fonts/press_start_2p.ttf.license for the respective fonts. The exact variant of Inter used is Inter-Medium.otf modified with the tnum feature to be enabled (fixed width for all numbers). This is achieved by running pyftfeatfreeze -f tnum old.otf new.otf.
Dependencies
All dependencies are licensed under a license that is compatible with the GNU AGPLv3. The cargo deny Cargo plugin automatically checks this when running cargo deny check licenses.
Forking
If you're forking this project, please modify the details in Cargo.toml to allow users requesting information about the server (see the "Requesting server info" section for more information) to know where to obtain a copy of the source code.