Giter VIP home page Giter VIP logo

rust-gravity-worm-ii's Introduction

rust-gravity-worm-ii Build Status

A Gravity Worm clone written in Rust, using the Piston game engine. This is my first experiment with Piston, so there are a few issues. Notably, there's no text in the user interface!

Screenshot of Game

Building Instructions

I build against rust nightlies. Give me a shout (submit an issue) if it doesn't build and I'll fix it ASAP.

Currently the only non-rust dependency is SDL2. You can install it via your system's package manager:

Ubuntu/Debian: sudo apt-get install libsdl2-dev Mac OS: brew install sdl2 Windows: echo "?"

In a terminal, navigate to the project directory and type:

cargo run --release

License

Licensed under the GPL v3.

rust-gravity-worm-ii's People

Contributors

alexchandel avatar bvssvni avatar golergka avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rust-gravity-worm-ii's Issues

Can't build -- extern crate debug not found

github/rust-gravity-worm-ii - [master] » cargo run --release
   Compiling gfx_macros v0.1.0 (https://github.com/gfx-rs/gfx-rs.git#f8ec387c)
   Compiling input v0.0.0 (https://github.com/PistonDevelopers/input#17ca9c4a)
   Compiling rust-xml v0.1.0 (https://github.com/netvl/rust-xml#f86f02b3)
   Compiling image v0.0.0 (https://github.com/pistondevelopers/image#a69748ee)
   Compiling sdl2 v0.0.1-alpha.1 (https://github.com/AngryLawyer/rust-sdl2.git#99c95bd8)
   Compiling genmesh v0.1.0 (https://github.com/csherratt/genmesh.git#8fc06420)
   Compiling graphics v0.0.0 (https://github.com/pistondevelopers/graphics#e68d7c09)
src/lib.rs:31:1: 31:20 error: can't find crate for `debug`
src/lib.rs:31 extern crate debug;
              ^~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Build failed, waiting for other jobs to finish...

OSX Yosemite 10.10

Built against the latest nightly.

Couldn't build: library not found for -lSDL2

Here's full cargo output:

~/P/r/rust-gravity-worm-ii> cargo run --release --verbose
       Fresh rust-xml v0.1.0 (https://github.com/netvl/rust-xml#f86f02b3)
       Fresh genmesh v0.1.0 (https://github.com/csherratt/genmesh.git#8fc06420)
       Fresh vecmath v0.0.0 (https://github.com/PistonDevelopers/vecmath#fb14c586)
       Fresh input v0.0.0 (https://github.com/PistonDevelopers/input#17ca9c4a)
       Fresh gfx_macros v0.1.0 (https://github.com/gfx-rs/gfx-rs.git#f8ec387c)
       Fresh khronos_api v0.0.1 (https://github.com/bjz/gl-rs.git#feed7be3)
       Fresh shader_version v0.0.0 (https://github.com/pistondevelopers/shader_version#c561d15e)
       Fresh uuid v0.0.1 (https://github.com/rust-lang/uuid#c6159089)
       Fresh sdl2 v0.0.1-alpha.1 (https://github.com/AngryLawyer/rust-sdl2.git#99c95bd8)
       Fresh image v0.0.0 (https://github.com/pistondevelopers/image#a69748ee)
       Fresh noise-rs v0.0.1 (https://github.com/bjz/noise-rs#efd71253)
       Fresh graphics v0.0.0 (https://github.com/pistondevelopers/graphics#e68d7c09)
       Fresh cam v0.0.0 (https://github.com/pistondevelopers/cam#82a20187)
       Fresh event v0.0.0 (https://github.com/pistondevelopers/event#5645d655)
       Fresh gl_generator v0.0.1 (https://github.com/bjz/gl-rs.git#feed7be3)
       Fresh sprite v0.0.0 (https://github.com/pistondevelopers/sprite#c85d22e6)
       Fresh gl v0.0.1 (https://github.com/bjz/gl-rs.git#feed7be3)
       Fresh gfx_gl v0.1.0 (https://github.com/gfx-rs/gfx_gl.git#52bb510e)
       Fresh device v0.1.0 (https://github.com/gfx-rs/gfx-rs.git#f8ec387c)
       Fresh sdl2_game_window v0.0.0 (https://github.com/PistonDevelopers/sdl2_game_window.git#6fac008a)
       Fresh piston v0.0.0 (https://github.com/pistondevelopers/piston.git#8bd0f9df)
       Fresh render v0.1.0 (https://github.com/gfx-rs/gfx-rs.git#f8ec387c)
       Fresh gfx v0.1.0 (https://github.com/gfx-rs/gfx-rs.git#f8ec387c)
       Fresh gfx_graphics v0.0.0 (https://github.com/PistonDevelopers/gfx_graphics.git#94b20ef4)
   Compiling rust-gravity-worm-ii v0.0.1 (file:///Users/golergka/Projects/rust/rust-gravity-worm-ii)
     Running `rustc /Users/golergka/Projects/rust/rust-gravity-worm-ii/src/main.rs --crate-name rust-gravity-worm-ii --crate-type bin --opt-level 3 --cfg ndebug --out-dir /Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release --dep-info /Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/.fingerprint/rust-gravity-worm-ii-66444b73459698a5/dep-bin-rust-gravity-worm-ii -L /Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release -L /Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps --extern sdl2_game_window=/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libsdl2_game_window-f4a015bf3a0bdf5c.rlib --extern gfx_graphics=/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libgfx_graphics-3d10fdf2a588973f.rlib --extern sdl2=/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libsdl2-cc0f4201ff9feba0.rlib --extern gfx=/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libgfx-fc4b15dac9046bd1.rlib --extern piston=/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libpiston-84163e5ca344ca3d.rlib`
error: linking with `cc` failed: exit code: 1
note: cc '-m64' '-L' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib' '-o' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/rust-gravity-worm-ii' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/rust-gravity-worm-ii.o' '-Wl,-force_load,/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libmorestack.a' '-nodefaultlibs' '-fno-lto' '-Wl,-dead_strip' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libsdl2_game_window-f4a015bf3a0bdf5c.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libsdl2-cc0f4201ff9feba0.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libgfx_graphics-3d10fdf2a588973f.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libgfx-fc4b15dac9046bd1.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libpiston-84163e5ca344ca3d.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libimage-f1911951e4fc0ac6.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libshader_version-be2bb9fb7463fbbb.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libcam-690682aee8e5181f.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libgenmesh-a18b660d2bef5904.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libdebug-4e7c5e5c.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libsprite-a466b0ed80d3339d.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libuuid-56731db3b6427479.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libgraphics-97cf825a272bee12.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libvecmath-cb72b1b0b9fb4b3e.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libevent-037aa9aff5b1d4c8.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libtime-4e7c5e5c.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libinput-0f8d5acb58e11f21.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libnoise-49e079138a931886.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/librender-f5001d138512a2a1.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libdevice-90ea174d3da6debc.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libgfx_gl-e2d853d1b7f011b0.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libserialize-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblog-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libregex-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libflate-4e7c5e5c.rlib' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libgl-bb78cdc3bae0f4e0.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libnative-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libstd-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librand-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libsync-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustrt-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcollections-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libunicode-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liballoc-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblibc-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcore-4e7c5e5c.rlib' '-L' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release' '-L' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps' '-L' '/Users/golergka/Projects/rust/rust-gravity-worm-ii/.rust' '-L' '/Users/golergka/Projects/rust/rust-gravity-worm-ii' '-lSDL2' '-lSystem' '-lpthread' '-lc' '-lm' '-lcompiler-rt'
note: ld: warning: directory not found for option '-L/Users/golergka/Projects/rust/rust-gravity-worm-ii/.rust'
ld: library not found for -lSDL2
clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error
Could not compile `rust-gravity-worm-ii`.

Caused by:
  Process didn't exit successfully: `rustc /Users/golergka/Projects/rust/rust-gravity-worm-ii/src/main.rs --crate-name rust-gravity-worm-ii --crate-type bin --opt-level 3 --cfg ndebug --out-dir /Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release --dep-info /Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/.fingerprint/rust-gravity-worm-ii-66444b73459698a5/dep-bin-rust-gravity-worm-ii -L /Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release -L /Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps --extern sdl2_game_window=/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libsdl2_game_window-f4a015bf3a0bdf5c.rlib --extern gfx_graphics=/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libgfx_graphics-3d10fdf2a588973f.rlib --extern sdl2=/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libsdl2-cc0f4201ff9feba0.rlib --extern gfx=/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libgfx-fc4b15dac9046bd1.rlib --extern piston=/Users/golergka/Projects/rust/rust-gravity-worm-ii/target/release/deps/libpiston-84163e5ca344ca3d.rlib` (status=101)

However, I installed the library, as instructed in README file:

~/P/r/rust-gravity-worm-ii> brew list | grep sdl2
sdl2

Can't build - no package named 'sdl2_game-window' found

cargo run --release
Updating git repository https://github.com/pistondevelopers/piston.git
Updating git repository https://github.com/PistonDevelopers/sdl2_game_window.git
Updating git repository https://github.com/gfx-rs/gfx-rs.git
Updating git repository https://github.com/AngryLawyer/rust-sdl2.git
Updating git repository https://github.com/PistonDevelopers/gfx_graphics.git
no package named sdl2_game_window found (required by rust-gravity-worm-ii)
location searched: https://github.com/PistonDevelopers/sdl2_game_window.git
version required: *

I'm running on Ubuntu 14.04,
rustc 0.13.0-dev (f03745244 2014-10-26 16:42:33 +0000)
sdl2-config --version is 2.0.2

Please let me know if I can provide any more useful information, I'm very new to Rust.

Thanks

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.