Starting a new 2d platformer with ECS

Поделиться
HTML-код
  • Опубликовано: 9 май 2022
  • Building a new 2d platformer from scratch using Rust and the Bevy game engine.
    Follow along on GitHub: github.com/rust-adventure/2d-...
  • НаукаНаука

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

  • @anonymousnyancat3231
    @anonymousnyancat3231 2 года назад +20

    Awesome work. Learned about a lot of awesome crates; I've wasted so much time rolling my own bevy asset loader for projects....

  • @Speykious
    @Speykious 2 года назад +14

    "[...] and I have some experience *finishing* games with the engine, not just starting them."
    Dude why you call me out like that ;-;

  • @valentinussofa4135
    @valentinussofa4135 2 года назад +1

    Very recommended RUclips account for rust learner. 👍

  • @Metruzanca
    @Metruzanca 8 месяцев назад +3

    This is a great intro! Knowing that LDTK exists now is massively useful.

    • @chrisbiscardi
      @chrisbiscardi  8 месяцев назад +1

      LDTK is great, and bevy_ecs_ldtk has been keeping up to date with every Bevy release too.

    • @RootsterAnon
      @RootsterAnon 25 дней назад

      @@chrisbiscardi what is more supported Tiled or LDTK? I have found some examples that use Tiled as level editor and then we create and load levels in compile time.

    • @chrisbiscardi
      @chrisbiscardi  25 дней назад

      @@RootsterAnon generally I consider ldtk to be better supported as there's a bevy_ecs_ldtk which is a crate that maintains an integration. There isn't really a similar crate for Tiled, although there is some example code in the bevy_ecs_tilemap repo examples to use and I am using that code myself in my current project

  • @ivailobosev
    @ivailobosev 2 года назад +5

    Really great skills. Love your rust videos. I know you are building a platformer and not a rpg, but can you please take some time to explain a bit about mouse/controller input and specifically how to rotate character based on mouse (controller stick) position?

    • @chrisbiscardi
      @chrisbiscardi  2 года назад +4

      I recorded some audio on the gamepad controls today. Hoping for a thursday video release for that video

    • @nickgennady
      @nickgennady 2 года назад +3

      It’s all 2D vector math.
      Joystick would just be normalized 2D direction. The joystick is basically giving you direction already.
      Mouse is bit more tricky. You need to get direction from mouse to player.
      Something like
      (MousePosotion - PlayerPosition).normalized.
      Than just rotate sprite to look in that direction. Not sure exactly how you want to render sprite but it would just be converting vector to angle if you want to use 1 sprite for all directions. Vector to angle is basically dot product and cross product. There examples online.
      It may be worth looking at Godot and Unity 2D tutorial videos to learn the math.

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

    Cool video. Also this video and your shapecasting video form a 2 video recommendation loop for me.

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

      Interesting, it does for me too. Unfortunately I don't think I have control over the final recommendations after the videos end. Only the cards that appear before that. So not sure how it got into a loop! 😅
      There is a playlist if you're interested in more of this project though - ruclips.net/p/PLWtPciJ1UMuAoCq8NAw8J-n387U4QHFBW

  • @ikaridev7419
    @ikaridev7419 2 года назад +8

    how tf does this only have 400 views!?
    PS. cool

    • @ralfwright
      @ralfwright 2 года назад

      Wait what. Yeah how??!?!?

    • @ralfwright
      @ralfwright 2 года назад

      Bad luck maybe??

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

    So cool

  • @doguguwww
    @doguguwww 6 месяцев назад

    Awesome!!

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

    Super interesting I have been working on a 2D platformer with bevy, too. I find it very hard to implement a good fsm in an ecs environment though. What are your experiences with bevy so far?

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

      I like Bevy quite a bit. I think that the "ECS for everything" approach has generally panned out well for the games that I've built so far. I'm about to implement more complicated movement controls for the platformer, specifically relating to jumping/coyote time/etc so there will definitely be a video about that when it's done.

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

      @@chrisbiscardi Cool! I was going to implement coyote time next but my experience with rust/bevy is not top notch so I currently have a very brittle state machine. Looking forward to your approach. :)

  • @Kfoo-dj4md
    @Kfoo-dj4md 2 года назад +1

    You mentioned that you want to use rapier, but I see you are using heron in the source code, are you replacing it with heron? If yes, could you please explain why?

    • @Kfoo-dj4md
      @Kfoo-dj4md 2 года назад +1

      Nvm, just checked the library and it’s powered by rapier

    • @chrisbiscardi
      @chrisbiscardi  2 года назад +3

      @@Kfoo-dj4md yeah it is, but I'm also going to remove heron for a couple of reasons and switch to the official bevy_rapier plugin. Mostly because I need ccd in one of my games and also because I need to adjust gravity for better jumps halfway through the jump and heron makes that hard

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

    Thanks for the video! ❤ what window manager do you use?

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

      I use yabai on macos, I talk about it here: ruclips.net/video/apEXmJP5xxw/видео.html

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

      Thank you so much!!!

  • @pilotashish
    @pilotashish 2 года назад +2

    which window manager are you using in the video?

    • @chrisbiscardi
      @chrisbiscardi  2 года назад +2

      It's yabai on macos github.com/koekeishiya/yabai

  • @baggern
    @baggern 2 года назад +5

    a fellow nushell user? 🤩

    • @chrisbiscardi
      @chrisbiscardi  2 года назад +2

      yup! love it!

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

      Honest question but how do you get by without comprehensive git completions? I love nushell too but this is keeping me in PowerShell for now 😀

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

    Can bevy be used to make a game that runs inside a browser with a sever backend?

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

      yes, Bevy has examples in the repo that compile to wasm and run in the browser and there are people who have made network-connected games that run this way.

  • @Prajwal____
    @Prajwal____ 2 года назад +3

    But where is bevy ui? Is bevy a framework?

    • @chrisbiscardi
      @chrisbiscardi  2 года назад +3

      Bevy currently doesn't have an editor UI built-in like godot/unity/etc. There are some community attempts to create one (such as github.com/jakobhellermann/bevy_editor_pls) but nothing official yet. It's definitely on the roadmap though.
      You will have to write Rust to use Bevy today

  • @kaviisuri9997
    @kaviisuri9997 2 года назад +4

    could you create a video explaining your setup (terminal emulator, shell, code-editor etc? it looks awesome. Cool video!

    • @chrisbiscardi
      @chrisbiscardi  2 года назад +4

      Yeah I'll put it on my list to make

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

      @@chrisbiscardi interested in this too, specifically what VS Code theme is that? Looks really clean

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

      Chiming in wondering which tiling window manager tool you’re using 😊

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

      Welp, then I found that answered in another thread. 🚀

    • @error.418
      @error.418 Год назад +2

      @@spesterwecial What was the answer? Edit: it's yabai

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

    Good content but I found it hard to follow along with the dialogue whilst there was video being played back that was only slightly relevant. Maybe this format isn't for me, but it would be good if you had presented something to talk to for added context

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

    bevy_esc_ldtk examples just baffle me. I only see where they actually made the player entity grab the Sprite, why other entities have ANY sort of visibility is black magic for me.