Coder Social home page Coder Social logo

tetrominoes-rust's Introduction

Tetrominoes

Basic Tetris clone written in Rust using the ggez game framework.

A rewrite of my older Tetrominoes project, that used LOVE2D and Moonscript.

In order to play, clone the project and run cargo run in the root directory. Use left/right to move the pieces, down to make the pieces fall faster, space to drop the current piece, and up to rotate the piece counter-clockwise.

tetrominoes-rust's People

Contributors

avandolder avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tetrominoes-rust's Issues

issue on cargo run

this is what issue showed up:

    Finished dev [optimized + debuginfo] target(s) in 0.14s
     Running `target/debug/tetrominoes`
thread 'main' panicked at 'attempted to leave type `std::mem::ManuallyDrop<xlib::Xlib>` uninitialized, which is invalid', /build/rust/src/rustc-1.52.1-src/library/core/src/mem/mod.rs:660:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

and this is the issue with a rust backtrace:

    Finished dev [optimized + debuginfo] target(s) in 0.14s
     Running `target/debug/tetrominoes`
thread 'main' panicked at 'attempted to leave type `std::mem::ManuallyDrop<xlib::Xlib>` uninitialized, which is invalid', /build/rust/src/rustc-1.52.1-src/library/core/src/mem/mod.rs:660:9
stack backtrace:
   0: rust_begin_unwind
             at /build/rust/src/rustc-1.52.1-src/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /build/rust/src/rustc-1.52.1-src/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /build/rust/src/rustc-1.52.1-src/library/core/src/panicking.rs:50:5
   3: core::mem::uninitialized
             at /build/rust/src/rustc-1.52.1-src/library/core/src/mem/mod.rs:660:9
   4: x11_dl::xlib::Xlib::open
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/x11-dl-2.18.3/src/link.rs:59:17
   5: winit::platform::platform::x11::xdisplay::XConnection::new
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.2/src/platform/linux/x11/xdisplay.rs:34:20
   6: <winit::platform::platform::X11_BACKEND as core::ops::deref::Deref>::deref::__static_ref_initialize
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.2/src/platform/linux/mod.rs:54:20
   7: core::ops::function::FnOnce::call_once
             at /build/rust/src/rustc-1.52.1-src/library/core/src/ops/function.rs:227:5
   8: lazy_static::lazy::Lazy<T>::get::{{closure}}
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.3.0/src/inline_lazy.rs:28:29
   9: std::sync::once::Once::call_once::{{closure}}
             at /build/rust/src/rustc-1.52.1-src/library/std/src/sync/once.rs:261:41
  10: std::sync::once::Once::call_inner
             at /build/rust/src/rustc-1.52.1-src/library/std/src/sync/once.rs:418:21
  11: std::sync::once::Once::call_once
             at /build/rust/src/rustc-1.52.1-src/library/std/src/sync/once.rs:261:9
  12: lazy_static::lazy::Lazy<T>::get
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.3.0/src/inline_lazy.rs:27:9
  13: <winit::platform::platform::X11_BACKEND as core::ops::deref::Deref>::deref::__stability
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.3.0/src/lib.rs:138:21
  14: <winit::platform::platform::X11_BACKEND as core::ops::deref::Deref>::deref
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.3.0/src/lib.rs:140:17
  15: winit::platform::platform::EventsLoop::new_x11
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.2/src/platform/linux/mod.rs:468:9
  16: winit::platform::platform::EventsLoop::new
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.2/src/platform/linux/mod.rs:449:29
  17: winit::EventsLoop::new
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.2/src/lib.rs:250:26
  18: ggez::context::Context::from_conf
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/ggez-0.5.1/src/context.rs:85:27
  19: ggez::context::ContextBuilder::build
             at /home/bachittle/.cargo/registry/src/github.com-1ecc6299db9ec823/ggez-0.5.1/src/context.rs:304:9
  20: tetrominoes::main
             at ./src/main.rs:54:34
  21: core::ops::function::FnOnce::call_once
             at /build/rust/src/rustc-1.52.1-src/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.