Learn Bevy 0.11 By Making a Game! (part 1)

Поделиться
HTML-код
  • Опубликовано: 11 июл 2024
  • Welcome to my new introductory series for the Bevy game engine! In this series we will create an entire real game from scratch using Bevy 0.11.
    Discord Invite: / discord
    Patreon: / logicprojects
    Github: github.com/mwbryant/logic_far...
    Chapters:
    0:00 Intro
    2:06 Project Setup
    3:43 First Window
    4:40 First System
    7:12 First Sprite
    7:40 Loading an Image
    9:21 Pixel Filtering
    10:08 Character Movement
    12:24 Recap/Outro
  • НаукаНаука

Комментарии • 89

  • @vividoo
    @vividoo 4 месяца назад +9

    Any confused about why you're getting an error for the 'Input' resource. In Bevy 0.13, the Input resource was renamed to `ButtonInput`. Additionally, instead of the KeyCode being `KeyCode::W` it is now `KeyCode::KeyW`

    • @thebluebriefs
      @thebluebriefs 3 месяца назад

      came here to write this, thanks!

  • @Otakutaru
    @Otakutaru Год назад +57

    Immense thanks for keeping it up with bevy's nurture phase. I'm glad you treat your video series independently, starting from the ground up and improving the fomula every step of the way. It could be easier for you to defer us to a video you made a year ago, but instead you explain it better than ever, again, and again. That is commitment and I'm sure you're extremely proud of it

    • @logicprojects
      @logicprojects  Год назад +9

      Thank you! One of the appealing parts of bevy has been that I can grow with it and keep improving on my videos each version

  • @indierusty
    @indierusty Год назад +21

    Just wanted something like this to learn Bevy. Keep it as beginner friendly as this one. Thanks a lot.❤

  • @htm4914
    @htm4914 Год назад +8

    I'm a go programmer but you made me wanna learn rust as second language would be great and Thank for the awesome video 💗

  • @tenthlegionstudios1343
    @tenthlegionstudios1343 Год назад +4

    Very excited for this series. Thanks!

  • @jackerywebster5864
    @jackerywebster5864 Год назад +7

    I always get so excited when I see a new logic projects post

  • @phyyl
    @phyyl Год назад +2

    perfect speed! keep it up, looking forward to the next parts.

  • @jacques-dev
    @jacques-dev Год назад +5

    Awesome! I am very excited for this series, I can't wait to see the next video :) All the best!

  • @alundra828
    @alundra828 Год назад +14

    You're doing the lords work.
    Are there any plans to show case 3d game development? Most big game engines have tutorials on creating simple RPG's for them, it would be super sweet if bevy had the same. I can't think of a dev more suited to lead the charge!

  • @RSchenal
    @RSchenal Год назад +3

    Just in time! I started making a new game and your tutorials will help a lot!

  • @TeamDman
    @TeamDman Год назад +2

    Amazing! Can't wait for more!

  • @liamhamilton2719
    @liamhamilton2719 Год назад +2

    I just started my own farming game in Bevy and suddenly this pops up! Can't get enough of your videos 👍

  • @funnyusername966
    @funnyusername966 Год назад +9

    i cant even express how hyped i am for this. i just finished coding for tonight in bevy , your series thought me so much.
    keep going and make more!
    p.s i would really enjoy a series about making a first person shooter in bevy

  • @Alexander-xo5ho
    @Alexander-xo5ho Год назад +3

    amazing video please keep the series up❤️

  • @Perspectologist
    @Perspectologist Год назад +1

    I finally got started with Bevy! Thanks for making this tutorial. I’m looking forward to the next video.

  • @quadratwurzel4124
    @quadratwurzel4124 Год назад +1

    Thank you, I just started learning Bevy and is nice to see you are doing the 0.11 xD

  • @leonwang3072
    @leonwang3072 11 месяцев назад +1

    Wonderfully clear!

  • @nolann6324
    @nolann6324 Год назад +2

    It's a really useful tutorial, thank you ! I was just diving into Bevy when I saw this, I think it will help me a lot, I like your way of explaining ECS concepts, it looks a lot easier than what I thought !

    • @logicprojects
      @logicprojects  Год назад +2

      Thank you! Bevy makes ECS super easy and the best way to learn is to just try making a game.

  • @reandov
    @reandov Год назад +1

    I've started learning game development with Bevy these days. It's quite a dream for me and with Rust and this engine things seems to be to good! I will watch every single video from this series! Thanks!

  • @bassguitarbill
    @bassguitarbill Год назад +1

    I've bounced off of Bevy a couple times, but I like the style of the video and I'll be keeping a watch on this series

  • @johanngambolputty5351
    @johanngambolputty5351 Год назад +1

    Ooh, I've always been bevy-curious, I will be following keenly

  • @EngineerNick
    @EngineerNick Год назад +1

    Thankyou looking forward to the next one :)

  • @norestraint
    @norestraint Год назад +1

    I had never heard about Bevy before or cared much about game development, but this tutorial is so simple and nice that I decided to follow it. I like Rust a lot and this is a nice way to learn more about it while having fun. Thanks a lot, you are great!

  • @SEOTADEO
    @SEOTADEO Год назад +1

    Thanks a lot, your videos are such a great learning resource. I hope you publish some game made with Bevy at some point.

  • @RogersNucleus
    @RogersNucleus 11 месяцев назад +1

    Can’t wait for the next one!

  • @HrishikeshMuruk
    @HrishikeshMuruk 11 месяцев назад +1

    I started, stopped, re-started, stopped and finally re-started learning Rust!! This seems like an interesting series to get some coding experience in Rust. Looking forward to more.

  • @Tigregalis
    @Tigregalis Год назад +3

    Really great introduction to Bevy! I think this series is gonna be awesome.
    May I suggest putting some clips or screenshots of the bevy window (or terminal) after each code snippet? It would change the pace of the video but I think it would be helpful to see what impact each code snippet has on the program.

    • @logicprojects
      @logicprojects  Год назад +1

      I plan on doing that as we go on. For this part the changes were black screen to grey screen so I didn't feel like it added too much but when there's actually a game to show I will!

  • @EloyLima1971
    @EloyLima1971 Год назад +1

    Very nice, thank you!!!

  • @techbytefrontier
    @techbytefrontier Год назад +1

    Amazing man thanks a lot

  • @VitorLuizC
    @VitorLuizC 11 месяцев назад

    I'm following again your tutorials, and it's really cool how you're constantly improving your mentoring/teaching skills

    • @logicprojects
      @logicprojects  11 месяцев назад

      Thank you so much! I've been trying to improve at all aspects as time goes on

  • @skpz7335
    @skpz7335 11 месяцев назад +1

    gosh this is so good, thanks!

  • @Gabriel_Bento
    @Gabriel_Bento 10 месяцев назад

    Awesome video! I was really struggling to learn Bevy and I was getting upset because ECS is something really new to me. I was almost giving, but then I saw this video and now I can continue learning.

  • @ggtgreg3947
    @ggtgreg3947 9 месяцев назад +1

    Thank you for your work

  • @fertherelax
    @fertherelax Год назад +1

    Looking forward for what we can accomplish with rust and bevy :)

  • @TheBoxingBinge
    @TheBoxingBinge Год назад +1

    Finally! Thanks!

  • @jacobenders1213
    @jacobenders1213 Год назад +1

    Fast! I'm gonna follow this! :D

  • @blamechickenman7434
    @blamechickenman7434 10 месяцев назад

    this is really good, thanks

  • @MonLes-xt7gc
    @MonLes-xt7gc 11 месяцев назад

    Thank you! You are amazing

  • @Champs3443
    @Champs3443 22 дня назад

    very nice, thanks :D

  • @RenderingUser
    @RenderingUser 3 месяца назад +1

    11:25 quick update: bevy 0.13+ uses ButtonInput instead of Input
    also KeyCode::W -> KeyCode::KeyW

  • @AlessioVecchioDraelAV
    @AlessioVecchioDraelAV Год назад +1

    Yes!

  • @jessechounard
    @jessechounard Год назад

    This is a great start! Definitely going to be following along. BTW, looks like you typoed the word "rogue" as "rouge" in there.

    • @logicprojects
      @logicprojects  Год назад

      Damn. I always make this mistake. It should be fixed in the repo name now too... Good catch :)

    • @TheNinjaDwarfBiker
      @TheNinjaDwarfBiker 11 месяцев назад

      @@logicprojects Its a very common mistake that triggers me because I speak french and it means "red" which is means "red-like" so it always gets me when I see this typo lol

  • @morgomi
    @morgomi Год назад +1

    cool =)

  • @jeremycomino7610
    @jeremycomino7610 Год назад +1

    Great video. I have a question though. In the character movement, in the for loop why did you put &Mut characters when characters is already Mut? Sorry about the question but I'm a completely beginner in rust

    • @logicprojects
      @logicprojects  Год назад +1

      That is syntactic sugar over calling characters.iter_mut(). We still need to tell rust it's a mutating iteration and rust is repetitive with it's muts. You could also do &characters for nonmutating. If you miss a mut the compiler will tell you though!

  • @trolleymouse
    @trolleymouse Год назад

    Appreciate the tutorial.
    Bevy's been one of those things I've wanted to learn for a while.
    I know the controller isn't the focus of the tutorial at this stage, or anything, but my immediate thought on seeing it was some boolean maths to turn 4 if statements into 0, but my understanding of Rust is still developing. so it's looking like:
    transform.translation.x += 100.0 * (input.pressed(KeyCode::D) as i32 - input.pressed(KeyCode::A) as i32) as f32 * time.delta_seconds();
    transform.translation.y += 100.0 * (input.pressed(KeyCode::W) as i32 - input.pressed(KeyCode::S) as i32) as f32 * time.delta_seconds();
    Which is a little less elegant than I saw it in my head.

    • @logicprojects
      @logicprojects  Год назад +1

      I would look at the leafwing input manager plugin. It's made by core bevy developers and wraps over Bevy's default input with more high level things. It makes supporting keyboard and controllers easier

    • @Tigregalis
      @Tigregalis Год назад

      I do something like this (and I prefer it) but I can't say it's objectively an improvement:
      if !input.any_pressed([KeyCode::W, KeyCode::S, KeyCode::A, KeyCode::D]) {
      return;
      }
      let up = input.pressed(KeyCode::W).then_some(1.0).unwrap_or_default();
      let down = input
      .pressed(KeyCode::S)
      .then_some(-1.0)
      .unwrap_or_default();
      let left = input
      .pressed(KeyCode::A)
      .then_some(-1.0)
      .unwrap_or_default();
      let right = input.pressed(KeyCode::D).then_some(1.0).unwrap_or_default();
      let translation = Vec2::new(left + right, up + down);
      for mut transform in query.iter_mut() {
      transform.translation += translation.extend(0.0) * time.delta_seconds() * 50.0;
      }

  • @CodyDBentley
    @CodyDBentley Год назад +1

    wooooooo!

  • @abacaabaca8131
    @abacaabaca8131 11 месяцев назад

    for anybody being confused with the `_` keyword in the iteration of tuple in the Query system,
    it is a wildcard pattern that can match any value and is often the returned value will be ignored in the range-based for loop.
    In this context the second item of the tuple will be ignored, i.e the Sprite object will not be processed in the for loop.

    • @logicprojects
      @logicprojects  11 месяцев назад

      Correct! In the future we'll use With constraints to avoid getting the useless parameters but I didn't want to clutter this video

  • @darknetworld
    @darknetworld Год назад

    Well there another crate is useful is cargo watch which useful when auto build and run to see change of the code lines.

  • @alexcampbell-black8543
    @alexcampbell-black8543 9 месяцев назад

    In your query in the character_movement system you are getting immutable access to the Sprite component, does it not make more sense to use With instead as we are not using the Sprite?
    edit: I can see that in part two you are switching it to the Player component and then accessing the speed value, so it makes sense.

  • @sunsongtao5372
    @sunsongtao5372 11 месяцев назад +1

    where is the part 2, can't wait

    • @logicprojects
      @logicprojects  11 месяцев назад

      Sorry for the delay! I just moved and won't have internet until mid next week but I have the video ready to go

  • @xiahualiu
    @xiahualiu 5 месяцев назад

    quick question as a noob: why 9:16 asser_server in the fn setup() does not require mut? Is it because Res uses internal mutability?

  • @DejaimeNeto
    @DejaimeNeto Год назад +1

    yes

  • @Darqonik
    @Darqonik 11 месяцев назад

    Hello, great tutorial as always, but could you make screenshots fill whole screen or make frame with less contrast color (e.g black to match the code editor) in future videos, please?
    It’s a bit harsh for the eyes, especially when watching in the dark.

  • @kalpolproductions8558
    @kalpolproductions8558 7 месяцев назад

    I love how he knows we haved used unity and moved onto bevy.

  • @principleshipcoleoid8095
    @principleshipcoleoid8095 11 месяцев назад

    Kind of a stupid cargo question, but the bevy dynamic linking feature is enabled together with the default features?

    • @logicprojects
      @logicprojects  11 месяцев назад

      Yes! There is a option to disable all default features in the toml as well and many community plugins do this for compatibility

  • @jeffcarey3045
    @jeffcarey3045 Месяц назад

    Rogue is rogue. Rouge is makeup.

  • @mohamedimranechehabi5735
    @mohamedimranechehabi5735 Год назад

    Hello, thanks for the tutorial, but is there any advanced clear documentation about bevy?

    • @logicprojects
      @logicprojects  Год назад +1

      Depends what you mean by "advanced". The bevy docs are the primary documentation for bevy. You also can look into the source of the engine itself at a certain point because it uses the same concepts as normal bevy apps. My recent rendering video is also a relatively advanced video that deep dives into rendering internals. For really advanced things you probably want to ask the developers directly. Also reading plugins written by engine contributors is a great way to learn how they solve problems.

    • @mohamedimranechehabi5735
      @mohamedimranechehabi5735 Год назад

      @@logicprojects thank you very much

  • @Gabriel_Bento
    @Gabriel_Bento 10 месяцев назад

    Does someone know where I can see more illustrations like this 4:44?

    • @logicprojects
      @logicprojects  10 месяцев назад +1

      I tried to include the authors info. They are from unity docs about their ECS but I think they retired them because the animations really didnt have anything to do with ecs

  • @TheNinjaDwarfBiker
    @TheNinjaDwarfBiker 11 месяцев назад

    2:39 you might want to consider fixing the rouge vs rogue typo, it's not rouge

  • @UnderArea51
    @UnderArea51 Год назад

    Question: Do I need to place to Bevy folder - into the same - "cargo new myGame" folder" ? Where does the Bevy folder need to be placed to "talk" to the myGame Rust files? LOL! I hope this makes sense!

    • @UnderArea51
      @UnderArea51 Год назад

      Sorry - typo above : Do I need to place my Bevy folder - into the same

    • @UnderArea51
      @UnderArea51 Год назад

      OR Rust is smart... I will install Bevy... and Rust Cargo will know where to find it on my PC to "add" Bevy's magic? Behind the scenes?

    • @logicprojects
      @logicprojects  Год назад

      So rust is smart. Once you install cargo and use it to create a project it will make a cargo.toml file in a folder. That file being there is all rust needs to know it's a rust project and to use bevy. The rust book should get you set up and running a project and then it will make a lot of sense

    • @UnderArea51
      @UnderArea51 Год назад

      @@logicprojects - I'm new to your channel. Do you have a link post to the Rust book? I developing on a Raspberry Pi 3 B+ with VIM as my code editor. I got use to VIM during my intro to prgrammng... It's strange... I tried to learn C# ,(and the built in languages,) with Unity, GameMaker, ClickTeam Fusion ,(on my Windows 11 PC,) but for some reason game engines messes my thinking up. I found engines harder to learn - wasted time digging around - trying to find everything. I know everyone has their own work flow LOL!!! So, it's me... Rust/ Bevy seems really awesome and look forward developing a game in it! I also like the Cargo compiler.. it seems to catch everything - on the front end.

    • @logicprojects
      @logicprojects  Год назад +1

      Here is the Rust book: doc.rust-lang.org/book/ it should get you set up and started with Rust. Cargo is magical and it's a great experience to work with! I also used to use Vim and I use the Vim plugin for everything

  • @dastan331
    @dastan331 10 месяцев назад

    I can't try this engine! I don't like looking at this code 😂.

  • @graehmebracegirdle7393
    @graehmebracegirdle7393 11 месяцев назад

    😀 P R O M O S M

  • @nomadshiba
    @nomadshiba 10 месяцев назад

    i really wanted to use bevy before
    but there is one thing that keeps me away
    EDIT: alright let's go, learn bevy, fck unity
    just gonna fork it and name the branch "master"

  • @samsterlicious864
    @samsterlicious864 3 месяца назад

    So many ads

  • @clonkex
    @clonkex 11 месяцев назад

    struct* it's a little confusing that you say "strut"