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 Жыл бұрын
Great video, I need to look at how you’re using RON files to load data from files that seems very useful.
@logicprojects Жыл бұрын
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 Жыл бұрын
@@logicprojects that’s awesome I’ve always wondered how one would handle prefabs in Bevy
@Tsudico Жыл бұрын
@@logicprojects Do you have a video where you made the macro or describe it?
@logicprojects Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
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 Жыл бұрын
@@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)