Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.
Summary
In this live coding session, Chris Biscardi starts a new game development project using Bevy 0.15. The focus is on creating a small, low-poly 3D game where interaction is key. The stream covers setting up the project, exploring Blender for modeling, and implementing basic game mechanics such as character control and ray casting. Chris encounters a peculiar issue with shape casting visualization, diving into debugging to resolve it.
Highlights
Chris Biscardi begins a new 3D game using Bevy 0.15 🎮.
The project aims to be a small, low-poly game with interactive elements 🎨.
An in-depth look at using Blender and Substance Painter for texturing 🖌️.
Challenges arise with character control and ray casting 🧩.
Debugging a mysterious shape cast visualization bug 🐛.
Live Q&A and interactions with viewers throughout the stream 💬.
Key Takeaways
Bevy 0.15 offers new features but requires updates to dependencies 🚀.
Character control in games can be more complex than it seems 🎮.
Debugging visualization can reveal underlying issues unexpectedly 🕵️♂️.
Community tools like Blender make game development more accessible 🎨.
Collaboration and open-source contributions drive solutions 🛠️.
Overview
Chris Biscardi's latest livestream marks the beginning of an exciting new project with Bevy 0.15, focusing on creating a simple yet engaging low-poly 3D game. The session delves into setting up the game environment and character control, showcasing how to leverage Blender for modeling and Substance Painter for texturing.
Throughout the session, Chris provides invaluable insights and invokes interactive discussions with viewers. The stream also highlights various challenges encountered, such as dealing with character control mechanics and an odd issue with shape casting visualization. Chris systematically addresses these hurdles, demonstrating effective problem-solving techniques.
A significant portion of the stream is dedicated to unraveling a perplexing bug related to shape casting visualization. This deep dive into debugging not only resolves the issue but also sheds light on the intricacies involved in game development, making it an educational experience for both novice and seasoned developers tuning in.
Chapters
00:00 - 00:30: Video Introduction The chapter titled 'Video Introduction' provides an overview or starts the discussion about a specific topic related to videos. Given the transcript is just 'e', it seems the content is missing or there might be an error.
00:30 - 02:00: Bevy 0.15 Release Discussion The chapter discusses the release of Bevy 0.15. The speaker greets the audience and acknowledges the varying time zones of the listeners.
02:00 - 03:00: Game Concept Introduction The chapter introduces a conversation about starting a new game development cycle. The speaker, likely a game developer, mentions having gathered inspirational material for the new game concept. The focus is on designing the look and feel of the game, pointing towards the initial stages of developing a new game idea.
03:00 - 04:30: Character Controller Discussion The chapter focuses on discussions around creating 3D textured environments for characters. The speaker intends to begin with basic mechanics, like picking up boxes, without delving too deep into complex mechanics. They express a preference for the color scheme and vibe but mention a need to adjust the camera angle to be more game-like.
04:30 - 07:30: Texture and Environment Design This chapter delves into the intricacies of texture and environment design within gaming, focusing on how camera angles and map sizes influence game development. It highlights the Zelda series as a reference for desirable map sizing and discusses techniques like texturing and light geometry work in detail. These technical elements, such as positioning vertices efficiently, are crucial for creating immersive simulations and enhancing the gaming experience.
07:30 - 10:30: Advent of Code Discussion and Bevy Versioning The discussion begins with unresolved decisions around naming certain elements in the project, particularly textures like ground textures. The speaker expresses uncertainty about what to call specific parts.
10:30 - 14:30: Blender and Export Process The chapter 'Blender and Export Process' discusses the speaker's experience with using Bevy ECS (Entity Component System) version 0.15 for creating visualizations, specifically mentioning its application in a project for day six of the Advent of Code. The speaker is ensuring that everything is functioning as intended and that no errors have been made in the process.
14:30 - 16:00: Adding Progress Tracking to Game The chapter discusses the process or importance of adding progress tracking to a game. The narrative begins with a mention of untextured low poly models, debating their aesthetics. Despite some models looking visually appealing, the speaker does not believe this qualifies them as untextured. Moreover, the content shared in this chapter derives from a YouTube video, suggesting that it includes practical examples or demonstrations.
16:00 - 19:00: 3D Assets Loading and Scene Setup The chapter discusses the time-consuming process of 3D modeling, referencing a two-hour modeling session by Polygon Runway. The session is described as not being a tutorial but rather a demonstration of a model being built.
19:00 - 20:00: Debugging FPS and Performance This chapter discusses different techniques and tools for debugging frames per second (FPS) and performance in graphics rendering, focusing on the use of geometry versus texturing. The speaker suggests that instead of using actual geometry for elements like bricks and rocks, texturing is preferred. Figma is mentioned as a source of inspiration for direction and decision-making in this context.
20:00 - 24:00: Raycasting and Collision Detection The chapter discusses the concepts of raycasting and collision detection within the context of graphical rendering and game development. It highlights the presenter's desire to focus more on texturing rather than solely geometry-based solutions, suggesting that textures can effectively represent elements like rocks, bridges, and windows through tools such as Substance Painter. The chapter conveys the idea that proper use of texturing tools can simplify the creation of detailed graphical elements without relying solely on complex geometry.
24:00 - 30:00: Animation and Character Movement The chapter titled 'Animation and Character Movement' explores the use of geometry in animation, emphasizing extra bricks in structures and their impact on design, even in low poly models. It discusses the creative idea of incorporating trees that can be removed, causing a visual effect where low poly leaves fall onto the ground, enhancing the animation's appeal. The chapter also touches on challenges in animation, particularly in running part two of a process or task within a reasonable timeframe, suggesting complexity in further stages.
30:00 - 41:00: Raycasting Issues and Bug Investigation The chapter discusses the problems encountered during raycasting and the subsequent investigation of bugs. It begins with the narrator recalling checking the 'Advent of Code' website, likely related to coding challenges that involve raycasting. Part two of the discussion revolves around looping visualizations, suggesting a focus on troubleshooting and optimizing code performance. An anecdote is shared about code performance, noting that a particular solution executed in approximately two seconds. The comparison hints at performance issues, possibly leading to further debugging and optimization tasks.
41:00 - 47:50: Shape Casting Debugging and Fixes The chapter titled 'Shape Casting Debugging and Fixes' discusses the process of debugging and fixing issues related to shape casting in a game engine. The author mentions implementing a straightforward solution without early optimizations or cutting and notes that it may not be the most efficient approach. Additionally, they touch upon the fact that Bevy tunua, a tool/library they are likely using, has not yet been updated for version 0.15 and there isn't a pull request available for this update yet.
47:50 - 48:00: Stream Conclusion and Bug Summary In the chapter titled 'Stream Conclusion and Bug Summary,' the narrator discusses the options for a character controller. The choices are between implementing a very simple version or embarking on a more complex and adventurous task. Ultimately, the decision is made to keep it simple for the day.
Starting a new Bevy 0.15 game Transcription
00:00 - 00:30 e
00:30 - 01:00 all right I think we're good here morning everybody or you know afternoon night wherever it is for you I think that bevy 0.15 is out now
01:00 - 01:30 full out hey Xavier how's it going uh we covered this last weekend so I'm not really going to spend any time on the blog post or whatever but I was thinking that we start a new game for this cycle um I started Gathering a little bit of like inspirational material for what I would want it to look like I think that the one of the things I want to focus on
01:30 - 02:00 in this cycle is making uh textured environments for characters to live in so it'll be 3D I think this cycle uh I'm not going to get too far into mechanics or anything yeah uh I think the first thing I want to be able to do is like pick up a box or something like that and then I like the color scheme here I kind of like the vibe but the camera angle is like very much not game
02:00 - 02:30 camera angle like it would be hard to do anything but maybe a simulation game with that uh and the Zelda series has more of like uh this is probably the size of map that I would want out of it and I like things like this circle in the ground so doing some texturing doing some you know like light geometry work to make it so that these vertices are here
02:30 - 03:00 maybe and then textures like the ground here and whatnot so I don't know what I'm going to call this yet uh We've also been doing Advent of code all week which I'm sure if you're here you've seen I think this will run oh moveu did not run oh that's my
03:00 - 03:30 my uh my thing not I'm also working with Bevy ECS Time app 0.15 to make sure it kind of works this is a visualization for day six Advent of code cool this making sure I didn't mess
03:30 - 04:00 anything up untextured low poly looks nice or probably someone made the one in screenshot look nice yeah the I don't really consider this necessarily untextured per se um I will say that a lot of the stuff in this specifically this is from I think uh oh man I didn't include the link here this is from a YouTube video
04:00 - 04:30 uh they spend two hours just modeling this I can't remember off the top of my head who it is though I should have included the link oh no wait I have it in the tab uh polygon Runway does this for like two hours it's not a tutorial or anything as far as I can tell just kind of like uh hey I built a thing um
04:30 - 05:00 yeah a lot of this is geometry so if you look at like the the bricks down here or like the rocks in the floor those are all actual geometry and I don't think I want to do actual geometry I think I want to do texturing yeah I'm using figma as kind of like a uh idea like an inspiration like when I have a question about which direction I want to go I can look at this and kind of be like okay this is my
05:00 - 05:30 context if that makes sense I'm not planning on making this specifically or anything like that um I want to focus a little bit more on Textures than this example did so like the like I was saying the rocks and the bridge those are all actual geometry and I think we can just do those with textures um we have substance painter and stuff like that now so I think that'll all be fine then the windows are also GE but they could like stay
05:30 - 06:00 geometry these extra bricks in the tower here like everything is done here with extra geometry which doesn't really matter cuz it's all low poly but I also kind of like the idea of like having these trees and then being able to take them down and having all the leaves like plop onto the ground as low poly leaves uh you haven't watched day six because you haven't done part two seems much harder or at least to run in a reasonable amount of time
06:00 - 06:30 I forget what day I'll look at the Adent of code site rather than my solution uh part two was the looping yes yeah from the visualization um what did mine run in I forget what mine ran in look at mine ran in two seconds it was definitely not um not a
06:30 - 07:00 fast solution I didn't do any like early cutting or anything like that so I have a very like straightforward implementation yeah so I figured I know that uh Bevy tunua isn't updated for 0.15 yet and I don't think there's even a PR for
07:00 - 07:30 it so our options for character controller are go very simple for today or embark on a whole Adventure so I think we'll go I think we'll go pretty simple today
07:30 - 08:00 hey Chris been getting into Bevy Moore lately and your content is huge help great I love that I'm glad that you're finding it useful all geometry no texture sense easier to you also more flexible less work less RAM usage better resolution look on close-up view yes but texturing is one of the things that I want to get better at so I also think it's a little bit harder to make untextured low poly look good
08:00 - 08:30 I still have questions around let's not go and view each individual pixel but like in the video here all of this rooftop is extra geometry which can be fine but then everything has to be a new like a new model makes it harder to build out more levels and then things like we were
08:30 - 09:00 talking about like the floor here with these rocks if these rocks aren't textures then it makes it harder to build out different kinds of floors and stuff and also like I know it's low poly so it's not going to have that many tries and stuff and it's not really going to be that high in terms of memory pressure and things like that but I feel like the extra geometry here probably isn't worth it
09:00 - 09:30 I don't know this is very low poly so TBD um but definitely for like the circle here I don't think it makes any sense at all for this to be actual geometry in the ground like obviously the Planters here would be and like these plants are obviously uh real geometry and stuff but like the circle texture on the ground I would make each individual brick here
09:30 - 10:00 same thing for like this path I don't want to make each individual brick uh building uh for example the floor with blend geometry noes and exporting should be possible what do you mean by exporting exporting to a texture or exporting as like meshes
10:00 - 10:30 cuz like while I don't really care about it from an optimization standpoint I don't really want all these little bricks to be like cubes with as icebergs right um there's no reason to have meshes like below the floor here or something like that so I figure I'll get started by creating a new project first
10:30 - 11:00 um I think I'll put this in we're doing it on stream I'll put it in Rust Adventure yeah exporting it as meshes yeah so you can definitely realize the geometry nodes and then um like export all of those as meshes you can't export
11:00 - 11:30 the geometry nodes themselves similar to the same way that you can't export grease pencil but you can export a curve uh I don't know what I'm going to call this I guess I'll just let's call it Bevy 15
11:30 - 12:00 game uh and we will rename it in the future if there's a better name for it one of the things that I really want to do through Bevy Cycles is like every three months build something and get it to a point where you could create a steam page for it so what are we going to need here we're GNA import stuff from blender
12:00 - 12:30 right which we don't need an external package for I don't think blend has a 0.15 release anyway so we're going to be working with raw gltf exports for the time being um some controls hey Minnie how's it going I think leafwing has a 15 release already I didn't actually check before stream
12:30 - 13:00 uh that's two months ago maybe they have a PR up oh 1415 14 okay so looks like 15 for leafwing isn't out yet so we'll keep our controller pretty light because both leafwing and Bevy UA don't
13:00 - 13:30 have 0.15 releases yet um which means that doing controls is probably going to change a lot for us so I think we'll focus on very basic controls here so let's start with I guess creating a gltf in blender that we can then export and uh bring
13:30 - 14:00 in am I taking slightly off topic questions absolutely the entire stream is basically for people to ask off topic questions um if I wanted to like be really productive I wouldn't do I wouldn't be on stream uh if I'm being honest let's see this needs to be updated I haven't updated blender so I won't update that uh if so what would you recommend for Bev UI these days I would recommend Bev why to start
14:00 - 14:30 with uh if you are um if you're just getting started I always recommended people that are just getting started or just learning to use Bev UI first there's a couple reasons for that one of them is that Bev UI is guaranteed to get updated across Bevy versions so if you start in 0.15 uh and 3 months from now 0.16 comes out then Bev UI is going to work right you might have to update it a little but Bev UI is going to be there it's going to work it's not going to like the
14:30 - 15:00 maintainer isn't going to disappear like there's going to be no issues right um and secondly bevi is getting better all the time so for example in this cycle for 0.15 Bevy picking uh was Upstream from Bevy mod picking um and that'll only get better so you're on a very stable path if you want to use Bev UI and there's nothing really like inherently wrong with Bev UI it's just kind of verose and there's no like real widget
15:00 - 15:30 abstraction yeah beby picking is so good I'm so happy I'm so thankful that everybody did that work we have to do um we have to do a bevy picking back end for Bevy ECS tile map after we get the 0.15 release out you just got a rightclick context menu working yesterday with picking in Native UI it was a pretty good experience I'm glad you recommend it yeah I think beui is fine like it's not
15:30 - 16:00 like I'm not going to say that it's better than something like Swift UI or like whatever right but like Bev UI is fine it works um there are people building great looking things with it yeah we're just missing a bunch of widgets now yeah I think we're missing a widget abstraction really honestly um I still don't feel like we have a [Music] good component abstraction if that makes
16:00 - 16:30 sense that may just be my like old web dev background talking but uh I really want to be able to create something and then required components it in and have it just work but I guess like you can kind of work around that um the hierarchical spawning is also still kind of uh kind of an issue but BSN theoretically will help that uh zero. 15 did zero. 15 not fix the verbosity a bit it definitely did required
16:30 - 17:00 components absolutely 100% um when I talk about bevu right now I'm talking about my experience up until this point uh I can't say that I've been like building games with required components for the last three months because it didn't merge that long ago so when I say that B UI was a little bit verbose what I mean is that previous
17:00 - 17:30 two required components it was a little bit more verbose than I would like um but required components is huge uh Bevy blendy cameras has a 0.15 release not sure you need it though maybe we need it for to start out because we are not really going to have a character controller so maybe we're doing going to start doing like environment stuff today we'll see uh Beast Legend hey how's it going yeah required component something
17:30 - 18:00 something absolutely uh what kind of game are you planning to do something a little bit low poly something a little bit um like 3D is something that we need blender some texturing for my keyboard isn't switching between computers fast enough for me to enjoy uh some of the inspiration that I'm using is like some of this stuff don't have a lot of inspiration in here yet but I like the look of the thing on the right and I think we need the camera angle of the thing on the left
18:00 - 18:30 uh because of you you spent some time trying beby you also tried looking at different networking crates but haven't found any that have great docks and rollback support Etc does anybody have a recommendation you've looked at Lightyear and Replicon I don't really have a strong recommendation but yeah ggrs and Matchbox and things like that are interesting um unfortunate that you didn't find enough documentation uh dreamer does have the core widget idea working in their crate I hope it get some Traction in zero that
18:30 - 19:00 16 that sounds amazing dreamer is doing some great work uh you've been building your own 3D UI system and now you're updating from 13 to 15 almost exclusively because of required components yeah that makes sense required components is pretty sweet uh what are your thoughts on using blender as a bevy editor I think blender's great um I really like the idea of of uh
19:00 - 19:30 blendy so one thing to note is that blendy is still technically in a like an alpha state it never really got a stable release for 0.14 um but it worked really well I really like this approach a lot um but obviously there's like a bunch of caution and warning at the top I think this is great I would like to see this workflow improve over time
19:30 - 20:00 I also think that Bevy has great support for gltf so if you can export something from blender um you can basically just pull it in and use a whole bunch of different data that you can store in gltf works pretty well and obviously Bevy doesn't currently have an editor so if you want a 3D editor you got to use something or build your [Laughter] own anyway I think it's a great idea that's what we'll be doing for this project for sure we're going to start off with raw GTS export uh and we'll move from there and
20:00 - 20:30 if blend VY ever uh gets a 0.15 update while we're working on this project maybe we'll switch over maybe we won't I don't know yeah the castle thing looks really nice like the art style reminds you a bit of tiny Glade yeah tiny Glade actually also just did a uh video I'll include it in this week in Bevy so it'll at least be linked on Monday um but tiny Glade did a talk on
20:30 - 21:00 their rendering approach that was really cool it's like an hourong talk I forget what conference they did that but absolutely very enjoyable um let's delete this let's get I guess a plane in here to start with oh interesting is available as a video Yeah tiny Glade the tiny Glade video is a is a video absolutely um maybe I have the name of the link
21:00 - 21:30 already I don't love bringing up my yeah it's called rendering tiny Glades with entirely too much Ray Ray marching from the graphics programming conference um let's scale this up maybe by 10 let's
21:30 - 22:00 say save this out to whatever directory what did I call this Bevy 15 game we need uh I think we're going to have like a raw assets directory and an assets directory um I don't know let's call this art I
22:00 - 22:30 guess and we'll pull our blender file in here and this is probably going to be like this is probably going to be a temporary blender file we'll probably end up also creating something else at some point so maybe we call this miscellaneous 001 blend that
22:30 - 23:00 sounds that sounds like how committed I am to this blender file [Laughter] specifically uh gltf export is done in blender by a plug-in you can write your own plugin for this plugin so quite powerful you had to do one export The View layers collections GF scene extras not cool but doable nice yeah the tiny Glade video and Tiny the game go buy tiny Glade tiny Glade is
23:00 - 23:30 awesome tiny Glade is a lot of fun um the other thing I want to do is I want to stick I think does the Armature come in as like one person height I feel like I want a scale in here very quickly
23:30 - 24:00 um I know that this is effectively like a 2X two Cube so we'll scale this down by 0.5 Move It Up by [Music] 0.5 I guess this is a 1ex one Cube now technically so that makes me feel feel like this plane should be
24:00 - 24:30 bigger let's scale this by like another scale this by another five I guess do you know of anybody working on Bevy LSP editor tools you have some code Snippets you could publish for emac BS code and you've been wanting to develop some sort of system param completion functionality I know of people working on the next generation of wgsl uh which is weasel
24:30 - 25:00 WL or I guess it's high higher level wgsl I don't know exactly what the relationship is going to end up being um I don't know of anybody that built a bevy specific like vs code plugin but that would be very cool I've seen some demos and examples I think bsp the Bevy no BRP Bevy remote protocol I almost called it the Bevy server protocol the Bevy remote protocol is very very very cool and people are
25:00 - 25:30 building a lot of cool examples on top of it uh let's see there's a demo here not a demo but uh it's basically a plugin you can add in and then it adds an HTTP server to the game and then you can get a bunch of information out of it so like this could be very very cool for a vs code plugin
25:30 - 26:00 I've seen it in emac I've seen it in a couple of different places already uh what game are we starting 3D low poly kind of thing you're wondering how much you can do with the remote protocol well it's easy to figure out because that's the blend V repo if you go to the Bevy repo and you go into
26:00 - 26:30 crates I think the remote protocol is its own crate Bevy remote go into Bevy remote and there three files so like there's an HTTP file and this is all kind of like RPC um I think it's in this file but I haven't checked in a second
26:30 - 27:00 built-in methods maybe yeah so get query spawn insert remove destroy reparent list get and watch list and watch so there's like a whole bunch of stuff here um and there's some documentation on it too so if you're if you're curious about what's possible with it this file tells you exactly what you can call there's also examples if I remember
27:00 - 27:30 correctly I think there's an example in the um examples repo that will get you started I don't know exactly where we put it though remote there we go so server client here's client this will just send like an arbitrary request so if you're looking for how do I write a rust program that communicates over BRP to a running Bevy app this is
27:30 - 28:00 it and then you can just start throwing different requests at it it's very very cool I worked with it um when the pr went in or when the pr was going in and did some review absolutely very cool uh you know what I forgot to [Laughter] install uh kind of kind of forgot the the critical dependency there
28:00 - 28:30 B Prelude star app new add plugins default plugins run yo what are we building small 3D game low poly Bevy 0.15 um this is the very very start of the game so so you just saw the first lines of
28:30 - 29:00 code so we have our a plane in here and we have a cube uh the cube for me is very important but not important for like scene building uh so I want to name this like scale Cube or something and I don't want to hide it in
29:00 - 29:30 viewport I would love to set this to not export but I think we're fine let's grab something else like uh do they really not have a capsule
29:30 - 30:00 so there's our game our game technically built let's not add that sphere add [Music] mesh I'm really surprised there's no capsule vertices radius depth cap
30:00 - 30:30 fill shrug um we'll keep this at 2 m i just scaled it outside of edit mode didn't I actually I think we're good uh um let's do
30:30 - 31:00 GZ1 g x May y gy1 so this will start to the left of our player so to speak you think it's under under metab balls
31:00 - 31:30 oh it is interesting huh what ises that export as cuz it's not a
31:30 - 32:00 anyway I'm very curious about that one of the other things that I haven't done is worked with the gltf scene extras oh then convert to mesh gotcha heyo first time on live your videos help me a little while ago learning some Rust stuff nice glad to hear that there is no capsule
32:00 - 32:30 okay that makes sense I think that I'm just going to go with the easy path for now because we haven't even loaded this into the the scene yet um maybe we will do two scenes I think and then I think two scenes make sense because eventually we're going to have a like actual player oh that's not what I want to do eventually we're going to have an
32:30 - 33:00 actual we'll call this first character uh we'll do cylinder that's all fine [Music] G1 I guess we scale this down a little bit
33:00 - 33:30 B I want a character in here that's 2 m though at least one but I think that most people are what is 1 meter 3T so 1.5 would really be like the the average size so let's do
33:30 - 34:00 what if this is two and I scale by 0.75 I should give me 1.5 if I have done my math correctly yes
34:00 - 34:30 perfect so I'm going to call this like first character or something uh and then we'll replace this later with something else so now we have I guess what do we call this test level. Z1 with a little Cube for scale a plane and then we can do export
34:30 - 35:00 gltf and we don't want to export into the art directory we'll create a new one called assets and maybe we call [Music] this named after the blender file
35:00 - 35:30 apply scale I thought I did apply scale didn't I I edit or I scaled inside of edit mode so we're good um yes I think we're good
35:30 - 36:00 maybe I need to do that for the plane though no we're good okay so M 001 looks like a great place to sit on the scale Cub Ponder that's going to be the game
36:00 - 36:30 you're going to it's going to be don't get up it's going to be one of those like don't don't click games uh and it's just going to be you with some relaxing music sitting on a cube and if you click you stand up and the Music [Laughter] Stops okay so let's do something really
36:30 - 37:00 simple here I think we just did this for the other project we were working on what's the best way to to show debug data like FPS on a screen I have an opinion here I think assuming it's updated to 0.15 [Music] uh I s perf UI I don't know it looks like it has an
37:00 - 37:30 RC released so I think we're good uh we will need to pull this in from Main currently it looks like well we can totally do that let's add that in here um I perf UI equals git equals uh we don't want the git URL
37:30 - 38:00 though want the https URL and then I'm just going to use rev equals whatever this is pull that in how do you how do you what
38:00 - 38:30 the [Music] f I don't know what you're asking how do I keep my command prompt on the bottom I tried doing that in zsh and no luck I don't think at all about that um it also goes to the Top If I clear so I'm actually not doing that YouTube chat is acting out no
38:30 - 39:00 worries so as always anytime we bring in something new we can go into the examples directory and I think this is going to be the easiest way to do it we need the perf UI plugin and a couple of things turned on for bevy
39:00 - 39:30 let rust analyzer keep up I haven't rebooted my computer in like uh 64 days so uh we may we may run into the issue that I haven't rebooted my computer in 64 days cool cool and then we actually need this is the system I was going to write anyway
39:30 - 40:00 here so we'll just throw that in and right here we will add add systems update or not update sorry uh I think startup but startup only because we haven't set up any state or anything
40:00 - 40:30 yet H I think I want um Bey asset loader in right away if I'm thinking about this so here you go FPS on the screen now uh it's important to note that the FPS here is going to be locked so for example this monitor that I'm running it
40:30 - 41:00 on uh is locked at 60 so it'll only run to 60 like it's not going to show what the engine could do if you were running it on a higher performance monitor with you know unrestricted FPS or something like that um I think if I bring it just onto my laptop screen over here then I take a screenshot of it and bring
41:00 - 41:30 it back to show you it's already running 9500 whatever so like there's and this is not release mode either it's worth noting like we didn't run this in release there's no optimization going on here etc etc um so that's the easiest way to get something that looks like that that is you know vaguely relevant uh I'm using 66% of my Ram
41:30 - 42:00 apparently but yeah there's a bunch of cool information here cursor position scale factor etc etc um I probably don't need all of this all the time I actually find some of these frame time things distracting when I'm doing development especially if I know that I haven't optimized the game like it's not running uh how do I say it if if it's not running in release and
42:00 - 42:30 everything yeah it's because of things like vsync Etc like the frame rate by default will lock to the same thing that the monitor is producing past 120 frames per second it doesn't make a difference I know people that run 480 that would beg to differ I know people that run 240 that would beg to differ [Laughter]
42:30 - 43:00 um okay so really all I want is this because I don't want all the other information if we're going to keep this around
43:00 - 43:30 and then we get frame rate up in the top right I still don't think this is particularly useful especially for what we're doing at the moment but yeah it depends on the game but if inputs are handled once per frame or physics run once per frame then it would diminish input lag and improve physics simulation yeah I mean what OverWatch does the thing where they do input
43:30 - 44:00 completely separate from everything else so that they can always grab it and then like shove it in uh sooner so that's my suggestion for FPS uh by the way uh let's see we have the gltf let's get Bevy asset loader in here as well
44:00 - 44:30 um I probably want progress tracking I wonder if they upgraded so Bevy or not Bevy um is progress updated y'll notice a theme in this person producing very useful utilities
44:30 - 45:00 by the way let's see 0.15 this is released 0.13 Bevy asset loader is depending on 0 out 13 perfect we're up to date love that so I am I do know that I want like PR ress and stuff at some point uh we're probably not going to do like a start
45:00 - 45:30 menu today but I do know that I am going to want it at some point so here's the progress tracking example and we can literally just pull this whole thing in and then delete some stuff uh but then we can also do it kind of ad hoc so we're gonna add this with progress tracking I guess we want 3D here
45:30 - 46:00 too actually don't know off hand what 3D enables we should check 3D PBR PNG deevy asset loader derive 3D I don't actually know off hand what that does my guess is gtfs or something
46:00 - 46:30 I don't know usually when I'm making games like this I also start going uh for plugins very quickly so I think maybe we'll do that too dang got like a tickle in the back of my throat um
46:30 - 47:00 so we haven't even started a li. RS file so let's start with that I didn't make this a workspace yet so I'm not going to overdo it we don't need to really do any of this
47:00 - 47:30 yet this track fake long task is going to be important that's kind of load bearing well not load bearing load bearing is the wrong word but this will undergo a refactor where all of this stuff ends up getting like pulled into its own uh plugin and
47:30 - 48:00 stuff so this is a fake task to make the loading longer which we can disable this is all going to come from Bev asset loaders Prelude
48:00 - 48:30 hopefully maybe it doesn't use Bevy asset loader Prelude star and these all get correct we don't have 2D textures for texture atlases so we can get rid of all of these can actually get rid of everything here um but I'll probably leave it commented out because at some point we will have
48:30 - 49:00 textures but at some point we'll also want to break this down probably into different texture packs and stuff same thing with audio we don't have audio right now but I do want audio and I'm just going to leave it here uh progress needs to come from is and then the juicy part here is all of this
49:00 - 49:30 I think we can actually get rid of these [Music] two progress plugin needs to come in what are maybe we just grab the uh maybe we grab the things that we should bring into scope from the top of the
49:30 - 50:00 file that we're copying code from that sounds like it would [Music] be useful oh right that's not a tupal uh we need to make things public when we put them into other files
50:00 - 50:30 bring them into scope and then we also need to do the transition from loading State out so init State couple of things going on here update I think all of this is necessary for us to get this to work and then instead of on Startup this setup is going to run when we go into the next
50:30 - 51:00 state we don't have print progress we do have track long fake long task I don't know why that's causing an issue we don't need this unless render description does something that I'm un aware of these both need to be
51:00 - 51:30 Pub feel like there's an extension trait here that isn't getting loaded why do these not come from the oh I guess cuz it's um it's weird that we had to pull in so many things aside from the Prelude but I'm not terribly worried about it and then this comes in as Pub this will
51:30 - 52:00 be private at some point so that we can like turn it on and off with a flag when we do our compilations I really enjoyed that uh experience from another game that we were building so we'll run this yeah enabling vsync will diminish the use users FPS without any gain yeah it's like Auto locking it down um this
52:00 - 52:30 monitor in particular I think only runs at 60 so it can't go any faster but the monitor that's like right in front of me right here is a 1080p 240 HZ so could potentially benefit from the additional frame rendering okay so we have a whole thing happening here we
52:30 - 53:00 need to pull in this asset this asset is copy relative [Music] path I'm going to put this in [Music] something like this I think we need the gltf from what we have done in the past
53:00 - 53:30 so we don't need to have assets on the front but we do need this stuff this doesn't need to be texture assets this is level assets I guess I guess we need this level one I don't know what I called it in the blender file test level one it's called
53:30 - 54:00 that uh this is not a handle to an image this is going to be a scene it's not going to be a scene rude is it I haven't done this with the new required component stuff in Bevy asset loader hello how are you welcome to the stream y'all well I upload to my GitHub wondering
54:00 - 54:30 about the name thank you um yeah at some point I'll up this upload this to GitHub right now we just call it Bevy 15 game at some point I'll upload it I'll probably rename it at some point Etc so yeah uh in the early game footage of tiny Glade you saw Anna used some kind of plotting indiv plotting visual as the ground do you have any idea what that is looks neat I actually am not familiar with um like what you're talking
54:30 - 55:00 about plotting visual you mean like a like a UV Checker kind of texture um this is not going to be required can you send a link to the X poost
55:00 - 55:30 probably you're going to get Auto moderated by [Laughter] YouTube if you wanted to do that you would have to send it in Discord yeah handle scene yeah that makes sense which I if the bot is running that will be the Discord link and if the bot has failed us again as it so often does yeah it's not connected to YouTube
55:30 - 56:00 why is it not connected to YouTube not logged in no wait that's not the right I can't figure out how to work [Music] platforms
56:00 - 56:30 [Music] YouTube account sign in come on little bot you can do it there we go bot is up and running now I should have like a check to make sure that that bot is actually running uh handle yes well handle GLT handle
56:30 - 57:00 scene scener is a component because handles are not components anymore do not quote you on this yes yes you're right you're right about all of that uh so at the end of this we want to do scene zero then I don't love that again like we run into this issue where I think it only works currently to do by index uh and I don't like doing by index
57:00 - 57:30 cuz indices change but it'll be fine for now and then I think here we'll do player assets Maybe both of these need to come
57:30 - 58:00 in here specifically uh you can do this raw by the way you can do this without Bevy asset loader for anybody that isn't aware of that
58:00 - 58:30 why is that not coming in Rust analyzer already giving [Laughter] up not really there's something else wrong but what's the idea for the new game the new game is kind of like uh low poly 3D um we're going to start off with probably just like being able to pick up a crate and move it no can't find level
58:30 - 59:00 assets did I miss the S oh I chopped the S off when I did that that's why that's where that other s came from rip yeah uh just you can just send it in general doesn't matter hello hello uh Chris do you think in the future Bev will adopt the directional blueprints like Unreal Engine or will stay as is I think it's
59:00 - 59:30 way too early to tell no idea I think that bevie is doing a lot of like um work on supporting editor like stuff so like something like blueprints might be possible in the future I know some people do like that obviously from the other messages in chat some people don't like it so it's also very useful to say um Bevy is going
59:30 - 60:00 to be like you're going to be able to write rust to do things for a long long time right that's intentional like the way Bevy works right now is going to be supported moving forward and then also there's going to be higher level tools built on top uh what's the top bar add-on in blender this is blender kit this little thing right here you
60:00 - 60:30 mean um we haven't used it yet I'm not really planning on using it right now I just kind of have it installed uh but it has a bunch of materials and stuff the downside of using blender kit is that it'll fill like your gltf export and stuff with a bunch of junk um not that I don't want to give like credit to the authors that made these things but a lot of them actually
60:30 - 61:00 have like non utf8 compatible bios which is like it breaks the export in certain ways uh which is really annoying actually but yeah it's blender kit um it's kind of cool if you're playing around if you want to just throw a material on something do whatever but I've had plenty of issues with it working with blendy and working with um like it in
61:00 - 61:30 general people are allowed to not like things you know uh not everybody likes working in certain ways some people won't like writing rust some people won't like scripting some people won't like blueprints some people won't like ufn or whatever can you recommend any rust resource for coming from C+ plus yeah the Rust
61:30 - 62:00 book there you go if you already know C++ and you're looking for like how rust is different this is like a C++ perspective on Rust so I would go read that yeah if y'all want to like talk about the workflow or technical reasons that you don't like blueprints feel free to do that but please don't just like uh
62:00 - 62:30 you know hate on [Laughter] things uh blueprints are visual scripting node-based visual scripting so something vaguely like scratch Etc I think that if you know how to write code this is probably way more verbose then you would like it to be
62:30 - 63:00 um you can probably write things much more easily by just writing the code but not everybody writes code so uh you sent the link let me check the link
63:00 - 63:30 uh that could literally just be a texture like that that could literally be a texture that has numbers on it right like it's vaguely a grid um they might have done something procedural because they are using Ray Marching for the renderer so they might have done their
63:30 - 64:00 own uh like procedural grid texture uh but you could easily do that like also with just a regular Grid or whatever um cool so in setup then we will be able to
64:00 - 64:30 access this scene assuming we did this correctly commands. spawn actually I just have this code sitting right here so I'm just going to copy
64:30 - 65:00 it I've got too many desktops so we don't need to do that we need to do levels Dot what is it called didn't make any of them Pub that's the other thing if
65:00 - 65:30 you're going to work with strs you're going to put them in different files you got to make them Pub so you can actually access the fields on them otherwise your auto complete won't work and then I think we will leave the player character for a second and just make sure that the original surrender
65:30 - 66:00 in uh right I thought we needed a clone but it didn't tell me when I wrote it so I was like oh maybe we don't for some reason uh we didn't spawn a 3D camera did we yeah I spawned a 2d camera uh we need to do camera [Music]
66:00 - 66:30 3D oh where do we want to put the camera that's a great question where do we put the camera over here we put the camera like nowhere important over here right I'll just grab I'll just grab the camera settings that we had over here uh we going to comment order independent transparency out for the moment
66:30 - 67:00 so that is an indication that we are actually getting our scene indexes uh wrong it's one of the reasons I don't like relying on indices you can't tell if you did something wrong or not also the other thing worth noting is that this is taking a while because specifically uh I have a fake task in
67:00 - 67:30 here that is taking a long time
67:30 - 68:00 I think actually if we don't have that then everything registers and it loads significantly faster so the loading here for the gltf is not related to actual loading time it is legitimately um I put a sleep in there effectively uh we can get a directional light in here do we need anything else I don't
68:00 - 68:30 think we need anything else for the moment I think other than directional light we might place the lights in blender we need to bring in pi F32 const version of
68:30 - 69:00 Pi this like super blown out though uh let's go in here let's stick like some kind of material here
69:00 - 69:30 actually let's stick a material on the plane those blender going to crash there we go let's call this um ground material I guess save this let's take this and do
69:30 - 70:00 an export to fbx let's make let's make a new directory that's like a substance temporary
70:00 - 70:30 directory and we call this ground I guess you found the Grid it's a glb file and it's a repo the same demo that she's showing nice that's go if you you want to share that link below the um below the Twitter thread and Discord
70:30 - 71:00 that would be cool I would love to see that what is the alternative to tag scene one Etc or how do you handle this on Long projects um I think on longer projects we'll have the gltf and I'll actually look for the names so I think we did this in this other project so I can actually show it so when you in this case this is just
71:00 - 71:30 like on an animation we're spawning in a new thing from the gltf file uh which happens to be using a material if you have access to the gltf instead of just the scene specifically then you can go in there and it's got a bunch of fields like named materials named animations named Etc and you can get something by name so actually this is the way that I would do it long term um and that comes
71:30 - 72:00 from the gltf which has named scenes named meshes name materials name nodes name skins etc etc I think names are the better way to do it what window manager is that that is is you buy y a b a i which I need to add to the chat bot
72:00 - 72:30 because everybody asks every stream uh there's another one that got mentioned in one of the comments on the Advent to code videos Aeros space yeah Aerospace some people have said that this is cool I haven't used it I can't recommend it because I haven't used it
72:30 - 73:00 uh It also says it's in beta so I don't know um but yabai has done me well for a number of years at this point uh you think there's a Frack Pi 4 constant or whatever the similar names no big deal just slightly more precise yeah I don't think the Precision matters in this case um but you're
73:00 - 73:30 right and there it is there so we could use it still works just to check clippy will think the precis you think clippy will think the Precision matters let's find out
73:30 - 74:00 doesn't look like it uh maybe it's one of the other rules it's possible I don't have the rule enabled either um what did I do here I just
74:00 - 74:30 broke it oh cuz I removed the import when I did control z uh do you think material extensions are the best way to dip your toes into Bevy shaders you found shaders to be really hard to get into I think it depends on what you're trying to do Sydney um doing a regular basic material with no material extension allows you to write things [Music] very very much more like from scratch so
74:30 - 75:00 if you're going to do relatively I don't want to say basic but like relatively foundational things if you're going to like try to figure out how to access the UVS if you're going to try to figure out uh like how to use the world space position and you're just going to like apply noise to a texture based on the world position or something like that I think that's probably easier to do without the material
75:00 - 75:30 extension let's see where's shaders here uh so here's extended material and I think Shader material is what we call this other one these days and you'll see that like the implementation here is basically just this obviously you also have to write the Shader um but the Shader itself is significantly simpler as well let me go to the assets directory assets
75:30 - 76:00 shaders custom material and where's the extension one extended material so here's the custom material it's like align the bindings right here's the extended material uh and you have to like care well you don't have to care but like you want to care about all the extra like lighting stuff and the post lighting processing and the alpha discard and like PBR from standard
76:00 - 76:30 material um there's a lot more going on in the extended material I think it's really cool if you want to interact with like the lighting and such that bevie already provides but it might be too much if you're just trying to get into um like the basics of shaders right this is very obviously smaller there's less Concepts here
76:30 - 77:00 Etc um that said do whatever you find fun because really honestly the only thing that matters is that you're also interested in doing it tomorrow right so if you want to work with extensions to the standard material then do that um understand that that will that will push you into like looking up what these things do right because this also has like a deferred Branch to it in this
77:00 - 77:30 Shader um and you might not be using the Deferred renderer yet so it's simpler to do like just a regular material no extension but the extension gives you access to the lighting information and things like that so it's a trade-off on what you want to do I don't know that I would recommend one over the other I think it's use case based if you want to write your own
77:30 - 78:00 stuff probably do a regular custom material if you want to extend kind of the standard material in some way then use the extension okay so this uh we have this thing in what was I going to do I was going to paint on it let's move move these
78:00 - 78:30 over open substance Banner thank you fun is the reason you use Bevy in the first place you think you'll build your way up from a custom material cool yeah I think both are valid and there's nothing to say that you have to do one and like stick with it and not do the other one you can do both right like you don't have to do any particular um approach or whatever you can always flip back and forth and do whatever you want okay let me
78:30 - 79:00 find this repo get our fbx in here the document resolution here is 124 um let's just bump it up for fun I don't know that we need it to be 496 but shrug hit
79:00 - 79:30 okay go to texture set settings do a bake even though we probably don't really even need this big textures there's nothing here to get the information from for the textures I'm just kind of like going through it return to painting mode and now we've got this plane that we can kind of work
79:30 - 80:00 with let's see if I can catch up at 2 XP you like the art style references nice yeah I think the I think going with the art style references spending a little bit more time on the art and whatnot and the environment and things is going to be uh very useful and fun um but we'll see let's go to layers um I wish this was a little bit bigger large there we go now hopefully
80:00 - 80:30 yall can see it too uh so there's a bunch of like tiles and things like this I'm not too concerned about what we actually pick right now I kind of just want to have the workflow shown and uh working so here's some natural mud right so maybe we throw that in that seems pretty
80:30 - 81:00 big but maybe not we'll see UV projection filtering repeat scale physical size tiling looks very tiled when we do it like that I think maybe we are we in the smart materials
81:00 - 81:30 no we want probably a second layer here add layer what else do we have probably like some kind of like not wood but Stone let's do a stone layer here and then let's add
81:30 - 82:00 a mask and then like this goes very smoothly between these two and there's our our Cube get in here how did our Cube get in here oh I exported the cube too ah ah I shouldn't have done
82:00 - 82:30 that um so we can do something like this that's hilarious that is so wrong in terms of like what I wanted out of this um actually let's back out of this and reexport this correctly because that is not what I wanted I wanted just the material or just the
82:30 - 83:00 floor fbx ground um selected objects export you're starting Advent to code day six and you gave me inspiration to tr to track tackle visualization and closure for it nice that's dope you should share that when uh when you get it
83:00 - 83:30 done all right so file new same thing we just did select the fbx file 4096 open um I'm going to bake this just because I want to get in the habit of baking it whenever we do that like obviously baking a plane doesn't really like do much in terms of like you know there's World space ID ambient
83:30 - 84:00 inclusion curvature there's no curvature on a plane like Etc sure thing you figured early in the Stream it's time to join the Discord we'll share there yeah cool sounds good uh return to painting mode and then what did we have we had dirt and whatever there's also some like stuff in here that could be
84:00 - 84:30 fun like eroded Cobblestone path I don't know that any of these would even be uh worth using in general but like eroded Cobblestone path sounds interesting so let's grab that I think that should just work I always have such a hard time
84:30 - 85:00 with getting stuff from this like asset store uh what else is in here we have then an eroded Cobblestone path that's kind of like light brown what would it be on top of probably something like this the two downloads aren't really going to matter
85:00 - 85:30 that much I think we can there's the eroded Cobblestone path let's pull the eroded Cobblestone path in [Music] here I think we need to make this way smaller and then we also want where was that other one that I just downloaded I wish there was a sorting here rocks Roots whatever this was
85:30 - 86:00 is so I think that can anyone send a link uh to the server yeah just type exclamation point Discord uh root a whole crate for dealing with 2D grids parsing neighbors sight lines Etc because of AD to code we love your
86:00 - 86:30 input so you'll link it in Discord yeah sounds good I'll take a look uh you're not sure photo realistic materials will look good with low poly geometry you're probably right I am not I'm not worried about the specific materials we're using at the moment um I'm mostly concerned with the workflow have I tried the hyped hyperland already I don't know anything about hyperland is this something I should be
86:30 - 87:00 looking up on stream uh oh yeah I'm not on [Music] [Laughter] Linux this is a Mac so uh I have not used it yeah you've been riding running hyperin for a couple months now nice how's it working um the other thing that I want
87:00 - 87:30 to do here is make this smaller what's the tiling we used here seven d that tiling is really obvious when we do it like that so one thing that I want to do is when this Cobblestone path comes
87:30 - 88:00 in I don't want to show below so maybe I actually reverse this and I add well it's going to crash never mind unfortunate
88:00 - 88:30 rip oh man bake bake B can become the third pillar in this industry among Unity unreal I try not to talk about Bevy in terms of
88:30 - 89:00 like how do I frame this I think that there are good options for many things right like you're saying third pillar but what about gdau right like gdau is fine you know let's do [Music]
89:00 - 89:30 7.25 and [Music] 7.25 and then what was I going to do I was going to do wow that really looks tiled there and then this would theoretically be the path but I want the rock to be let's do just mask
89:30 - 90:00 that and mask this and then draw here this is obviously like that doesn't really work in terms of like hey look a brick um but it's fine for the moment
90:00 - 90:30 can I create uh copy this mask copy mask let's paste into mask and really what I want to do is invert this invert mask and then probably also what I need
90:30 - 91:00 is a little bit more on the edges here oops that's not what I wanted to do can I not invert the color here there we go zero it's kind of like blend this
91:00 - 91:30 together a little bit and then file export textures so texture export we're going to bring this into
91:30 - 92:00 our rust Adventure art assets substance temp open that export done with that sweet um I guess I'll save this as well I don't really feel like I need to save it but we just crashed four times so maybe I do save
92:00 - 92:30 it and then go back into blender and then we have this material right we can go to the Shader and what is it command shift T control shift t oh right because obviously you would only have to select
92:30 - 93:00 one of them so substance temp we go to these I'm not going to select the alpha I'm going to select everything else though and we're going to get this in here and we're going to have textures and then we export this to gltf like we had before we're just going to export right over the one we had previously we are going to run our game assuming I fixed the issue we had
93:00 - 93:30 before this is episode one of a new game yes and now we have the path here uh plus the dirt with a texture on the plane and that already looks significantly better than it did before this isn't necessarily like
93:30 - 94:00 the like kind of obviously this is shoddily done like these bricks on the edges it's just Blended directly so I think I would probably try to create a combination of the materials instead um what's my opinion on Hackintosh I haven't tried doing a Hackintosh in many many years I think it's gotten a lot harder if I understand it correctly um if I was going to
94:00 - 94:30 do I don't think I would do a Hackintosh I think I think I wouldn't especially since rust runs just fine on a Windows machine uh I would probably just do Linux or Windows do I have an AMD or Nvidia card this is a Mac uh I assume you're asking somebody else though um my Windows PC is NVIDIA 2080 TI uh Xavier says don't know substance
94:30 - 95:00 but uh in your opinion removing the lower layer and removing the mask of the bottom material would be easier no need to copy paste invert the mask and repaint over one yeah I'm not uh familiar enough with substance painter yet to know what's exactly possible um I am definitely like I've used Photoshop for a number of years like over a decade easily um so I'm familiar with masking out stuff in different ways um I just
95:00 - 95:30 don't know where all of the stuff is in substance and after having it crash three or four times in a row um I just kind of wanted to get the texture into the game uh yeah so it's episode one of a new game Bevy 0.15 came out last weekend uh so this is going to be the 0.15 kind of game for that cycle so it'll we'll probably work on this for about three months uh what's the game going to be
95:30 - 96:00 about I don't really have like a what's the game about I don't have a storyline or anything um there's a couple of libraries that I'm still waiting to update so for character control and things like that kind of waiting a little bit I think I don't think I want to do a custom character character controller I think I want to either help update Bevy tunua or wait for Bevy tunua to update to 0.15
96:00 - 96:30 also leafwing input manager doesn't have a 0.15 release yet uh that's my preferred like controller input crate so don't really know yet I have a couple of like things that I'm using for inspiration uh somewhere here that I've just dropped into a random figma um I really like the aesthetic of lower poly stuff like this uh and I really like the kind of
96:30 - 97:00 texturing done in games like the recent Zelda game so yeah Vibes at the moment um I think the first thing I'm going to do is have a character that can pick up a crate and move it around so we'll see um obviously this texturing is like way more realistic than we need it to be but having the workflow down showing
97:00 - 97:30 that we can get Textures in showing that we can get blender out uh showing that everything can get into the game engine and everything is relatively important and then we have the character here that we can spawn in uh in this case we need to pull in not levels but but player and then this will be player
97:30 - 98:00 do player this is a handle so we clone it handles are basically just IDs very low cost to clone um one of the things that you'll notice quickly if you start doing like large textures and stuff is that bevy's asset system works better if it's slightly optimized so we have
98:00 - 98:30 like a little bit of how do I frame this because I have a completely unoptimized build I haven't done any optimizations of my cargo toml I don't have release mode running or anything like that um bevy's asset loading can be kind of slow because it hasn't run through all of that optimization process um we can absolutely get that in
98:30 - 99:00 here and it's actually something that likely should be in every Bevy project but because we just started uh it's not there yet for us so this will do that optimization um let's do cargo at Aven 3D is it underscore these
99:00 - 99:30 days no underscore let's make sure that Aven actually has a release nope that's not the a in 3D that I
99:30 - 100:00 wanted looks like we're a branch for 015 some stuff going in over the last hour I don't [Music] know what the state of the current main
100:00 - 100:30 branch is I bet you that the current main branch is the one we need yeah Bevy 0.15 so we can probably just wing it
100:30 - 101:00 honestly I think this is a workspace right cargo Tomo at the root yeah perfect so Aven 3D equals get equals this and this is uh pretty typical for being this early in the
101:00 - 101:30 process I think that even with the release candidate there were a couple of changes that went in that were pretty big like required components um so it's unsurprising that one month or like a couple weeks is not enough for people to get everything out so this will take a little bit of time because we just added these optimizations but it should work
101:30 - 102:00 out so [Music] modeling do I want to do the pickup Behavior or do I want to do something else I think the character itself probably
102:00 - 102:30 needs an empty here so let's do uh add empty sphere Circle arrows plane axes what makes the most sense I guess Cube
102:30 - 103:00 technically right and then the scale on this doesn't matter hello how are you so we'll move this up by 1.5 is maybe [Music] 1.7 I think that this is a little bit off the
103:00 - 103:30 ground so actually the anchor on this should probably be at the bottom but I'm not worried about it again because um this isn't going to be our player forever I think we need to do zga 0.2 5 if I remember correctly yeah that's the math so then this
103:30 - 104:00 empty um I don't know maybe we just call this hold or something hold slot you like arrows but you can change this at any time Choice made when adding is not important yeah I think I use a box because the first thing I'm going to try to pick up is a box so it makes
104:00 - 104:30 sense to match that in my [Music] head you wonder if you figured out how to make the multiplayer syncing server you watched the video where you said you couldn't do it I didn't say we couldn't make a multiplayer syncing server uh I said that we couldn't do reliable deterministic
104:30 - 105:00 physics in a peer-to-peer networked environment different things sinking like I I'm I'm considering taking that video down actually um because I think it gives people a bad impression of what's possible and what I was trying to do in that video is see if you could take a physics Library uh match it with something like matchbox for peer-to-peer networking and then do
105:00 - 105:30 roll back over the network and have the physics deterministic on both sides and that is what the issue was it wasn't to do anything with networking it wasn't to do there was no server right there was no replication going on uh in that sense I think the classic like have a server and Run multiplayer works just fine there's a number of libraries that do that in Bevy um but yeah I I think
105:30 - 106:00 about taking that video down every once in a while because I think it gives people the wrong idea okay so we have this empty uh um what is the plan for this empty the plan for this empty is to be a location at which we can stick something so
106:00 - 106:30 actually now that I think about that this probably needs to be higher cuz the center of whatever we're holding is going to be above this thing so that puts it right on the edge there and let's say this needs to go up by at least 0.5 if we're putting a
106:30 - 107:00 one Cube on it but maybe we [Music] do yeah maybe we just do 0.5 so the idea here is that this empty is attached to the character this is the the character right um and at some point we're going to have this character approach a box of some kind and click on the box probably through a ray cast or something like that um and then the box is going to go on top of the character and it's going to carry the Box
107:00 - 107:30 around at some point in the future we can probably try to do some kind of animation with it um and then we can kind of just move this empty around right we can say that the box then gets attached to that empty location the empty is what animates onto the top of the player and then the Box just follows the empty in that sense but for now this is our standin for a like a player um I probably should
107:30 - 108:00 have put a front on it oops I can still put a front on it I wonder let's just let's just put something in here let's do I need to learn the I need to use the shortcut for
108:00 - 108:30 adding um cone plane cube Circle monkey head let do a UV sphere this is way too many vertices for what I'm going to use this for but it's fine we're going to delete it at some point
108:30 - 109:00 anyway and then let's add a modifier search mirror uh mirror the Y AIS and then we're going to apply this
109:00 - 109:30 as well and then oh I'm mirroring both axes uh yeah let's do that move this up it's our player character it's got two eyes um I'm going to apply this
109:30 - 110:00 modifier I'm just going to call these eyes we'll add a material eyes base color dark pupils are dark I don't know and then we have a thing uh you would put the character in box origin at ground level and then hold
110:00 - 110:30 empty lower accordingly which is more adapted if one day you need to be able hold things of different size character and box origin at ground level Oh you mean the the origins of the character make that Anchor Point the bottom make the Anchor Point of the Box empty the bottom um and then those eyes will give
110:30 - 111:00 nightmares and then uh yeah yeah yeah I think that'll be more flexible in the future for sure but we can definitely fix it when that happens wonderful character design today this is now an anthropomorphic uh cylinder wonder how a higher poly skinned mesh would work in Bevy if only you were better at
111:00 - 111:30 modeling also parent the eyes I don't think I need to parent the eyes do I oh that's the wrong button that's
111:30 - 112:00 why I think because we're moving the whole scene around in Bevy we don't really need to parent this um I mean you're saying that but we're going to be moving yeah I guess you're right the scene is going to come in and then we're going to look for the the
112:00 - 112:30 character um unfortunately that doesn't look like it did anything
112:30 - 113:00 that's selection parent to empty parent inverse clear parent make parent without inverse he found unpacking the gltf scenes to
113:00 - 113:30 add specific bundles to the entities is cumbersome and Bevy yeah I think Blen really helps with that workflow um if we were using blend which we're not currently we would be able to come in here click on this and then just add components in this UI right here blendy doesn't have a 0.15 release right now so we're not really worrying about that at the moment so there is an easier way it exists
113:30 - 114:00 um but it does need like a 0.15 update like a number of things do there we go set parent to well I think that's the wrong
114:00 - 114:30 direction and then this and this o there we go now when we do this everything moves yeah so we export all
114:30 - 115:00 this nope that's the visualization wrong terminal I run this and then there's our little character with the little eyes his beady little eyes the components are stringly typed only right uh you mean when using
115:00 - 115:30 blendy blendy does the reflection it uses the reflection infrastructure in Bevy uh it uses the reflection infrastructure from Bevy to serialize to a Json file um to put them into the UI in there that UI limits your selection so you can't just type any word in there and then it pulls it back into Bevy through the reflection infrastructure so you do get some typing information going back and
115:30 - 116:00 forth uh there obviously is serialization but yeah okay I think that we have probably hit the limit at which we can do at the moment before we do any kind of character control um so let's start with character control I
116:00 - 116:30 guess I wanted to put character control off as long as possible um so I want to build the smallest possible character control system that we could do I've been doing so much Advent of code I almost just wrote a
116:30 - 117:00 parser I almost just started writing a a um uh a non barer um yeah the whole reflection infrastructure is a black box for you you'll have to take a weekend and dig into it at some point I highly suggest doing that Alice actually has a great talk from one of the Bevy meetups on the reflection infrastructure um very worth watching that there's also been a number of improvements to the reflection infrastructure in
117:00 - 117:30 0.15 which are very cool like um function reflection is now a thing Etc uh reflection is a very very very cool aspect of Bevy and one of the things that Bevy is like really built on uh so understanding it at least at a superficial level being able to like know what it does is really useful uh you have a fork of Bevy tuna that works with Bevy 15 and Aven with Aven main
117:30 - 118:00 branch or Aven from 0.14 also um did you PR it I didn't see a PR for 015
118:00 - 118:30 my only concern with a fork is if I use a fork and it deviates too much oh this is Aven that's not what I want I wanted to look at bevy tenua no you got rid of the most of the 2D stuff you'll do a PR later yeah I mean if you
118:30 - 119:00 [Music] have if you have a 3D version of um Bevy UA definitely drop a link in Discord I'll take a look at it I'll see if it works I assume that the way you use it is still the same like there's no massive update to like how it works or whatever I don't mind working with a fork until that gets uh like PR and
119:00 - 119:30 potentially merged yeah still the same nothing changed cool yeah yeah yeah I would definitely do that I'd much rather actually do that than um try to like hack in a character control Er When I know that I'm going to move to something else um you're not going to be able to
119:30 - 120:00 include a link if you want to use a link you have to go into the Discord um if you want to just tell me what the repo is you can also just like dump the org name repo name and throwing it in general is
120:00 - 120:30 fine cool uh main branch I assume cool cool cool cool
120:30 - 121:00 cool copy
121:00 - 121:30 hasta oh boy with the parenting and now the character controller this will imply a lot of work later if more when setting the object Orient okay we we will fix the uh we'll fix the origin now we we can absolutely do that um I think you have to tell me how to re-anchor things though
121:30 - 122:00 Mash I don't know where this is in in the
122:00 - 122:30 UI one day I'll W I'll know my way around blender and then oh in object mode two cursor position because we're in the Center sick that was great uh and then you're saying that this should also
122:30 - 123:00 be cursor is 00 Z right now as far as I know unless I mess something up doesn't look like it though um and you were saying do this at the top to right this is just a point when it exports like it'll just be a transform for us so I think we can do gz Nega
123:00 - 123:30 0.25 uh not 0.025 0.25 0.5 yeah so put it there and then based on the size of the thing that we're carrying we can move it up maybe I'm wondering how that'll work with
123:30 - 124:00 animation maybe we'll have to write a programmatic animation for that that'll be interesting you would also do that for the cube the cube isn't empty though you would also do that for the cube um I guess let
124:00 - 124:30 me let me get rid of this and this gz um negative 1.5 should be Center is not
124:30 - 125:00 Center oh sorry not this Cube thank you thank you for calling that out early um well Oh you mean for the cube in the scene the cube in the scene yeah okay okay okay okay okay sorry streamer brain you know you you think so
125:00 - 125:30 though I guess that makes sense for putting things on the ground and whatnot but won't the Anchor Point affect the center of origin for the concept of physics I feel like moving the origin is a really heavyweight answer to like that
125:30 - 126:00 question right because the origin of this isn't the bottom I'm trying to think through that in my head like yes it would be easier if the origin was the bottom for carrying
126:00 - 126:30 purposes but only if we're popping it onto the top right yeah if you want to do physics of any kind I feel like we need the origin to be in the center and I think that more generically if we're going to animate that empty if we're going to like pick it up with hands or something then um that needs to be like the center of the thing I guess we could pick it up from the bottom I don't know I guess
126:30 - 127:00 we'll find out when we do animation but and then yeah yeah yeah I see what you're saying then instead of using it like that we can do um what shift a I use the shortcut uh empty arrows arrows feels weird I don't like
127:00 - 127:30 arrows sorry and then this was moved on the Y by1 so that'll be exactly Center bottom and then we take this and this we
127:30 - 128:00 do command P object and now scale Cube has an empty inside of it I'll just call this hold Point Let's Go new project yeah I like that hold Point ground
128:00 - 128:30 point maybe I just name it bottom [Laughter] center so now all those empties should be there we're going to have to find them by name which is unfortunate um [Music] one thing that I am really interested in is potentially using gltf extras to
128:30 - 129:00 have these names I don't want to rebuild blundy per se but I do want to like attach some metadata but we can work through that uh so that's Bevy UA Bevy UA is in did we pull that
129:00 - 129:30 down just make sure this all compiles perfect it at least compiles um I'm assuming that if there were changes then it went into one of the examples set up spawn rigid body static we need
129:30 - 130:00 to set up Aven obviously so maybe we start off with physics plugin sounds weird well let's start by adding these plugins in Bevy oh Bevy tuua AV and 3D is the other thing that I need
130:00 - 130:30 to pull in and then the AV and 3D Prelude makes a lot of sense as well this comes from the same repo so I think we can just pull it in like this because it's a workspace
130:30 - 131:00 guess not uh what do I need to put this in this is [Music] in AV and 3D even without gltf extras The Entity will have a name component in Bevy yes we can look for it by name I feel like I wanted to do something else spous
131:00 - 131:30 network spous network uh do I need to specify the directory in a different way I thought this just worked for workspaces maybe not oh
131:30 - 132:00 dashes thank you I kind of wish that because there could only be one that it would automatically lower case or uppercase for you work space or not cargo workspace
132:00 - 132:30 cargo get dependency sub directory when you depend on a get uh cargo will crawl the entire REO looking for packaging you can depend on any of them that's what I thought would happen so I think I just because I was trying to fix the other one I added the subdirectory and I don't actually need to add the subdirectory like I thought
132:30 - 133:00 originally yeah I kind of want to like one of the things that I want to do when it comes to game development is I want to finish more games and to do that I want to bring the scope way way
133:00 - 133:30 way way way down so for example this game might just be picking up boxes and throwing them somewhere there may not be much more to it um we'll see but I want to keep keep it very very very very scoped so that it can actually go through and get deployed on itch at the
133:30 - 134:00 very least ideally steam but at the very least itch uh demo Source [Music] main I also want to buy a steam deck and get it to work on Steam deck um apply controls will need set up Lev set up player we don't really
134:00 - 134:30 need this is going to be very messy for this stream and I'll refactor it into plugins later uh controls in this case don't use anything special which is good because leafwing doesn't seem to have um the ability to do that yet or to do 0.15 so this will be tuua controller which is how we drive
134:30 - 135:00 tuua keyboard up down left right totally fine positive negative Z feed the basis desired velocity float height um I haven't set up the character with the capsule collider or anything yet we should do that so the other thing is that when we spawn
135:00 - 135:30 this we're going to want [Music] to reach into the scene for the player and add some of this stuff so in this case that's basically all of this mesh 33 mesh material transform yada yada um so we
135:30 - 136:00 had a way to think about this before in the last demo that we were working on and that's the scene instance ready Observer event I think that we will put it directly
136:00 - 136:30 on the scene that we're spawning here command spawn setup spawn spawn spawn character observe trigger trigger scene instance ready debug character spawned probably not debug do info
136:30 - 137:00 here scene instance ready comes in so now we have an observer on the character and when this character scene route gets spawned and everything's ready this Observer triggers at which point we can start looking for things and replacing them maybe a su B like puzzle game where you can only push
137:00 - 137:30 cubes not a terrible idea but I want a little bit more interactivity I think I think just pushing isn't what I want I I'm imagining like the pushing mechanics from like Zelda games and things like that which are all kind of like heavy weight and like they're not the fun part
137:30 - 138:00 of interacting platform or puzzle game where you stack cubes to get places that's a cool idea like almost and then if you didn't stack it well then you fall that could be funny and that could also be a co-op
138:00 - 138:30 game or not a co-op game but that could be a network game if we wanted to make it multiple people I think that I'm going to stay away from networking probably but we'll see maybe Co-op maybe local co-op and then we rely on something like steams networking seems like local play networking thing if people actually wanted to play it um cool so this trigger will
138:30 - 139:00 trigger inside of this we need to attach this stuff to the player entity um so all of this is going to be commented out for the moment
139:00 - 139:30 I guess we want entities and names right and then we want to find
139:30 - 140:00 um what did I call this character character entity name equals this else error no character found in character
140:00 - 140:30 scene that is a hard error we cannot uh continue if that happens cargo format breaking why am I not adding the code directly when spawn the entity because I'm not trying to do it on I guess I could do it on the scene
140:30 - 141:00 itself um let me think about this the capsule has to be at the same level as the bundle the rigid body has to be on the capsule you don't get to move these two things away from each other the controller could be on the scene um I think actually you're right the scene would
141:00 - 141:30 work I don't need to do what I'm doing you're absolutely right I don't know why I was doing [Laughter] that um I'm going to leave this here just because it's probably a useful piece of code but uh yeah you're absolutely right I don't know why I was doing
141:30 - 142:00 that I tend to I tend to refer to that as streamer brain uh because sometimes I just get locked into random stuff because it's a little bit much juggling like chat and everything else and you know uh why is this collider not
142:00 - 142:30 available see you minor thanks for hanging out collider is defined in Avan 3D perhaps two different versions of Aven 3D are being used right because I have have to use the one that you're using here right which one are you using
142:30 - 143:00 here main branch that looks like it should be fine I think that should match with what I have um let's [Music] cargo uh I can't remember cargo tree I Aven 3D it is indeed
143:00 - 143:30 ambiguous um one is Main and one is a REV oh interesting those get treated as completely different versions that is really interesting actually I'm fine with changing mine to Main
143:30 - 144:00 so that should clear that up for us so basically we had two versions of Av and 3D which meant that the collider couldn't get resolved it's always an adventure doing like early 0.15 stuff or like early zero. whatever
144:00 - 144:30 stuff okay says character spawned but clearly it didn't show up that's really interesting let's remove some of this stuff oh it
144:30 - 145:00 probably just fell through the [Music] floor yeah okay it's it fell through the floor uh there's nothing wrong here interesting you need to put a REV in your fork then um I think you only need to put a REV in your fork if you intend to lock it to a specific specific commit which I don't think you need to do um I think you have done this
145:00 - 145:30 correctly because this allows more usage of different commits than putting rev in rev will bind it to that commit specifically so by using main um I can also use main here now and in my lock file it'll lock to some version of main I think if you wanted to make sure
145:30 - 146:00 that it absolutely would work with a specific commit then you would use rev but Maine is probably a little bit more flexible a little bit more useful yeah also like I don't anticipate many people being like Oh I'm going to use the like Branch before the pr so it's up to you um the other thing I want to do is scene route here we actually do need
146:00 - 146:30 to do this observe thing can I do cargo format on this okay I don't know what's going on here but rust analyzer really not liking it maybe it's too deeply nested or something anyway this doesn't need to be
146:30 - 147:00 here yeah it was I think um so dot observe on level is that the right thing if we dot observe on the level spawn I think that's right we want the trigger entities this is the level
147:00 - 147:30 spawning um name here is ground yes the lock file will lock to a REV I don't know offhand I don't remember how you would lock it to a REV intentionally but I think you can do that
147:30 - 148:00 too ground entity why is that saying it's not oh because I don't use it after else info ground round entity um and I think we do need to do this this way because we have to reach into this scene
148:00 - 148:30 to get to the plane to do the collider on the plane so if we have the entity we also want commands and then commands. [Music]
148:30 - 149:00 entity ground entity do insert collider Constructor which one do I want to use
149:00 - 149:30 we could just run it with a half space for now but then we don't really need to look at the collider Constructor
149:30 - 150:00 I also guess that we would want a bottom anyway so we could probably just half space that but we'll see um try mesh from
150:00 - 150:30 mesh assuming that mesh is actually there I know beev inspector e guy is yeah it fell through the floor so that's not no ground found in ground scene it's not called Ground what is it called probably still plane right yeah let's call this
150:30 - 151:00 ground uh save that export it run the game again panicked no mesh no mesh handle was found uh that's interesting that's interesting because I don't know if the logic was written for this to work
152:00 - 152:30 Constructor for inserting colliders on the same entity use collider Constructor I'm assuming the 3D feature is enabled we would have more issues if it
153:00 - 153:30 I think collider from mesh is something we probably need to enable I don't think that's on by default but it seems to be working except for the fact that it can't find the mesh handle why can't it find the mesh handle is an open question um I think Bevy inspector IGI has a release
153:30 - 154:00 right yes so let's get Bevy inspector UI in here and look at the tree yeah I think it is I think if it wasn't on by default we would be seeing a different
154:00 - 154:30 error oops cool wonderful we need the world inspector Plugin or we don't need the world inspector plugin but that's what I'm going to use uh this is going to
154:30 - 155:00 crash dependency is definitely getting up there as we add more crates
155:00 - 155:30 I'm a little concerned about the dependency jump there but I don't see any duplicate bevies or anything so I think we're actually okay it takes so long to build when you have to rebuild large amounts of stuff it's worth noting that I am using a bunch of GitHub dependencies here right and when we add new stuff it
155:30 - 156:00 basically invalidates some of this and has to actually um rebuild more than it actually would have to otherwise so it's worth noting that this is a pathological case in the sense of building things because I'm doing all of these like source code GitHub dependencies right like Bevy asset 0.15
156:00 - 156:30 is compiling here we already compiled that it shouldn't need to again but because I added the new dependency um some things get invalidated it has to build more than it should uh maybe the function yeah that's what I'm thinking too maybe the function isn't ported uh because handle component is mesh they replaced but that would mean
156:30 - 157:00 that um they wouldn't be able to query for the handle which would be a compilation error so I think we're good I think if it compiles then it should work I just need to make sure that we're placing it on the right thing the thing that has the mesh which may be one level down from the thing that we're looking for but yes this is admittedly like
157:00 - 157:30 rebuilding from scratch is a decent amount of time um incremental builds go much significantly faster but especially when I'm adding dependencies that rely on get less caching can happen um I will also say that this isn't set up for fast builds um there are ways to set this up so that be is a dynamic library and
157:30 - 158:00 other things like that um I don't have any of those set up currently maybe we should set those up um try mesh from mesh yeah so mold mold was useful sold
158:00 - 158:30 used to exist but the Linker um that Apple shipped kind of obsoleted sold yeah I think this code is going to go on GitHub I haven't pushed it yet I'll probably push it um I don't know I don't know when I'm going to push it I'll push it at some point I've got a lot of stuff to do so
158:30 - 159:00 um I'll probably push it under this name and then we might rename it uh in the future uh right yes blender object when exported to gltf object will be an entity but the mesh material will be a child yeah that's what I'm thinking too I just want to confirm um R compile times can get quite high for large projects yes especially ones that use macros very heavily um that being said your Advent of code for this
159:00 - 159:30 year compiles into clean 0.7 seconds yes so this is a high dependency uh Bevy application right that is depending on git based dependencies which behave a little bit differently um if everything was crate this would have gone much faster uh I also have a couple of optimizations turned on and I'm not using any of the dynamic Library stuff any of the things that would speed up
159:30 - 160:00 compilation so worth calling all of that out also worth noting that um from what I'm told because I'm not a production Unity engineer or anything like that um from what I'm told the compilation s that Bevy has when set up uh correctly are not that different from other
160:00 - 160:30 ecosystems uh your total years of experience in coding are you asking for how many years of experience I have um more than a decade I haven't counted in a while I have let's put it this way I have more than a I have I have a decade just in react and I've been programming for longer than that
160:30 - 161:00 [Laughter] so I have uh Decades of experience um that's character we don't want char I want monitor pointer level children entity
161:00 - 161:30 children this is our ground this is where we're putting the thing that I don't think we should be putting and then we have a plane inside of it so I think we have identified the issue for sure and that is that this plane is the
161:30 - 162:00 mesh damn you need to learn react almost all job listings require it and you recently graduated yeah react is everywhere at the moment um it's funny because I was I've been doing that work since before react was a thing so I don't know I just find that really
162:00 - 162:30 funny okay so ground plane plane is named it looks like with plane um so let's name this ground mesh I guess I would like to attach a little
162:30 - 163:00 tidbit onto this um as metadata but I actually have to look into how to do that so ground is here ground mesh run you were there when the react scriptures were written yeah I I guess I
163:00 - 163:30 was uh we also need to add the actual collider uh big fan of your rust and Bevy contact you've crashed and burned trying to learn rust twice now giving another shot lately your typescript one trick right now cool I'm glad that you are enjoying uh the rust and the Bevy
163:30 - 164:00 stuff that being said you finally have time to pick up warbl or grass again sick you have to completely redesign it with all the Bevy changes that doesn't surprise me at all did we get a
164:00 - 164:30 collider yeah there's a collider in here we can see the ancestor marker collider entity child ground ground mesh ground mesh has a collider uh I guess the other thing we need is the rid body right rigid body
164:30 - 165:00 static yes the easier way would be to use blend V to add the component to tag the ground mesh entity the issue with blend V is that it doesn't support zero to 15 right now that's it that's the only reason we aren't using Glen at the moment
165:00 - 165:30 um let's get the physics the bug thing on I don't remember exactly how to set that up but I know that Aven has uh a debug like plugin to enable debug dump 3D physics debug plugin that's what we
165:30 - 166:00 want did I add Aven this thing is like just zipping through uh I wonder if it's not loading fast enough actually now that I think about it I wonder if we should be doing the
166:00 - 166:30 player after the level spawns let's try that for kicks actually uh setup here player assets and then character here copy those comment it out um in this Observer then I want to [Music] add that and this paste so we will spawn the character
166:30 - 167:00 after hopefully the collider for the floor has been uh put together whoa that went somewhere you saw the character went to the left of the screen instead of falling uh it went to the left of the screen before I changed the spawning let's go back to
167:00 - 167:30 here I should probably Zoom the camera out yeah it's running it's running okay so maybe that's a TOA thing and not a [Laughter] another way would be to add a custom property to the mesh and blender select the option to export that as gtf extras yes that's kind of the gltf extras thing that I was talking
167:30 - 168:00 about um I do want to do that I think I think that that's worth doing okay where's our camera I want to make the camera maybe a little bit more zoomed out give us a little bit more of a
168:00 - 168:30 chance to see this thing running away of course it doesn't run that time there it goes [Laughter] sometimes it does stay there though that's really interesting okay that was a that was a
168:30 - 169:00 runner there we go sometimes it chills right there maybe it's spawning inside the ground yeah I'm I'm I'm assuming that the colliders here are set up in a weird way um I didn't check anything and especially like this capsule collider um because we moved the Anchor Point to the bottom this is probably
169:00 - 169:30 spawning the capsule collider uh not just not uh at the midpoint of the capsule which unfortunately I think that means we have to move the Anchor Point back because there is no other option for where to put this capsule it has to go here it has to be at the same level as the Chua controller
169:30 - 170:00 um I remember asking about this specifically from the creator of the crate and currently this is It's not like an actual restriction like it has to be there forever um but it it does have to be there currently in the current implementation see you Ryan thanks for hanging out um and then the sensor yeah so unfortunately we
170:00 - 170:30 can't offset this collider capsule uh so I think it is actually in the ground here oh you're bad sorry about
170:30 - 171:00 what about the the um gltf extra stuff no you're you're good I appreciate you uh mentioning it because if I didn't know about it then I would know about it now um I just saw that the left two components mass and an angular initia in the code and you copied them oh did I really oh yeah these two yeah
171:00 - 171:30 yeah oh yeah moving it down I that's not your fault though um this is a restriction of like the way that tunua happens to be currently implemented um so there's no way you would have known that first character um we can put an empty down
171:30 - 172:00 here though and position it with the empty instead let's see so to do that then object set origin to
172:00 - 172:30 Geometry run that still running away um I wish I could turn off the rendering of the plane in
172:30 - 173:00 here oh invisibility hidden we can we did it yeah so look at the collider down there um let's see it's a height of one collider capsule that must be the top right there it's still centered on that Anchor Point I think although I thought I just changed that maybe I
173:00 - 173:30 didn't no that looks right maybe I didn't save and Export that's possible yeah it's not you're right it's not
173:30 - 174:00 spawning on that it's spawning on the scene the scene is centered at that 00 um that's why I was doing the Observer okay so in that case um easiest
174:00 - 174:30 solution is that for at least the collider positioning try to get one of the ones where it
174:30 - 175:00 stays are we sculpting a sentient marshmallow yes I don't think we're going to get it um so the question then is this has to have a transform that is slightly
175:00 - 175:30 higher transform from XYZ uh 0 0 and this is going to be 0 .75 in that case now it's floating it's got
175:30 - 176:00 superpowers yeah that's exactly what I just did uh we do need to make the capsule a little bit smaller I think the capsule actually the capsule might be the right size the cylinder is
176:00 - 176:30 1.5 and it looks like the head and bottom of our capsule is that the height of the capsule or the height of the circular segments collider capsule radius and height excluding the hemispheres so the
176:30 - 177:00 hemispheres I don't actually know how big the hemispheres are so I'm just going to cut this down by a little bit Yeah I'm I'm not convinced Z I'm not convinced 0.75 is the right um
177:00 - 177:30 answer um this number is very specific but I can't remember exactly what it is I think it's one just less than half um sensor [Music]
177:30 - 178:00 maybe this really I guess that's in the Aven one um let's go to crates that Aven docs yes love that it didn't
178:00 - 178:30 build um can I do 0.1.0 did the docs fail to build for every version of this dang that's really unfortunate I guess I'll look for it in the code Okay add this component to make a
178:30 - 179:00 proximity sensor cast a shape instead of array collider oh it's a it's a shape cast I thought there was a specific size this had to be but I can't find it in the docks um I think it's just less than half though so like 24 oh wait that's the X isn't
179:00 - 179:30 it so this should be fine so what are we looking at here the capsule is 0.5 by 0.5 our little friendo is just like
179:30 - 180:00 floating yeah I could run cargo doc it'll take a little bit of time to build but right like
180:00 - 180:30 there's 900 transitive dependencies the document so question why are we floating that
180:30 - 181:00 high I don't think we can run while we're building um this also doesn't need to be like specific this could be like 10 right like this doesn't uh this doesn't really affect much except for where it
181:00 - 181:30 starts um I don't really need Bevy documented Bevy is fine one more yeah so let's cargo run
181:30 - 182:00 that it does work it's just floating a little bit too high
182:00 - 182:30 I thought I looked I tried to look is the default 1.5 oh float height oh yeah right obviously yeah that's
182:30 - 183:00 yeah float height must be greater if even even if by a little from the distance between the character's Center and the lowest point of the collider so actually uh we probably can do something like 0.8 not cargo do thank you that was that was exactly
183:00 - 183:30 it now we've got our little uh anthropomorphic cylinder we can probably jump this down even lower to 76 this will only
183:30 - 184:00 be relevant as um it's a cylinder and we can very clearly see where it's touching the ground let's see float height Etc Etc think I'm cool with all of that the one thing we need is a ray cast out from like the front of the character
184:00 - 184:30 there we go how was python not
184:30 - 185:00 found no module named simple HTTP server come [Music]
185:00 - 185:30 on guess it's HTTP dos server now okay and then we've got
185:30 - 186:00 newa probably not going to do any of the like animation integration stuff today I think we're within an hour of end of stream for sure desired forward tuna walk do we have that
186:00 - 186:30 happening TOA built-in walk desire velocity float height we want this desired forward
186:30 - 187:00 yeah [Music] Direction think that's already a direction Vector we need a d three and we have a Beck 3 where did Direction Vector come from
187:00 - 187:30 what are they using there this came from player input thing that doesn't exist cool so I'm going to treat that as pseudo code [Music]
187:30 - 188:00 um is the direction mean that we have to normalize it I don't remember off hand dur three let's see what dur3 normalize Vector yes so if we do normalize then that will work for that help add a semicolon a semicolon oh because I randomly added a
188:00 - 188:30 p in a random location I think interesting
188:30 - 189:00 uh sensor locked axes controlling the character I kind of just want a query for the facing Direction I
189:00 - 189:30 think I guess but now that I'm thinking about it I am probably not going to rotate this at the moment not Aven tuua the
189:30 - 190:00 fork this demo if I remember correctly and it wasn't deleted includes reading that information no it doesn't so if we go to the Bevy Chua
190:00 - 190:30 repo repository demos maybe not the demo maybe examples here's handle animating the only thing that I really want out of this in general is
190:30 - 191:00 directional start set start set start set doesn't actually look like it handles
191:00 - 191:30 direction that feels weird I know we did that in our other game uh wash cycle so maybe I'll go take a look at that for a second here oh did I have that randomly up I think I
191:30 - 192:00 had that open on my other computer or my other monitor so that's this controls we built out an animation graph uh that's the loaded gtf tenua animation is the file where we have our logic query for the entity handles
192:00 - 192:30 animation graph stuff not a lot of this really matters to us right now um we're finding different [Music] things discriminant jump jump State Crouch this is all very similar to the demo or the example that's in there we also aren't handling
192:30 - 193:00 Direction which is very interesting I think the interesting part of that is that we have our cylinder here right and we can move in different
193:00 - 193:30 directions and it doesn't rotate at all so how did I get it to rotate in my other game my other game by the way is the first time that I used Bevy tunua I am still upskilling into what it does um but it's something that I want to be much better at using especially by the time the next game jam comes out so the Bev 16 game Jam I want to
193:30 - 194:00 be real good at knowing what Chua is capable of okay that's the level this is the character accumulated translation angular velocity what do I have spawned in on our character in the other game controls grid
194:00 - 194:30 lib game scene player player scene bundle this would be our new scene route Dynamic capsule controller animated State player action Collision layers inventory child we have some collider stuff
194:30 - 195:00 sensor feels like we don't have a lot different player collider height player scene bundle I know in this game it faces the right direction so maybe it's just
195:00 - 195:30 this controller bundle collider Dynamic scene player feels weird I guess rotation locked right that is fully rotation locked and we don't actually want fully rotation locked
195:30 - 196:00 TOA can fix the rotation but the character will still get rotated before it can do
196:00 - 196:30 so yeah this is what I want I want I want it to be able to rotate in the Y AIS okay and now it rotates
196:30 - 197:00 unfortunately um I put the Eyes on the wrong side I [Laughter] guess because that's forward this is backwards so the eyes need to be 90 degrees to the left o that's the wrong thing that's not the right
197:00 - 197:30 demo yeah so it's like this and then when we go forward that is the facing but eyes need to be 90° to the left giving everyone the side eye um so we can just rotate this let's take this let's do
197:30 - 198:00 rotate rotate y90 nope that's because it's Z up in blender rotate Z negative 90 nope 90 n rotate z90 that's what I need and then
198:00 - 198:30 item uh object apply rotation because we don't want it to be like rotated we want this to be the default so we run this I full screen it and we
198:30 - 199:00 get a little cylinder running around looks a little weird when it comes to Landing I don't know what that's about I'm sure there's a I'm sure
199:00 - 199:30 there's a bug on my side to fix there whether it's something or other spacing issue maybe looks like maybe maybe 0.76 is not quite enough space I feel like Mac OS puts me on some random window whenever I get out of full screen uh
199:30 - 200:00 0.76 maybe we make that a little bit higher it's got this weird this weird as aspect to it I'm not exactly sure why that's happening but we can debug that at some point not too worried about it I think
200:00 - 200:30 the thing that I'm really interested in um is actually I want to I think I want to put another empty here I don't think that we really need to per
200:30 - 201:00 se there's two two things in my head one is that if we stick Another Empty in here then we can use that as the translation location for a ray cast out and then we can move it around in blender and then physically see where that Ray cast is uh which is cool and then we can use that Ray cast to like collide with the cube collider and then that Cube collider can get selected when we hit a keyboard shortcut and it can go onto the
201:00 - 201:30 head um I think that's how I want to do it for now uh game scene this is our thing let's
201:30 - 202:00 get rid of this dock so here cuz that also means that if we do it in blender then we also don't need to worry about the rotation because the rotation is just handled because it's
202:00 - 202:30 parented to that AV and 3D raycast or raycaster you think the extra geometry also gives extra detail you like
202:30 - 203:00 that um what do you mean you mean like if I put an empty on the character for the raycast we could also I guess we could do like a a visual for it that would be interesting um each Ray origin Direction the other thing is that we can just put this
203:00 - 203:30 on the character origin direction we need to be able to get that direction is the thing so let's do FN raycast player um we want to on our player when we're spawning in the
203:30 - 204:00 character scene create a Ray Caster this Ray Caster I guess doesn't need to be active all the time but if we put it on the character here
204:00 - 204:30 what is the right so VC 3 new and D 3
204:30 - 205:00 new the VC 3 would be what are the axes we're using here z z 0.25 the zero some height and then some
205:00 - 205:30 front and the direction would be uh same direction so 0 0 1 is that not how you constructed d three NE Z yeah well does it need to be negative I think it can just be Z
205:30 - 206:00 right so we have the Ray Caster we also have the debug on so I assume this is an enabled by default but who knows um RC casting let's swipe this for a second and basically use it for our
206:00 - 206:30 raycast player stick this in update add systems update breakast player yeah I'm not trying to do the forward
206:30 - 207:00 um forward right I'm trying to do relative to the scene the player that I have so we'll see I also need to add a cube collider onto that Cube yeah this is what I wanted that's really
207:00 - 207:30 interesting no matter what it always goes positive it feels really
207:30 - 208:00 awkward I think actually that's Global so that actually needs to get updated maybe we do both things in the same query
208:00 - 208:30 here update player raycast we'll take this and then we also need we need the direction the player is facing in here we've got to be able to get that from Tina right or should we just get that from
208:30 - 209:00 the transform uh let's see for cast let's say mute raycast
209:00 - 209:30 transform uh in mutable query debug raycast transform I think it'll be what transform dot translation dot is there a reason that isn't autoc completing uh it's not translation it's transl uh transform. something
209:30 - 210:00 else update player rcast also going to run in update mute raycast I guess this is just telling us we never mutate it that's
210:00 - 210:30 fine translation rotation and then Ray cast has Direction so transform. rotation dot why is this not autocom completing transform. rotation
210:30 - 211:00 dot why is this so hard to get as a back Bevy querian querian Dot aine from from from from from to array two axis
211:00 - 211:30 angle I feel like this should work two axis angle you think transform
211:30 - 212:00 forward that would make more sense wouldn't it so I made it harder for myself because I wasn't paying attention to what I needed okay let's do that that makes more
212:00 - 212:30 sense so this will update hopefully in the right direction all the time this will then print the hits for us we don't have any hits so still doesn't
212:30 - 213:00 work what else do we have on raycast enabled origin Direction local origin and a direction raycaster
213:00 - 213:30 will find each hit and add them to the ray hits this is a local direction or this is a local origin specifically so I feel like it's local based on the thing it's added to on the
213:30 - 214:00 transform maybe we'd set the transform let's set the origin to zero to start let's not be tricky here um let's just say instead of this we do VC 3 Z
214:00 - 214:30 feels very awkward finally at home welcome to the stream hope you had a good uh whatever trip you're
214:30 - 215:00 doing probably work honestly or school um okay so the direction local origin and a direction origin at 0 direction direction may be
215:00 - 215:30 Global why would Direction be global presentation of the music SCH you got to yeah
215:30 - 216:00 nice this is really weird yes it's when so whenever I'm going in a straight Direction like north south east west it always is rotating when I do that and then once you get to go straight in that direction it changes to just
216:00 - 216:30 Z I don't know if I can make this any bigger in terms of debug but could be something weird could be anything weird it's on the scene and I think the scene is the thing we have the tuua controller on tuua controller should be
216:30 - 217:00 giving us this direction um which it is working in that sense oh the loc the local direction of the ray relative to the rotation of the ray entity or its parent e
217:00 - 217:30 so this is
217:30 - 218:00 controlling I guess that would make sense [Music] so okay local origin of the ray relative to the position and rotation of the ray entity or its parent so I'm assuming it's the parent here right and then the local direction
218:00 - 218:30 of the ray relative to the rotation of the ray entity or its parent so this direction should be what if it's already rotated in the direction that we need it to be then we need like forward whatever that means
218:30 - 219:00 fix that dur 3x or dur Z yeah we already okay so here's the the thing we're doing right now
219:00 - 219:30 um let's not update this currently yeah we I'm seeing some really weird issue here uh that I don't quite
219:30 - 220:00 understand d three that's the issue right there so this is fine this is fine this is negative this is
220:00 - 220:30 negative right right it should have worked already if that were the case there's some negation happening here right we we've got the this all works if we do this whole Corner up here it works uh once we start going this way it goes the opposite direction so there's like a a negative that's happening here that we don't
220:30 - 221:00 need right what is that yeah it looks like some kind of absolute or negative right feels really weird vc30 puts it in the center of this
221:00 - 221:30 thing D3 Z should be or negative Z I guess should be forward right it's possible there's a bug in the raycast there uh I don't want to say that it is because I feel like this would be user error more than anything
221:30 - 222:00 else um examples for 3D for rake
222:00 - 222:30 casting this is just doing spatial queries which are another option asign is also possible or A10 or something yeah I feel like I've done this before and it's worked so I'm surprised that um I would be surprised if there was a bug although I we are using an unreleased version of Aven so like not
222:30 - 223:00 terribly surprising if there is one and we're like in between you know default for raycaster direction is X origin is
223:00 - 223:30 zero with ignore with Max imp PS enable disable global global origin set Global
223:30 - 224:00 Direction I feel like we shouldn't have to do this but theoretically uh we have this system here
224:00 - 224:30 oh that's probably private isn't it yeah we're definitely 100% not supposed to use that yeah I mean I I don't think we're supposed to like have to use that right
224:30 - 225:00 um it feels weird that it works for half of the rotation and not another half let's see Ray Caster from Ray with Direction enable
225:00 - 225:30 disable nothing useful here ray 3D same thing thing so nothing different here we do have to specify this right like this
225:30 - 226:00 okay so this is to the left this is to the right that's to the left and that's to the left so going what is technically forward
226:00 - 226:30 Works going what is technically to the right Works going left flips around entirely and going down also uh ends up on the right hand side um I'm not sure I really don't know kind of at a loss for why this is not behaving the way I expect it
226:30 - 227:00 to Let's print the global Direction Maybe uh visualization is built in yeah feels sign dropping you think it's the other way around to the right is correct to the left is not I think either way it sounds
227:00 - 227:30 like it's a sign dropping issue right like so if that's the case maybe we just drop down and instead we use spatial
227:30 - 228:00 query oh also we probably wanted shap cast right like we probably want shape Caster not Ray Caster because realistically having a ray is not terribly useful if we're going to try to pick stuff
228:30 - 229:00 3 zero shape rotation quat from rotation y [Music] Z Direction d three Z and
229:00 - 229:30 then shape Caster shape cast is is um I want to interact with this Cube actually is what I really want to do I want to be able to um walk up to this Cube well I want to be able to like interact
229:30 - 230:00 with this Cube like this so like the ray is a little bit probably not what I want I want a shape U I want to be able to be close enough to that box to select it and pick it up you just started got to get used to the new features yeah create a system that spins the spins the chat to see all
230:00 - 230:30 angles car spins the character to see all angles yeah we could do that I think I would have [Music] to specify the rotation and then feed that
230:30 - 231:00 into the built-in walk so it kind of walked in a circle so let's do if keyboard dot or not keyboard sorry if Direction uh equals VC 3 z
231:00 - 231:30 um time res time let rotation equals uh quat from uh from rotation y time
231:30 - 232:00 [Music] DOT elapse seconds. sign you use sphere cast to get all objects from range then you can use do product to which one is facing player yeah uh why sign because oh I guess it will just rotate anyway
232:00 - 232:30 right if we're doing from the rotation then the rotation just gets infinitely bigger we don't need sign you're right uh yeah so we're trying to get a a sphere cast to work right like it doesn't matter matter what shape it is right now right now the issue is that it seems to be um only working in these two directions and then we go the other two directions it like reverses right see
232:30 - 233:00 it feels really weird um and real real istically we probably only need to shape cast if we're going to like highlight this anyway uh as like an interactable thing and otherwise we don't really need to anyway so uh rotation from rotation y time elapsed
233:00 - 233:30 dot to axis angle so this is our Direction and because we're rotating around y should be what we
233:30 - 234:00 need so just specify Direction um probably reverting that when I do this so the other thing is here if there's keyboard input then do that if not then don't
234:00 - 234:30 you are saying if direction is nothing
234:30 - 235:00 set Direction at which point there is Direction that's non zero so it stops yeah wa wait what do you mean why would it
235:00 - 235:30 stop right if there so basically there's keyboard input up here if the keyboard input hasn't affected this direction then I want to get a rotation based on the allotted time set Direct direction to something and then use that to do the
235:30 - 236:00 movement this is always y1 that's why ah right because that's not what I want um I don't want two AIS angle I guess we could do because then the direction is no longer zero why would it why would a nonzero Direction no this runs every frame this runs every frame
236:00 - 236:30 greme this is this is constantly constantly running um if we look up here apply controls update in the UA user control system set so unless the TOA user control system set um has something weird about it which I don't think it does uh then yeah
236:30 - 237:00 um from rotation Y and this needs to
237:00 - 237:30 be normalized right sorry I'm I'm I'm a little frazzled I'm just getting near the end of the stream
237:30 - 238:00 uh direction is 0 one0 because you're rting long yes absolutely no that's that's exactly what was happening for for AIS angle you're absolutely right uh real condo I'm just getting a little bit uh you know loose well uh it is unfortunately just a very
238:00 - 238:30 big circle so here uh this should be something more like one we want it to be fairly small so that they stay in the camera and this is the issue also great suggestion hassu thank
238:30 - 239:00 you so it works xzx yeah it sweeps a 180 degree angle absolutely yeah absolutely absolutely 100% oh you're wait are you saying it no it doesn't flip
239:00 - 239:30 um in the code right the ray definitely does but we don't know why yeah yeah okay uh yes it's sweeping a 180° angle uh and then is somehow resetting every 180° I don't know why um the numbers for the directions seem correct obviously the character is moving in a small circle that
239:30 - 240:00 is uh playing D free the question is is it my code or the crate I hope it's my code honestly I hope I just did something very silly let's get rid of desired forward no we need desired
240:00 - 240:30 forward um what else could I have done that would have caused this applying the controls jumping Ray cast thing raycast is set cuboid from zero no rotation Y in Z Direction
240:30 - 241:00 what could I have done you think it's a bug into the
241:00 - 241:30 dependency it's possible we are using the main branch if it's a bug into the dependency I should dig in and figure out uh normaliz shouldn't affect this right it should make it unit length not combined to positive yes yes normaliz should not be affecting this also this um how do I say this the shape cter is not our code currently
241:30 - 242:00 yeah if I change the
242:00 - 242:30 um oh can I get it to sweep in the negatives I don't think I can get it to sweep in the negatives let's try to change the neg Z to
242:30 - 243:00 X nope that's exactly the same as it was before in terms of the area that it's being swept on um let's take a quick look at Aven yep rcast is a z0000
243:00 - 243:30 origin yeah so the raycast is 000000 origin right uh that's this where it's actually a shape cast it was a ray cast same difference so the origin is zero the direction it should be going in I believe we want to be z uh it doesn't matter whether we do it like this or we do it like this so I'm inclined to say that the querian here it doesn't
243:30 - 244:00 matter origin is relative to the parent so it should be at the center of the uh sort of cylinder that we have that's rotating um Ray
244:00 - 244:30 Caster honestly it's also somewhat possible that the visualization is wrong another option that the ray cast isn't actually wrong but the visualization is incorrect so maybe one thing I do is make that Cube have a collider on
244:30 - 245:00 it right let's make this a little bit bigger in terms of how far it's going so it goes around the cube or we should probably just move the character yeah because that won't work so let's do um keep the velocity here when we spawn
245:00 - 245:30 in the character let's move the transform to being three away on the X or I'm I'm sorry Z so that puts it right behind I kind of think it would be better to see yeah no I think that's fine actually
245:30 - 246:00 so this should turn around it should hit this Cube at some point right uh the cube doesn't currently have a collider on it notable yeah it's definitely going to be a silly tiny oversight somewhere absolutely it always is every time it's like an hour uh or whatever to debug it's always like I missed something this is why I spend so much time thinking about the rules through Advent of code videos because
246:00 - 246:30 like if you miss that one little thing it just takes you forever uh to debug so let's do um we've moved it around I like that let's we have the observe here and all of the entities we can look for the cube uh I think we I think cube is just
246:30 - 247:00 called Cube scale Cube or something like that what do we call it uh this is scale Cube but it actually needs to be the map so it's Cube 001 right
247:00 - 247:30 now I'm just going to call this entity and then this is not ground this is cube the cube I guess it doesn't matter matter what kind of collider we make it so try mesh for mesh why not there it is there's the hit when we're facing away and no hit when we're facing
247:30 - 248:00 it two hours of the stream entirely redundant uh so it's colliding I think the visualization is wrong right it only
248:00 - 248:30 hits I think I think it's working actually and the visualization is wrong the do you all agree with this I'm going to make this bigger right no hit no hit no hit no hit no hit no hit hit no hit no hit no hit no hit no hit no hit no hit no hit no hit hit it only hits on one of the
248:30 - 249:00 sweeps maybe the visualization is bugged with parented objects that would be weird so the raycast is actually working um let's do
249:00 - 249:30 this for kicks I guess why does it look like it's like lasering the side of that box do y all see that
249:30 - 250:00 oh because it is just really quickly okay so we have a cube that's our shape cast currently so that's the cube hitting the point um I think that's showing where it's
250:00 - 250:30 hitting the other cube in various ways and where it would bounce off if you it's multiple arrows yeah yeah yeah [Laughter] that's actually very cool um unfortunately the visualization on it actually hitting is wrong let's see what x does Just for
250:30 - 251:00 kicks same thing there got to be something in the visualization um where is
251:00 - 251:30 the physics debug plugin here's the physics debug plugin we can configure the linewidth we should probably do that if y'all are having a hard time seeing it on stream debug gizmos axis joints debug render shape cast is what
251:30 - 252:00 we're looking for that's here query gizmos store length unit for shape Caster hits in query Ray color shape color Point color normal color draw shape cast Global origin Global shape rotation Global shape rotation yeah Global Direction this is something that we can
252:00 - 252:30 just pull in I think let going to stick this at the top and see if it causes me any issues doesn't look like it so let's do our own this is this is one of the really nice things about Bevy actually um hopefully this actually does work
252:30 - 253:00 but okay so the question is draw shape cast shape Global origin Global shape rotation Global direction right do these which are on shape
253:00 - 253:30 Caster Global origin is just a vector so it's not being changed Global shape rotation is a querian Global direction is a dur so these are all being set by something can you get the cube on the other side of the character for
253:30 - 254:00 comparison uh yeah I can do whatever uh now that you have the collisions you should be able to test with manual movement too you shouldn't be need the rotation you want to see what happens if the Collision direction is in the negatives Oh you mean like if it looks like it hits yeah let's check that that sounds cool um player I think it would be easy for us
254:00 - 254:30 to just dog -3 and see what happens it looks like it it's zapping in when it hits but otherwise not right like there's clearly an error in
254:30 - 255:00 the calculation but only if it's not hitting [Laughter] [Music] something that's hilarious um so what does that mean because these values are getting set on the shape Caster I think right
255:00 - 255:30 so the shape cast Point shape color Ray color shape Max time of impact hits as slice gray color shape color Point color normal color length unit maybe debug
255:30 - 256:00 these maybe maybe wiser to print line them or info them e
256:00 - 256:30 okay this won't be easy to read yeah I don't really want them on new lines though like I don't want um the extra like Source like the source
256:30 - 257:00 code line from the debug um I don't want the doubling up because I know there's going to be a ton of output so I just want the output I don't want the like the source code line um yeah I don't know what are these again says Global origin rotation this
257:00 - 257:30 is the shape rotation we actually probably don't even care about the shape rotation so Global or Global Direction these are the two things we care about so origin Global Direction positive direction negative right before
257:30 - 258:00 that right negative here no positive positive let me run this again I need to clear out that middle okay so it's
258:00 - 258:30 hitting I'm trying to find a place at which this jumps so it switches from negative to positive here but this doesn't change huh is there a bug in Bev's shape cast
258:30 - 259:00 Gizmo is this a bevy bug [Music] um no Bevy doesn't have shape cast
259:00 - 259:30 draw shape cast is here FN draw shape cast that's a trait what
259:30 - 260:00 implements imple physics Gizmo for gizmos draw polyline draw Arrow draw Collider draw rate cast draw shape cast here we go shape rotation do normalize shape rotation
260:00 - 260:30 is a rotation what happens if you normalize a rotation I don't actually know hits it Etc draw collider draw Arrow no absolutes no
260:30 - 261:00 negatives that's collider that's a hit these are not what we need this draw arrow is the one that we want to look at so collider at origin and arrow arrow is the thing that is drawing incorrectly origin origin plus Max this is the T times distance what does Direction adjust Precision
261:00 - 261:30 do direction is dur which I think is that's going to be an Aven thing adjust
261:30 - 262:00 Precision for dur not here dur is not here dvec dmat VC 2 V three be 3 is the closest I love that adjust Precision for VC 3 just returns
262:00 - 262:30 self I mean dur doesn't have to be a v three right the
262:30 - 263:00 I'm GNA need to take Chua out of my browsing history because I keep hitting it instead of Aven okay so dur is dur 3 d three has to be Bev's d three right seems like it Bevy math Prelude yep bevies there
263:00 - 263:30 three so if you call adjust Precision on that you need to have a dur three not a back three right if this is dur and dur is dur3 and you called uh what is Direction wait hang on yeah direction direction adjust Precision adj adjust Precision has to be adjust Precision on a dur three which doesn't
263:30 - 264:00 look like it's even implemented Double D is dve 2 is double so F 64s you think in my case it is a VC 3 I think in my case it's a dur right right so if direction is dur and dur isn't redefined anywhere
264:00 - 264:30 here and dur is d three right it's a type Alias for a d
264:30 - 265:00 three this d three is Bev's math d three yeah d three is going to be a normalized back three for sure I'm just curious about where the code is for that maybe I need to search here adjust oh that's not what I want to do adjust
265:00 - 265:30 Precision F32 this is used everywhere dang I don't know
265:30 - 266:00 adjust position self that
266:00 - 266:30 adjusted imple for F32 that's for doubles 2D 2D single primitive 3D I don't know where this code is already got a concept in mind you mean for the game yeah I'm just uh
266:30 - 267:00 rabbit ho holding on a interesting bug that we found if it's got to be somewhere right
267:00 - 267:30 does it D into um let's find out I guess d three Implement D it does d into V
267:30 - 268:00 three it definitely does that must be what's happening in which case the VC 3 is self as dvec 3 so we go from a VC 3 to an f64 VC 3 which shouldn't affect
268:00 - 268:30 the right that would be weird right yeah no no negations here not really sure where this is coming from
268:30 - 269:00 shape Global origin shape rotation Global Direction so Global origin Global Direction draw shape cast draw shape
269:00 - 269:30 cast shape collider origin Vector shape rotation is into rotation direction is dur origin and origin and direction are all we care about and Max time of
269:30 - 270:00 impact I don't know that's the entire calculation right there and I don't see why oh what's the bug yeah um so the bug is in the visualization not the raycast as far as we can tell so the visualization here sweeps 180
270:00 - 270:30 right um and then sweeps 180 again and it only does that if it's not hitting something when it is hitting something it will snap back to the location that it hits so if it's not hitting
270:30 - 271:00 anything this Arrow that's getting drawn out seems to have some kind of uh sign inversion on it so down here there's a bunch of like draw hits and stuff this one is the one that has the issue as far as we can tell and if there's no
271:00 - 271:30 hit this must be happening somewhere else but origin Max toi times direction right that is so weird why yeah this is why we're rapid hoing this is this is uh yeah wherever the error is it's specifically in the branch where it goes to Infinity can you try to copy the draw
271:30 - 272:00 Arrow code and show what is Max toi um yeah we can pull Aven down let me take a look at Aven for a second cuz I think there were
272:00 - 272:30 commits okay we can pull this down actually pulling this down patching it is going to be kind of annoying to do um I think I might just look into this we're we're about half an hour over stream length um this is very interesting I think the last thing Max toi hits Max map by Max time of impact is a
272:30 - 273:00 scalar that is from draw shap cast shape Caster Max time of impact so it's the Min between whatever you might set on the shape caster and I don't know whatever 3 6 9 12 15 zeros is I don't actually know Mega buug report clip the
273:00 - 273:30 video Yeah maximum time of intersection yes yes maximum distance absolutely that is exactly what it is um we however have everything up until this point available to us so we can log that
273:30 - 274:00 out if we want to right so when hits are zero what is this [Music] value so anybody see something wrong with that
274:00 - 274:30 value what is that value
274:30 - 275:00 what that doesn't I mean it doesn't look to me like it's a Max but I guess it could be Let's do let's do this let's take a guess and do shape Caster right with Max time of impact which should be
275:00 - 275:30 what let's make it a thousand I guess look at that it fix it I don't know what the hell that number is I have I have no idea what that number is but that is exactly what the issue
275:30 - 276:00 is so now this works it works in the original too so we don't even have to run our custom version of it um I don't know what that number is or where it comes from that is like I don't think this can fit in anything so something's going
276:00 - 276:30 wonky I don't know maybe it was in an issue or something um where does that come from how does it get defaulted um shape
276:30 - 277:00 Caster theault originally for Max time of impact is scal or Max
277:00 - 277:30 um what is okay let's find the shape Caster cuz I think it'll be the same but I want to make sure that it is the same on Main before I continue uh shape Caster where is the default implementation somewhere in here Max time of impact
277:30 - 278:00 scalar by default this is infinite so the shape will travel until a hit is found so that's supposed to be Infinity which if we look at the default for shape Caster is scalar Max
278:00 - 278:30 uh where's scalar defined uh I guess that was uh github's way of saying uh I should
278:30 - 279:00 stop um I don't know where scalar is defined where's scalar to find here we're using scalar where does scalar come from crate Prelude great that doesn't help let's look for struct
279:00 - 279:30 scalar uh since floats are scientific notation the values for the exponent can lead to some crazy numbers with with ever decreasing Precision the reason for the hundreds of zeros you suppose scaler is a type alies for F32 or f64 depending on compile options maybe infini can't be correctly signed yes it's definitely Infinity but signed incorrectly un sure
279:30 - 280:00 exactly where but you're sure somewhere along type conversion is a drop sign and scalar you think is a type Alias yep f64 or F32 depending
280:00 - 280:30 do I have that number still yeah 3.45 6 * 10 to the
280:30 - 281:00 11th not even close right yeah the adjust Precision is just a type difference so it goes from a VC 3 which is an F32 into a f64 and that is the if I remember correctly Direction um but the toi is the
281:00 - 281:30 infinity and uh if I remember correctly there was a min for this um where was that I've had so many tabs
281:30 - 282:00 open so for some reason that is the issue why is that the issue I don't know here's shape cast uh we need the debug though right math double was it here no that's the adjusted
282:00 - 282:30 Precision this is the shape Caster [Music] toi physics Gizmo extension draw shape cast was what we were looking at that we can just see in R code the draw shape cast has this right shape Caster Max time of impact. Min with
282:30 - 283:00 this so theoretically we should be getting one trillion or whatever this is right F32 Max renders nothing but this number seems to be fine that's that's a comment from the code when we pulled it
283:00 - 283:30 out so yeah I think it's just uh generally generally a hack I think they just have to pick a value here and for some reason the value behaves weird well that was super interesting um I'm think I'm going to call the stream there um while I'm calling the stream I will see if that Min
283:30 - 284:00 works as expected so this is our temporary solution if I run this then then we see the issue if we check that Min out and we reduce it to something that is like entirely
284:00 - 284:30 reasonable then it works so that this Min number is actually the issue remember we're double rendering this too remember that the the fixed one we have here is ours and the one they're doing is also being
284:30 - 285:00 rendered yeah I'm trying I'm trying to narrow it down a little bit to a number who's got a million who who's GNA bet on a million a million still too many 100,000 100,000
285:00 - 285:30 10,000 10,000 10,000 works yeah it shooting to the front and to the rear is intentional um where's the shape cast shape color
285:30 - 286:00 unwrap or color uh let's call this uh black no not the shape color that's not the one we want we want uh shape color Point color Ray color Ray color I'm going to make this color black just to be a little bit more clear about what's happening here so we've got a red one and a black one the red one is
286:00 - 286:30 theirs the black one is ours so you can see how that works yeah I mean I should have changed the color it would have made it more obvious um but yeah it looks like you have to have a Max time of impact of no more than about 10,000 interesting I wonder if this is a bug or
286:30 - 287:00 not I'll probably um ping them or uh file an issue or something that's surprisingly low I agree I agree that that is surprisingly low um I wonder if we don't do that if we don't interact with that Min at all and we just set the number if that works fine
287:00 - 287:30 nope I don't know what it's doing but for some reason only the number 10,000 works so that'll be a bug report I hope you all enjoyed the the Deep dive into the rabbit hole um because that was definitely a significant junk of time maybe is a time of impact in seconds and then multiply by the speed of light multiplied by
287:30 - 288:00 C all right yo I'm G to end stream uh thanks for hanging out went a bit over uh this week so I'll see you you uh next Saturday and if you're doing Advent of code we're doing Advent of code and uh yeah have a great rest of your day