maras-archive / rsnake Goto Github PK
View Code? Open in Web Editor NEWSnake implemented in rust.
License: MIT License
Snake implemented in rust.
License: MIT License
This causes the player to randomly and is absolutely blocking.
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 :)
If run cargo run on macOS, it will prompt a lot of error,
Because it is a novice for Rust, do not understand why.
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$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.