GithubHelp home page GithubHelp logo

rust-belt's Introduction

Rust Belt

Build Status
Travis Travis Build Status
AppVeyor AppVeyor Build Status

GitHub Releases

rust-belt is a 2D video game featuring an original soundtrack ๐ŸŽผ inspired by the classic Asteroids arcade game. It is implemented using the Rust game engine, Piston.

Requirements

Prerequisites

  1. The latest stable release of Rust.

    1. Install rustup.
  2. rust-belt uses piston-music to play music. piston-music depends on two third-party non-Rust libraries, SDL2 and SDL2_mixer. Install instructions are provided below.

Windows

Select to proceed with either the MSVC or GNU toolchain.

MSVC (Recommended)

  1. Ensure you are using the latest stable 64-bit MVSC toolchain with rustup show (stable-x86_64-pc-windows-msvc).
  2. Ensure you have installed the Visual C++ Build Tools (as recommended by rustup during install). (e.g. C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe).
  3. Download the latest SDL2 MSVC development library (SDL2-devel-2.0.x-VC.zip).
  4. Unpack and copy all .lib files from SDL2-devel-2.0.x-VC\SDL2-2.0.x\lib\x64\ into a folder. If the LIB system environment variable does not exist, create it. Add that folder path to LIB.
  5. Copy SDL2.dll into the rust-belt project folder, next to Cargo.toml.
  6. Download the latest SDL2_mixer MSVC development library (SDL2_mixer-devel-2.0.x-VC.zip).
  7. Unpack and copy all .lib files from SDL2_mixer-devel-2.0.x-VC\SDL2_mixer-2.0.x\lib\x64 into the same folder added in step 4 that was added to the LIB system environment variable.
  8. Copy SDL2_mixer.dll and smpeg2.dll into the rust-belt project folder, next to Cargo.toml.

GNU/MinGW-w64

  1. Ensure you using the latest stable 64-bit GNU ABI toolchain with rustup show (stable-x86_64-pc-windows-gnu).
  2. Install MSYS2.
  3. In an MSYS2 terminal: pacman --sync mingw-w64-x86_64-gcc
  4. Add C:\msys64\mingw64\bin to system PATH.
  5. Download the latest SDL2 MinGW development library (SDL2-devel-2.0.x-mingw.tar.gz).
  6. Unpack and copy all .lib files from SDL2-devel-2.0.x-mingw\SDL2-2.0.x\x86_64-w64-mingw32\lib into a folder. If the LIBRARY_PATH system environment variable does not exist, create it. Add that folder to LIBRARY_PATH.
  7. Copy SDL2.dll into the rust-belt project folder, next to Cargo.toml.
  8. Download the latest SDL2_mixer MinGW development library (SDL2_mixer-devel-2.0.x-mingw.tar.gz).
  9. Unpack and copy all .lib files from SDL2_mixer-devel-2.0.x-mingw\SDL2_mixer-2.0.x\x86_64-w64-mingw32\lib\ into the same folder added in step 6 that was added to the LIB system environment variable.
  10. Copy SDL2_mixer.dll and smpeg2.dll into the rust-belt project folder, next to Cargo.toml.

Mac OSX

  1. Install Homebrew (by default this will install gcc via Xcode development tools).
  2. brew install sdl2
  3. brew install sdl2_mixer --with-flac --with-fluid-synth --with-libmikmod --with-libmodplug --with-libvorbis --with-smpeg2

Ubuntu

  1. sudo apt install libsdl2-dev libsdl2-mixer-dev

Build and Run

To build:

$ cargo build

To run:

$ cargo run --release

How to Play

Keyboard Menu Game
W Up Accelerate Forward
S Down Accelerate Backward
A Rotate left
D Rotate right
Space Select Shoot
X Return to Menu
Esc Exit Exit

Maintainers

Special thanks to @aochagavia for rocket, which provided many examples to pull from.

Music

Music composed by @johnthagen. All rights reserved.

Sound from freesound.org.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.