Not working for me, I tried to copy / paste as well but I created a Tetris game instead of a Snake game, must have copy / paste not responsively Just kidding, thanks for your great video !
@Elf tu pourras remettre tes tutos rust , ou par exemple les mettres en non reppertorriés puis dans une playlist. Ils étaient super bien, continues les stp
I found this was a really good tutorial tho. It's teaching you to find information in the docs which is far more important than learning each function in a library
I'm a web developer looking into Rust - thanks for the intro, it made things look quite easy despite me not having any experience with low-level languages.
Hey, these are cool videos. Really good for us programmers who already know other languages and want to get the quick overview of a real example to learn rust.
I'm 1:46 in and I've already learned so much about rust! Your editing style, knowledge and illustrations are amazing!! I've not looked at the rest of your videos but you deserve more than 762 subs!!
It's nice to see some of the concepts of Rust put into action here. I'm new to Rust so I just needed a starter project to help get some of the foundations of Rust down.
Wholesome, educating, and inspiring to stop slacking off after work and start working on a cool side project. Mate, you have my like, subscribe, and honest "thanks". Keep up the good work!
I'm gonna make the best multiplayer snake game ever seen in the realm of humans!! It will be greater than any other snake game including slither, but won't be online, but it will still be a great game.
I finally found the bug! (or *a* bug) if the snake is moving left and you press up or down and then press right in the same frame, you can flip the snake's direction! Currently trying to figure out how to fix this...
maybe change the pressed method so instead of changing the direction of the snake, it changes a middle state, and then the update function changes the snake's direction based off the middle state?
You need more videos like these, people usually make videos "making a game in rust/or whatever language". And it's just a timelapse or quick shallow explaining that explains nothing. Edit: your last video was 3 years ago, pls start uploading again 😢
When I was copy pasting some sample codes irresponsibly, I accidentally created a skyrim clone for calculators. I can already hear Bethesda calling me for a job offer.
Who knows if you read comments on several year old videos but I'm trying to learn Rust and I'm confused as to why you are doing a "use graphics;" then still doing graphics::rectangle, graphics::clear etc... Isn't the point of use to bring in a namespace? Why didn't you complete the use statement for graphics? Just seems odd and I can't figure out if there's a purpose I don't see
Great video, but I have one question (not really related to the snake game). Can I turn of key repeat in piston and if so, how? I have been looking in the documentation, but I can't find anything about key repeat. I guess I have to do it manually just like in SDL
Run your logic on the first game loop cycle that key is pressed and use a bool called something like "key_already_pressed " and check this bool before your logic is run and reset this bool the first following frame that the key is released. Pseudo code: fn update () { if (whatever_key_down == true AND whatever_key_already_pressed == false) { key press logic here; whatever_key_already_pressed = true } else if (whatever_key_down == false) { whatever_key_already_pressed = false; }. first if statement: check what key is pressed and that this is the first time its used for this key event. then run the logic once and set key_pressed_already to true so it wont pass this test the next frame, thus only running once per key event. else if statement: check if the key is released and then set already_pressed to false so it can be run again next key event that comes in for this key.
Depends on what efficiency you mean. Piston is low level enough that you could implement your own graphics functions. So Piston is quite efficient from a performance standpoint. If you mean efficiency for the user, then GGEZ or "Good Game Easy" is an fantastic package that includes: 2d rendering, playing sounds, inputs, shaders and sprites. ggez is excellent for the user.
Also, ggez's drawing is actually quite efficient now (moreso than Piston's default 2d graphics library). I spent a fair amount of time rewriting the render pipeline (and icefoxen redid the mesh builder) so that you can now do sprite batching which means you get very fast rendering when you take advantage of it (and there's not much overhead over raw gfx-rs calls even if you don't, but if you're doing lots of draw calls even with the lowest level library it's still going to slow down). Piston is more extensible though and allows you to write your own graphics library which could be better for specific things (especially 3d drawing).
When I try it, it fails to build the dependencies saying; "error: failed to load source for a dependency on `piston`" am I doing something wrong? Is there a way to fix it?
Hi,I'm a rust beginner from China,can I reprint your vedio?I will note with the link address of the original video.(Most of Chinese people can't use youtube.)
Am I the only one who ran into the .collect(); | ^^^^^^^ value of type `std::vec::Vec` cannot be built from `std::iter::Iterator` error ? That can not be xdd. Well anyway, I solved it somehow. I just wanted to know if I was the only one.
Not working for me, I tried to copy / paste as well but I created a Tetris game instead of a Snake game, must have copy / paste not responsively
Just kidding, thanks for your great video !
I'm laughing all day because of your comment, bro))
@Elf tu pourras remettre tes tutos rust , ou par exemple les mettres en non reppertorriés puis dans une playlist. Ils étaient super bien, continues les stp
a tutorial for how to read tutorials. genius.
I found this was a really good tutorial tho. It's teaching you to find information in the docs which is far more important than learning each function in a library
I'm a web developer looking into Rust - thanks for the intro, it made things look quite easy despite me not having any experience with low-level languages.
Hey, these are cool videos. Really good for us programmers who already know other languages and want to get the quick overview of a real example to learn rust.
I'm 1:46 in and I've already learned so much about rust!
Your editing style, knowledge and illustrations are amazing!! I've not looked at the rest of your videos but you deserve more than 762 subs!!
Hahaha! Thank you!
Create name and package name confusion is finally solved. Thank you. Keep doing this awesome series
Your welcome :) Thank you for supporting the show!
It's nice to see some of the concepts of Rust put into action here. I'm new to Rust so I just needed a starter project to help get some of the foundations of Rust down.
Wholesome, educating, and inspiring to stop slacking off after work and start working on a cool side project.
Mate, you have my like, subscribe, and honest "thanks".
Keep up the good work!
nice tutorial, thanks
about code on github
1 - update all dependencies
2 - remove method .opengl()
done, all works, at least on macos
I'm gonna make the best multiplayer snake game ever seen in the realm of humans!! It will be greater than any other snake game including slither, but won't be online, but it will still be a great game.
How did it go?
@@tiziobelo didn't make it in the end, but it's a good idea as an arcade game
thanks for showing "cargo doc", so handy!
i love the color palette you're using in you videos ...
What do you want me to make next?
YouCodeThings some thing advanced like, generic traits
Lifetimes! :3
YouCodeThings A video explaining Rust's memory model will be helpful for me
maybe specs with piston/ggez ?
or a simple platformer using image / sprites?
^_^
Tokio and Futures v2, Modules and Organizing code for big projects, Lifetime & Borrowchk
Got this video from recommendation. It's awesome !!, the pacing, explanation, and of course... the joke XD
This snake is so goofy xD
Love it!
You earned my subscribtion
Just found out your channel. Loving it so far.
Wow this is really well made! Thanks.
its like code bullet except i'm actually learning :o)
This went over my head. Let me try this later but slowly
Playback speed: 0.25!
I love that your prompt is a lambda
I finally found the bug! (or *a* bug) if the snake is moving left and you press up or down and then press right in the same frame, you can flip the snake's direction! Currently trying to figure out how to fix this...
maybe change the pressed method so instead of changing the direction of the snake, it changes a middle state, and then the update function changes the snake's direction based off the middle state?
You need more videos like these, people usually make videos "making a game in rust/or whatever language". And it's just a timelapse or quick shallow explaining that explains nothing.
Edit: your last video was 3 years ago, pls start uploading again 😢
Ok! I'll make more! Thank you for the kind comment!
THIS IS THE BEST TUTORIAL EVER.
When I was copy pasting some sample codes irresponsibly, I accidentally created a skyrim clone for calculators. I can already hear Bethesda calling me for a job offer.
The best 8 minutes!
XD
Who knows if you read comments on several year old videos but I'm trying to learn Rust and I'm confused as to why you are doing a "use graphics;" then still doing graphics::rectangle, graphics::clear etc... Isn't the point of use to bring in a namespace? Why didn't you complete the use statement for graphics? Just seems odd and I can't figure out if there's a purpose I don't see
I think the use graphics; is to bring the constants into scope like GREEN. Not entirely sure tho...
YES!
The bug is that the snake can reverse directions if two keys are pressed between two updates.
Great video man. Hope you make more Rust/Piston tutorials in the future.
Bidhan A thank you so much! I will definitely make more when I shed some side projects I'm finishing.
Wow amazing, thanks.
well done i loved the quality of your videos
Compiling it is taking forever
"And get this man a snake game"
EVERYONE MUST HAVE A SNAKE GAME
At 4'54" missing 'mut' for game var, but then later you edited...got confused by that for a sec...
I saw that sly most loved humble brag, and I approve!
I would like to see more games in Rust, please!
I just found out that there's a link to this video in the ggez snake code example
Joris KBos Thank you for pointing that out to me. I'm honored!
and isn't even 10mins !! Quality content!
Great video, but I have one question (not really related to the snake game). Can I turn of key repeat in piston and if so, how? I have been looking in the documentation, but I can't find anything about key repeat. I guess I have to do it manually just like in SDL
Run your logic on the first game loop cycle that key is pressed and use a bool called something like "key_already_pressed " and check this bool before your logic is run and reset this bool the first following frame that the key is released.
Pseudo code:
fn update () {
if (whatever_key_down == true AND whatever_key_already_pressed == false) {
key press logic here;
whatever_key_already_pressed = true
} else if (whatever_key_down == false) {
whatever_key_already_pressed = false;
}.
first if statement: check what key is pressed and that this is the first time its used for this key event. then run the logic once and set key_pressed_already to true so it wont pass this test the next frame, thus only running once per key event.
else if statement: check if the key is released and then set already_pressed to false so it can be run again next key event that comes in for this key.
Man this tut epic
but there no part 2 :(
*Part 2 when?*
Snake game is awesome!
Sorry for asking, are you also Code Bullet??? Some of your speech mannerisms remind me of that guy.
I wish :p
Knock, knock ... is there Andrew there? Where are you?
Great video! I might make a parallel one that uses ggez instead to make a very similar game :D
Fantastic! Make sure you tweet it at me so I get to see it :)
I did exactly that (before this video existed) a few days ago. github.com/NervosaX/rust-snake It's terrible :D
what is the most efficient 2d libary for rust?
Depends on what efficiency you mean. Piston is low level enough that you could implement your own graphics functions. So Piston is quite efficient from a performance standpoint. If you mean efficiency for the user, then GGEZ or "Good Game Easy" is an fantastic package that includes: 2d rendering, playing sounds, inputs, shaders and sprites.
ggez is excellent for the user.
Also, ggez's drawing is actually quite efficient now (moreso than Piston's default 2d graphics library). I spent a fair amount of time rewriting the render pipeline (and icefoxen redid the mesh builder) so that you can now do sprite batching which means you get very fast rendering when you take advantage of it (and there's not much overhead over raw gfx-rs calls even if you don't, but if you're doing lots of draw calls even with the lowest level library it's still going to slow down). Piston is more extensible though and allows you to write your own graphics library which could be better for specific things (especially 3d drawing).
Thank you for the reply! I need to make something in ggez now. It can't be snake though.... hmmm
@@YouCodeThings and that's how Flappy Crabby was born!
Simple and fast 🔥🔥🔥
would suggest making a game snake game from scratch instead of using a lot of dependencies and frameworks
When I try it, it fails to build the dependencies saying; "error: failed to load source for a dependency on `piston`" am I doing something wrong? Is there a way to fix it?
0:25 i'm disappointed: I was expecting the actual code to be in the description. im sure if you minify it, it should fit
Как же приятно читать русские имена и фамилии в названиях репозиториев :)
As someone just starting to program, too advanced for me already lol.
One step at a time! You can do this!
what extension are you using for autocomplete?(example at 5:25)
Please continue your rust tutorials
Thank you for the great comment! I shall! In time!
This is great! Thanks
You're welcome!
Man this was amazing. Why did you stop? 😣
Hi,I'm a rust beginner from China,can I reprint your vedio?I will note with the link address of the original video.(Most of Chinese people can't use youtube.)
Sure! Could you send me the link so I can see it as well? Thanks!
@@YouCodeThings sure,the link is www.bilibili.com/video/av49691983/ and I also want to translate it to Chinese
did you ripoff the other guy or did he rip you off?? hmmmm... dont care... you made it cooler!
I HATE PRELUDE CRAP! KILL IT WITH FIRE! Thanks for the awesome video.
Please, we are waiting for more videos!
Great video!!
i got an error, so i copy-pasted your code from github but got sae error:
error[E0463]: can't find crate for `rand`
what to do now?
Flappy Birds
That's an awesome idea!
genious man
Gist is not available anymore :(
Naught Russel I've updated the link to work again! Thanks for pointing this out.
virgin LinkedList vs CHAD Vec
Dude, you talk weirdly fast. It would be nice if you go a bit slow in a uniform manner, I had to watch the video in 0.75x. Nice video though.
Can you compile it for iOS or Android too?
what’s font name on your terminal ?
how do u launch the game after coded, please help
Subscribed!!!
1:48 to 1:54
agreement
Epic
You are epic!
snek
Someone has copied this and have made a course on udemy.
this was too long , can you squeeze it all in 1 minute and under. I know you can do it!!!
cool, but maybe make sure your source code works
you got me!
🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
Am I the only one who ran into the
.collect();
| ^^^^^^^ value of type `std::vec::Vec` cannot be built from `std::iter::Iterator`
error ? That can not be xdd. Well anyway, I solved it somehow. I just wanted to know if I was the only one.
Glad you solved it!
@@YouCodeThings Thank you for sharing your knowledge with everyone 😎👏
@@GabrielProgThank you for commenting and watching!