Overworld and NPCs in Bevy (0.10 Devlog 4)

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

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

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

    I really like this broad strokes style devlog instead of the nitty-gritty tutorials. It's fun to follow along and see the big picture.

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

    Great video, I need to look at how you’re using RON files to load data from files that seems very useful.

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

      I have a macro in src/utils. It's great for things like "prefabs" where I want different enemy variants or level layouts so I don't need to recompile

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

      @@logicprojects that’s awesome I’ve always wondered how one would handle prefabs in Bevy

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

      @@logicprojects Do you have a video where you made the macro or describe it?

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

      I made it a long time ago for a space game devlog. Crust of Rust has a macros video that should cover any of the details. Basically I just do the idiom to load a ron file and I turn the type name into a file name if one isn't provided. Rust macros are janky when you first see them

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

    Sometimes I get a little bevy burnout, then I remember how amazing it's turning out. It's hard not to want to learn the AI stuff coming out, so I've been spending some time there ... Amazing stuff.
    camera.logical_viewpoint_size().UNWRAP().x 😂😂😂 - just flows so natural ...
    What a language... I kid (partially)

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

      Yeah I always go to definition when I need a weird unwrap to see why things return options. Like what camera would not return a viewport size.....

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

      @@logicprojects - I mean, with the ?, it's really not any different than other languages that use null, and have that shortcut. I just looks funny when the shortcut is all spelled out ...

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

      Yeah the problem with bevy is systems can't return anything so we can't really use ?. I wonder if there is a way to have systems optionally return a result in the future

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

      @@logicprojects - ah, gotcha, thanks - hadn't thought about that yet. I guess one way to look at systems if that's the case is that, perhaps every system call should really be delegated to another function, and the system function could be attributed with a macro that provides some default error handling for all the systems. That way you can still use ? in your function that it delegates out to (probably write the same assembly in the end anyways)