Rocket is a little game written in Rust, using the Rust-SFML library.
You play as a little square that can change colors. The goal is to avoid the platforms that have a color different to your current one. Passing through a platform with the same color as you will give you points. As time progresses, you go faster and faster, making things more difficult.
Button | Action |
---|---|
Left Click | Cycle player color to the left |
Right Click | Cycle player color to the right |
Space | Dash |
R | Restart the game |
Move mouse left/right | Move the player left/right on the horizontal axis |
Esc | Pause/unpause the game |
Grab the latest stable release from https://github.com/zakkor/rust-sfml-rocket/releases
You will need to install the SFML 2.3.x and CSFML 2.3 libraries to be able to build.
On Ubuntu 14.04 at least, using the precompiled versions of the libraries from www.sfml-dev.org will cause a runtime error, so you will need to build them yourself.
I have added a simple bash script to download, build, and install both SFML-2.3.2 and CSFML-2.3 from source.
git clone https://github.com/zakkor/rust-sfml-rocket
sudo apt-get install libpthread-stubs0-dev libgl1-mesa-dev libx11-dev libx11-xcb-dev libxcb-image0-dev libxrandr-dev libxcb-randr0-dev libudev-dev libfreetype6-dev libglew-dev libjpeg8-dev libgpgme11-dev libsndfile1-dev libopenal-dev libjpeg62 cmake
These are the Ubuntu packages, if you're not on an Ubuntu-based distro, install the equivalent packages.
cd rust-sfml-rocket/install_deps
Open up install_deps.sh
with your favorite editor, find the line that says 'Replace this path', and replace the path with the ABSOLUTE path to the install_deps directory.
In my case, the full path is /home/ed/Programs/rust-sfml-rocket/install_deps/CSFML-2.3/cmake/Modules
This will install both SFML and CSFML to /usr/local
.
If your distro does not use this directory structure, edit install_deps.sh
and modify the sudo make install
lines to sudo make DESTDIR="/your/path" install
.
sudo bash install_deps.sh
You should be all good to go!
Go back to the root dir: cd ..
Run the game: cargo run
After cargo is done downloading and compiling dependencies, it will compile and run the game.
I recommend using Homebrew.
Get SFML and CSFML:
brew install sfml csfml
git clone https://github.com/zakkor/rust-sfml-rocket
cd rust-sfml-rocket
cargo run
That's it!