Coder Social home page Coder Social logo

rsnake's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rsnake's Issues

Only one digit showing up in score counter

Hello,

I ran the project and noticed that the score counter in the top-left corner is always 0. It wouldn't increment, but I see it getting slightly displaced to the right when it should increment.
I tried to change the string to be displayed in the main class to "foo" and it would only print out the "f", i.e. the first char.

I'm not sure if this is a platform dependent bug, I'm using macOS Ventura 13.3.1 (ARM) with rustc 1.69.0 (84c898d65 2023-04-16)

Thank you for the cool project :)

thread 'main' panicked at 'attempted to leave type `std::mem::ManuallyDrop<xlib::Xlib>` uninitialized, which is invalid'

I'm new to Rust development and thought that modifying snake would be a nice starting project.

Just cloned repo, downloaded dependencies, built it and tried to run. There wasn't any error on cargo run and cargo build --release, only a few formatting warnings. When trying to run produced binary, I'm getting the error below. Any chance you could help figure out the issue?

By the trace it seems the problem is with Xlib. Does it need to be in specific version? Is it even Ok for linux?

System: Ubuntu 20.04 (Linux meland 5.11.0-43-generic #47~20.04.2-Ubuntu SMP Mon Dec 13 11:06:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux)
Cargo: cargo 1.54.0 (5ae8d74b3 2021-06-22)

Backtrace:

kretyn@meland:~/projects/rsnake$ RUST_BACKTRACE=1 ./target/release/rsnake 
thread 'main' panicked at 'attempted to leave type `std::mem::ManuallyDrop<xlib::Xlib>` uninitialized, which is invalid', /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/mem/mod.rs:660:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:515:5
   1: core::panicking::panic_fmt
             at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/panicking.rs:50:5
   3: x11_dl::xlib::Xlib::open
   4: winit::platform::platform::x11::xdisplay::XConnection::new
   5: std::sync::once::Once::call_once::{{closure}}
   6: std::sync::once::Once::call_inner
             at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sync/once.rs:418:21
   7: winit::platform::platform::EventsLoop::new_x11
   8: winit::platform::platform::EventsLoop::new
   9: winit::EventsLoop::new
  10: glutin_window::GlutinWindow::new
  11: <glutin_window::GlutinWindow as window::BuildFromWindowSettings>::build_from_window_settings
  12: <piston_window::PistonWindow<W> as window::BuildFromWindowSettings>::build_from_window_settings
  13: rsnake::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
kretyn@meland:~/projects/rsnake$ 

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.