 I should have just fixed the echo so what do we want to do here? It's been a little while I'm not exactly sure what I was doing I have some idea but in fact I'm pretty sure that the next thing I needed to do was fix the feet because the feet animation I have some discontinuity in them not exactly sure what the reason is although I can make some guesses but it's probably better to just look at the code and look at it running although it's hard I remember it's hard to see it running so yeah I had my well I'll just say that and check um so so to recap since it's been a little while um hopefully this these notes are correct so this was the last stream it's 49 I didn't actually check you'll have to forgive me I have a little cough um so so to recap as I recall we put in this kind of crappy character rendering where we're drawing everything as cylinders boxes I don't even remember cylinders probably because that's the thing that you can do most easily uh with the data that we have trying to run it it's sitting there thinking oh I hit it I hit the key in the wrong window um I don't remember what do I oh right it's the third person point of view yeah okay so here we go right their boxes and they don't orient correctly which is fine the top ones do but the legs don't make sure the legs are diagonal so um basically put in a little walk cycle which was just making the feet follow a circle and then we're doing ik to get the feet to where they are and then we replaced the circle with finding where the ground is in some way that I don't remember but that must be what's going on here and obviously we need to put in arms um and here you can see oh I thought the foot fell down the foot didn't fall down it looked like it fell down oh there it does yeah no but it didn't fall down very far though did it oh that's because it's fully extended now it's trying to place the foot on the ground but the torso isn't moved down to compensate because the way this all works is there's just the same old physics that's always been there and then we're doing this animation to try to match to where it is um which means that the controls are still at just as responsive as they were which is just like generally a nice thing to do it's also good for AI because it means the AI can just move by whatever mechanism it doesn't even have to be physics like if you want to make your AI just follow paths automatically without running any physics they can and then this system can still try to make them look like they're running I mean it's not going to look like great animation ever right it's going to um but for an indie game for crappy animations that you see in indie games it's totally tolerable and I mean you can work on it hard and do a good job which is what the the wool fire guy with uh overgrowth which we showed a demo of some of the early their early ideas for that that were based this on so uh so let's actually look at what the code is doing because I don't that part I don't remember I remembered the kind of end result but um so this is all in the renderer so I guess it would be an object renderer yeah it looks like it see bone oh no that's the machine yeah maybe it's not an object render it may just be in uh it's in main I remember now we do all the object rendering hackley in main right now yep to do hey look I have a giant to-do list all right that's good so let's re-familiarize ourselves with the code here we have the skeleton shape which is this whole thing so let's you can figure all this stuff right and so the legs are not vectors because um they are being treated as a square cross section not for any particular reason so they could be turned into vectors as well fine foot placement so we have a fact poly five why do we have five vectors uh because it's um okay so this is a function that says as I've said before I can't talk and write comments at the same time so if I actually want to write the comment I just have to write it and then okay so the whole thing is stateless and that's actually the biggest thing we need to fit well it's got this this bit of state so let's um well how do we output data is it just this ba stuff what is ba biped animation state no that's stateful okay so there is state it's the biped animation state and we update the state here we update the state here and then we render from the state so it looks like we can just monetize this without much sorry let's just copy all this parameters because I don't know which ones are needed yet and maybe the compiler will tell us no actually it won't or won't tell us that for locals indentation we need to call that and that'll just not just move that code to somewhere else if we want to later it actually separates the bits of logic of the uh wait I thought I moved this oh I must have copied it instead of yep I did copy it like that and then we can put this stuff in get rid of a level of indentation right so there's a lot of interleaved graphics in here drawing cylinders and drawing boxes um so let's see if that worked oops s k i mag s c are all unused but I'm not sure if it's in this function or in the other function uh one way the legs added that's that was the last stream like you can see this i k better model stuff okay so it looks unchanged that's weird okay couldn't find the foot position but it didn't move the torso down that's something to think about like this this whole system will work way better on smooth train than it does on this bumpy train and we want it to work on the bumpy train obviously but the whole remember the whole trick of the system is having to a totally independent physics from the animation system and so that was just a case of where those two conflicted the physics decided that the character fits down in the hole and drop the torso down and then the animation system hadn't updated the legs yet so we just have to make sure stuff deals with that I see you yeah I see the popping there pretty clearly all right so now let's try to figure out what this code is doing it's going to call that function that we commented above earlier so foot spacing times height over two what would that mean why is it times height what was I thinking I guess I just want to make the so this is probably unitless and this and it's intentionally just expressed as a relative to height so that we make a smaller character it adjusts of course it should be probably like height based but whatever it's a first approximation or whatever um so I should be able to like change the ai's to be smaller and we would see them run faster uh how do you throw an ai I don't remember anymore t yep and then you have to make a path fine to you because the feet start broken I don't remember how to do that path no that's perfect um accidentally slowly time there we go yeah so but there are the same height as the player right now and they snap on those diagonals and stuff so so it doesn't look that great all right um so what do we do here why right and z right so these are the position that the feet want to be so here's that thing I was saying it creates a circle tries to position around on the circle then first it to world space and drops it down to the nearest voxel so floors it and adds a little bit then it takes that point and does that polygon search find foot foot placement so whenever your foot placement height whenever you move over a voxel on the foot height changes that's going to snap but even on flat ground we see it popping um again I don't know if you can see it at this frame rate but I can the thing teleports between phases or something so maybe the phases don't match that's probably true okay but then we find where we want the foot to be but probably then depending on where in the cycle we are we uh okay what we're doing is we're having them follow the curve the the circle um for half of the cycle and then for the other half of the cycle they do the foot plant and so what we need to do is make the curve not be a circle but be a path from their current position to their target position um but um um the issue is that so so if you know if the character is is here the character it's just a point rather but you know what's the physics is a box but let's ignore that um all right I should use that program I installed what's the program called I should still have it on my desktop don't say it's wait which one was the one that I was happy with whoops uh so literally zero characters on screen are readable and in uh mobile that's too bad let me check again the yeah that's my normal font size so um so yeah so here's the character position and the foot wants to do something like this like here's the ground and so the foot wants to be here and wants to end up here right that's this is one foot and then mean you know meanwhile the other foot is here say so this foot wants to do a trajectory like this and we're not going to worry necessarily about like it might clip through this corner depending on where exactly it is and we just won't worry about that uh it's something you could worry about and trace but let's talk about the discontinuity problem so when you do this stuff statelessly what you're always doing is sort of uh based on so let's see if we can explain this when the foot goes down when it finally goes down into the down position you're back here and this is the leading foot right so when that foot goes down there's some way you compute where it is it's you take where you currently are which way you're going project ahead along the direction that you're going and you find some point and then you cast down to the ground and find the find the ground point you say okay that's where the foot's going to land okay and blam oh the foot goes down now you're moving and for the first half of it you don't have to move this foot um well actually it's got to be here okay so we get to here and actually that's about when the foot should be down okay so when you're here you're going to start moving the foot let's say i this isn't correct but my illustration is too terrible to do this so um so when you're here what do you do well you project forward where you're going and where you'll be by the time the foot needs to go down and you say okay i'm going to be here when the foot needs to go down so then you cast out and then you cast down and you find where the foot needs to go okay this is all great and wonderful um a different way you could do it and this is not going to be very clear from the illustration i can see because this is a time problem again and so it's so hard to show these um a different way you could do it is to like always be extending the foot and always casting down and say well that's where i want the foot to be and that'll change over time uh but it'll mean like you're trying to make the foot go to here and then to here and then to here and by the time the foot actually goes down you're trying to get to here and if you do that one of the problems you'll have is that the foot is trying to go to here and then trying to go to here okay why would you ever do this so if you're trying to be well there's two different reasons gosh this is so complicated to explain um i mean maybe it's not complicated to explain it's complicated to explain without me having thought through how to explain it um there's just a couple different competing factors and none of them like explain it on its own so i kind of need to establish all of the competing factors so this why you would want to do this is totally a different issue and i need to backtrack to explain what's going on here so if you're looking from above at this character and they're walking and so they got a foot here and a foot here as they go this way um let's say right now we lift our foot so we project that the foot is going to land here but then a moment later we move forward a little bit but we also turn so this foot is still on the ground this foot has started moving towards this location but now we go you know what you actually want the foot to land over here so we've changed our mind about where the foot's going and this is going to happen continuously every frame we're going to keep changing our mind about where the foot needs to go um so we kind of dynamically need to be changing our mind about it caught in my microphone anyway uh so uh so every frame will be continually changing where our target is right so this our target can can follow a little path that and we turned around again and now we finally decide to put the foot there and during all these intervening points there may be voxels in the way that change the foot elevation and change it back down and etc um the physics doesn't care about anything right the physics is just doing this of course the character box probably you know is like that or something like not it's not the full way of the feet at full extension but um large enough that it could impact this the character might go up and then come back down on the way to doing this um and that can all cause funky looks and the feet may not stay on the ground or we have to cheat that we already have a cheat in for how the camera slides up when you step up we when we step up we actually currently teleport up all the way instantly and the camera slides up to followed and we may need to do a similar thing with the biped where the torso needs to slide up and if you hit it and then come off the torso wants to go up a little bit and then come back down without ever finishing going up all right so then back to this so one thing you could do while dealing with this is rather than projecting all the way forward because that projection all the way forward here can be really wrong um because you might turn you might stop you never actually try to get your foot out that far and it doesn't matter when you're at this phase of the animation right with this foot way back here there's really no reason to know the exact point you're trying to get the foot to not until the foot gets up and out some do you really need to know the final target so a kind of a hack you could do you could consider doing is that you just always instead of projecting out saying okay I estimate that at the time the foot goes down I'm going to be here and then the foot needs to go here instead of doing any of that projection you could just say well we are based on where I currently am here's where I would put the foot and let's try to make the foot go there and as time evolves I'll automatically seek the right target right so that's saying in here you would project it to it to being here and then here you would project it to being here and every frame that would get updated and as smoothly as the character is turning or accelerating or desiring that point will move smoothly so that's a thing you could do but if you do it you will still have these discontinuities so I don't know which of those two is actually better I assume projecting all the way forward it's kind of better because it does it is weird to be searching trying to be trying to get the foot to the wrong place because you want the foot to follow this nice arc right and if you have a temporary foot estimate here like are you trying to follow that arc to that like that that arc isn't the arc you want to be following so if you were trying to say at each frame I'm currently at this point in the frame I'm at this point in the step I'm halfway through where the foot should be so then you get try to get the foot to there even though where you want the foot to actually be is there in the in the clean case the other thing is that when you're turning rapidly the animation is going to be harder probably to tell exactly what's going on in it so it's not a big deal if that if it's not perfect although stopping and starting you will probably notice all right so then because the because of this phenomenon it can go up and down so you know suppose we were accelerating and so and there's a step up and we're here right and so at initially when we start at the speed we're at where we projected the foot's going to go here but by the time we reach our full speed and we still haven't landed we realize our foot needs to be here so what can we do about that well initially that means we're going to try to follow an arc of the foot like that but by the end it needs it turns out we want to have followed an arc like that this is not the accurate arc like what path of foot actually takes while walking it's probably different but whatever um and there's not much we can do like we can't predict this the whole point of this is that we're accelerating in an unpredictable fashion so we cannot predict that the foot's going to end up there so we have a popping problem which is that you know we're here we're here we've predicted the foot is trying to get to here we could get arbitrarily close to there and then suddenly rise and that's just going to have to pop there's nothing we can do about it because we can't have predicted it um um this is again why smooth terrain is easier to solve this on because that is not a discontinuity there's not a big jump but we can try to tolerate say like here is when we realize we could be at this point in the path and then sort of adjust our path up to here the problem with this I mean it's totally great this is wonderful you can totally implement it and we probably will have to but the reason this is not trivial is because it's no longer an interpolation so to get finally to the code point of these different cases um you know if uh if we uh predict where the foot wants to be we can and we want the foot to get from there to there what we can do is we can just call lurp right we can just say lurp t of x of y where this position is x this position is y and that'll linearly move the foot long okay and then we need to like do some hack for the z um you know we want a curve effectively we want to lurp a curve you know lurp is not the right word but um I you know you need to accelerate at the beginning and decelerate at the end maybe uh maybe not friction no you do have to at least at the beginning it would definitely have a little acceleration um so maybe it's a smooth step or you know whatever um but uh and then we realize though that our y is going to be continually changing which means if we've already lurped partway towards our y and then our y changes discontinuously um the whole system is going to pop if our y changes continuously then actually lurping between the two still works um you know even though this is y of t uh well that's totally unreadable um that will actually still be continuous but it won't be linear so like the linear response over time right as we go from x to y this is point x I probably shouldn't have put that at the origin as we go from x to y right here's our lurp we want that kind of smooth this we want our continuity at least and then if we make y change over time so x is here and our initial y is here but y changes over time and moves down to here then x lurping towards y is going to start going in that direction and then it's going to continue going in that direction and then like that and then like that and then it gets there you know whatever I didn't quite do it right but uh if y is moving that's with y sort of changing discreetly if y changed six times over the course of this interpolation that's the result you would get and so um if you you know do a more fine grain thing then it starts to look like that you know if you if you use more if y is more segmented and you can see that this is approaching continuity and it will be continuous if y itself is continuous instead of discontinuous it'll end up following a little curve probably a quadratic assuming this is a linear motion that's probably a quadratic um do I change the webcam thing so I don't know how to do it now I mean I've been doing this for a long time um I'd hit this yeah I don't think that's any better I think that's worse so I have lights explicitly for this purpose so um all right so in this particular case uh that's not a very strong curve but I'm pretty sure it's like quadratic so uh quadratic is fine I said I wanted to move along curve but that's a quadratic in time not in space it's not this curve that way it's a speed up effect um if uh if this position if this y were moving from here to here it would cause this thing to start fast and get slower and get slower and get slower and of course in one sense that maybe the result we want because this target point is changing over time um but uh I'd rather it be explicit than uh than that way given that I have to solve the continuity problem anyway so the continuity problem right is that this changes discontinuously where was that drawing right here um and so if you interpolate them separately it's going to follow that curve and then follow that curve right which is going to cause a pop here where it jumps between these two positions when this thing jumps between those two positions so we have to actually be stateful and say here's where the foot currently is right and so that's the whole point of the lurp the lurp lets us just keep track of the endpoints and keep uh computing some function that shows where we should be between them and we don't have to worry about what our current state is and this was what I meant when I said it was stateless um instead we actually have to keep track of where the foot currently is in midair so that when there's this discontinuity we can actually change the path of our curve and I don't know what the math is to do this I have no idea I always use lurps for everything so I'll have to figure that out um I just would like if you didn't squint so much yeah well that's just life in the big city so um right right when reporting bugs report the symptoms don't report the don't report your expected what you think the fix should be so the symptoms there was you don't like me squinting which is fine like that's a perfectly reasonable thing to not like but it's that if that was the issue I could have told you up front um because that's been complained about before so um so yeah we have to figure out how to do that continuity stateful foot position yeah I don't know how to do that so uh we'll have to say okay the foot is this far through the phase that we that we know so which is the the t to the lurp and then do we want to know where it was always like as soon as we get to this transition we don't care about where it was it would also be good if the velocity itself was continuous but that brings us to the space of needing a controller to to find the path um I guess we could allow the derivative discontinuity and not be too worried about it at that point so if we're doing a lurp we need to keep track of where the foot is but for this part of the path we definitely don't need to know where the foot was and you know we could back figure a fake foot here or something um that we would be interpreting from but and so then remember all this this position is actually updating all the time potentially it's just that the moment of discontinuity is where we can see this change where it would be discontinued so here and so while this is changing the whole time uh even though it's not discontinuous if we can if we we have a method that allows us to forget about this foot location when we get to that point we might as well be forgetting about the foot location the whole time and using that same algorithm the whole way just not it won't have visible uh changes but it's deal to deal with that change in the position so whatever this algorithm is um should be able to solve that stuff yes that's the assumption here is that as I said once we get the foot is here and then we decide on the discontinuity there's not going to be anything to do to avoid it right in that case we're going to get the foot to here and then we're going to lurp it up to here but the time here you know this is going to have taken 99 percent and this will take one percent of the time and it'll be effectively discontinuous um but we will implement it as a smooth lurp from here to here as well um so yeah we can't deal with every case but we can make as many cases as we want look as many cases as we can look good um and if the ground were continuous instead of discontinuous we would be able to hide pretty much everything because this has been done people have implemented this in other environments um but I don't really know like how to do this except as a controller problem which I really don't want it to be because those are messing like I have to keep track of the foot's velocity and stuff which is gross that's why lurps are so great you don't worry about any of those details you just keep track of the end points um how do you do this whoops it's weird um how would you do this well you could solve it as a lurp and then back solve like I was talking about back solve that this lurp is from here and we're going to allow the velocity to be discontinuous so we don't actually need to know the velocity so we just need to know the position and then back solve and ignoring the fact that I don't know what how to make this curve look reasonable um and then if you were doing that you could probably find how to figure out how to do that um yeah if I don't care about the velocity matching then I don't have to care about the velocity matching anywhere else I don't have to store the velocity just base it on how far away you are and how far through the phase you are compute a new velocity every time that's probably reasonable all right let's see what we can do still don't know how to really make it match the curve so update biped so we do the circle zero right z left less than zero uh so it looks like this is just put spacing y right what's oh the object why are there only two parts oh flat flat meaning uh in 2d I guess is that what flat means is that in utl where does that live because it was an old camera thing okay uh oh right flat because it's unrotated yeah yeah you're only looking at the orientation you're not tilting the camera the object all right so we ignore the tilt of the object just its orientation we find the position based on x and y and ignoring the z okay and all makes sense so foot spacing and that so one thing is through a turn you maybe want to predict the foot sideways some and we're not doing that at all here and this api doesn't make that easy to do but we don't have to worry about it yet okay so it looks like foot spacing is how far ahead we're looking so it looks like we're actually doing the thing currently where we do keep reproving the spacing ahead without actually paying attention to where the foot's eventually going to land so we're doing this thing I was talking about here where we keep probing these extra points even though they're not really meaningful so I probably need to change that to compute how far ahead it should be which is based on phase so um and what's this the negative foot spacing oh no okay this is planting the right foot wait the right foot is not planted though we do this computation the left foot we keep moving it what is this doing why does it add pause dot x why does it oh I see okay so the first time we hit this we plant this foot and that's the only place we're doing this computation we're not doing it every frame currently right okay so what it's actually currently doing is it's running everything in the circle animation and then at the end of the phase it teleports the foot to the correct foot in place so what we want to do is reverse this logic kind of so as long as the right foot is not planted then we want to animate it and then when we get to the end let's plant it and otherwise let's animate it so i'm just inverting the structure of this animation code here which is this code it's the old animation code okay now this is going to make sense to me now I can see what's going on here let's well let's not reverse that okay and then what is not planted and the problem with this as written is it never unplants so I have to add unplanting code which is why it was written this way it was because the way it was written the way it was written didn't need extra code to unplant so what it wants to do is when we're not in that we unplant likewise here at that phase this is just temporary to get this working um so this should be unchanged looks right all right now now that we have the feet separated we can think about the foot logic more carefully so all right the whole thing is we want to run while this phase is in operation and then one tick after it and so really the only way to do that is like this the the planted is our one tick after that flag um so the last thing we run we unplant wait did I invert that oh that should be but it was negated before wait was it negated it was negated how did that that shouldn't have been right it shouldn't be negated oh I see right yeah yeah this needs to be negated sorry I wanted to reverse this I wanted to say great and make it be in the same order as the other one or in the same order we don't need to test it's always zero to two pi so um what can we do here um all right so now we can compute the foot the whole time that was why I was doing this we're done it whatever so now we're computing a foot position the whole time almost there we got now we're computing the foot placement the whole time but now we say if we're in phase if we're at the out of our phase we plant it otherwise sorry I said the backwards if we're in our phase we are still doing the old thing we're still using foot spacing we're ignoring foot placement but here we go ahead and place the foot report the quality of that check if I broke that I haven't declared foot yet looks like it's so working weight did the foot color change or was it always green and white I think it was always green and white so I could tell the sides apart um okay so now we want to do the same thing up here now we always compute the foot we don't do anything with it all right well I'll go ahead and check that in let's see I didn't break it oh now the no right they're both red but then green white okay so let's check that in so we haven't changed anything at all but we've refactored this and now we're always computing where the foot could go so let's just go ahead and show that just so we can see what we're now computing and should just skate along I think yeah you can't really tell oh wait how do I do not have a way to turn the camera independently I've forgotten how there no that's not it there it is okay so one of them skating and the other one isn't seems like oh no it's probably switching which foot yeah it is switching which foot so that you can see it's always probing a fixed distance ahead always trying to put the foot a fixed distance ahead now then we could say try to estimate out where the foot should actually be so how do we do that we're currently using foot spacing so and we'll always use foot spacing as the position so we can override foot placing so we have to look at how far through the cycle we are so we take b a phase over m pi it'll go to 1.0 at m pi basically so we want to clamp that okay and then that's so that goes 0 to 1 as our foot goes from that all the way at the back to all the way at the front so our phase is computed this way from time so we want to convert that back to time so it's divided by there so it's times sk cycle period g8 this is clear I wonder if I should change this so I get real effective okay so that should be in time so that is time units how far through we are we want to know how far away we are so I guess it's just one minus this whole thing so this goes to 0 um it starts at 1 and goes to 0 as phase goes from 0 to pi and then the 1 times the cycle period is the amount of time the whole period takes and we actually only want half the period but we're already dividing by 2 m pi so I'm not sure if we need to divide by another 2 or not I think we do yeah because this phase was for both okay so that should be half the time which is the time it takes the foot to travel so now we have float time to foot impact might not be right but maybe it's right okay so now we can take the time to foot impact and add to our foot spacing it wants to be our velocity where do we get our velocity from movvel bollvel movvel dot x is do we move along our x axis is that forward I don't know if x is forward or not I think it is times time to foot impact all right let's see what that does so if that's for correct the foot should just teleport forward I don't think it's correct this foot should just why is there it is the foot should just teleport forward no it's still just gliding so I don't think that's doing anything um it's why oh it's still just gliding all right let us change the gate cycle so it's easy oh wait I have a slow motion yeah I hit it earlier it was n I think b there it is okay so it's also teleporting from its back position forward yeah which is what's expected okay so this is the still the pure glide so it's like this isn't uh computing anything um let's take a look what we got here the movement speed why is it non-zero on the x is that in world space not in it's in world space not in it's not logic space but it's still pretty bloody that was the physics glitching not going up um okay so that's a pain I have to just see uh I have to extract the forward velocity and so I need world space to object space do I have that I don't know if I have that but fortunately we just negate the angle that's a pretty trivial function to add so now we can finally do like this so the y value looks good the advanced distance is zero because the time is small the velocity is big so the advanced distance is not very big because the time is so small um the time is not correct the time is a constant oh we're supposed to be phases advancing every time and then we take the current phase and we extract that I don't know why would that always be the same value yes we could stop in the debugger we need to be running though b a phase b a phase cannot be a constant maybe it's always clamping maybe I computed that stuff wrong yeah phase is changing the n pi is when it cycles okay so this need to be minus pi and then the clamp doesn't work okay so float well phase phase equals to be a phase minus m equals one well phase equals to be a clamp why was that negated because we have the one minus so it shouldn't be negated um zero one but we've already clamped against zero here and that can't be bigger than that so we don't need to clamp okay clamp is redundant to this line uh all right so then we say one all right let's try it again um it still looks like it's just skating so if I look down that advance advance is always zero I see foot changing sometimes but I think it's just when the speed changes because I hit something yeah so phase is changing time is changing time is negative time it should not be negative I never do I by by pi yes I have it come here it's nice to agree it's not very important though to my skill set okay so phase seems to always be 0.5 to 1.0 it doesn't seem to ever go below 0.5 which would suggest I didn't do something right no I saw it smaller okay um but we're still skating our advance is still tiny our time is still tiny is our should our time be that tiny our time to impact how fast is this yeah our time is pretty fast so it shouldn't go that far but are we like not getting our velocity correctly oh we're doing bell sub zero instead of bell sub one that's why now maybe we finally got it right maybe whoop I see it spazzing nope it's still skating a long guy get going get going again there we go nope no difference at all because say now foot advance does have a non-zero value you can see it counting down it is trying to push out ahead is just not pushing out ahead enough or it's not having an effect am I not using that but we are adding it to foot spacing and then foot spacing is what we used to compute everything after that so it should affect it like what happens if we just multiply this by 8 okay it's pushing it out in the wrong direction foot spacing is not the variable I thought it was foot spacing is a side variable ah that's why it's height-based okay what's the actual forward one it's the other one why right oh of course yeah yeah this is the one that's coming out of the circle animation not out of the phase uses mag which is the move velocity which isn't really right if you're going sideways it really wants this other thing this thing yeah that one let's move this up that's why the sideways why that's why when walking sideways it's to the broken because we don't actually do this stuff correctly yet um so I moved that up and I'm not going to fix it yet I'll come back to that okay so this just needs to be I should have known that because foot spacing is the same for both of them whereas right why right is different for each how maybe it's right I always say that every time they both look pretty scatty it is advancing by a certain extra amount but again I don't see it all right let's do this again why do I see like no effect from that it's clearly doing stuff advance it's advancing by as much as 0.35 multiplied by eight because the out the print doesn't show the times eight I see the foot distance moving down in a way that should be visible oh maybe that because it can't reach it's too far out so it can't reach to there so the IK doesn't get there I think it would show something different though all right so let's make the legs four times as long where do we compute the leg stuff to link IK that's the wrong side that's the left it's right no idea what that's gonna do I know that's gonna help because now it's just got legs that are way too long I'm not sure he can even place them no they're they're just fixed distance forward they're they're still just gaming I guess I only need to make a like twice as long to tell what I was trying to do or even just a little bit longer um there's no sign of it trying to push it really far forward so what does that mean why does this not have any effect I see that foot being huge why does that not am I not using this number why right and I you push that through this use that compute poly use that can find foot stomp the foot with the foot but why is that not having an effect I don't know I don't understand what's going on here uh where do we draw the feet right here this overwrites right foot no but so does that so it shouldn't be a rig I'll just do that one yeah it's supposed to turn red if it couldn't reach it so I don't think that's the issue but let's just go ahead where we're trying to put it just in case so there should be two feet they may not be just just similar enough to tell yeah you can see a little bit of them being different you can see a little flicker there of two feet um all right so that's just showing where the the difference in what the IK manages to do or this is picking the IK target and then the IK code is in the rendering so the target is still wrong so why is the target wrong we see that this number is huge right we see that number being really big why does that not then matter for the foot placement it just goes through that should be some enormous distance away because we see it print an enormous number right these are measured in voxels so we see the foot like up to five or six so it should be trying to put it five or six blocks out but we don't see that in the foot rendering we see the foot rendering we see the extra foot is not six blocks ahead as far as I can tell yeah it's not it ain't anywhere on here I don't understand that why is that why does that number print big but this computation not perturb it and see if I can see any changes or it's something really weird going on like is this not the code that's running is some other code running again did I do I have two copies of this code and re-write it somewhere find placement poly poly comes that what so this is just wrong this is supposed to be y right so it was probing the ground in the wrong spot then why was it because then when it renders it's no why but that was zero zero so I think this is that same mistake that I forgot the foot spacing I was thinking when I wrote this the foot spacing was the forward position I think and here it adds a forward amount okay so now this should just be insane and garbage yep it looks pretty insane and garbagey yep all right good so now if we back out our insane garbage we're still skating oh no if I were not even skating we're slowly advancing it along a little curve but the whole point of this was it's supposed to be reaching all the way forward and placing the foot where it will eventually land that was the whole point of all this code all right so if we multiply this by some amount is that going to get it closer to being correct now it's the skating okay now it reaches too far forward finally but it's not drawing it where we wanted the foot to be remember I added the foot placement a rig it's supposed to show where it's trying to put the foot and I don't see it being drawn anywhere I don't see it anywhere in front of the character so I don't know where it's trying to reach the foot to and that wasn't enough so I probably have some a bug in the phase conversion stuff but yeah I still see it flickering in there um okay so if why is that render not working correctly did I not use this all the right variables right foot a rig right foot a rig right foot a rig eat forward offset what is that oh that's the the distance between the ankle and the center of the box I think what would uh okay so two problems one is that the debug code that I'm trying to render to understand the other bug is not rendering properly and I don't know why let's change it to matte red just so we can see it yeah so you can see the red foot in there I just don't know why it's not there's a different spot why is that the same foot um is that just because I'm not pushing it far enough ahead again so I need to go back to this that actually really pushes it away no it that doesn't make any sense it shouldn't be exactly the maximum distance the scales can reach away all right let's just push it out and it makes no sense the whole point of this is that it should be where the foot is trying to reach to not where the foot actually reaches it's the thing that's computed before the IK unless we're rendering the biped twice because it does overwrite this date no it recomputes the state right here yeah it computes the state there oh I'm caching it before I compute the state that's why so it was always the last frame okay so I think I fixed the debugging so now it should actually display where it's really trying to go which should be somewhere insane yep there okay I just no longer even on the ground because I'm totally fussed with this code okay all right finally we can see what's going on now let's multiply that by four and see what that's doing where's the red foot I don't see the red foot I guess it's just inside it it's not far enough out that it can't reach it yeah okay there we go okay so times four isn't enough times 16 was too much I don't know why the factor the missing factor would be what it is but let's just make sure we can see what's going on all right now we can see what's going on what we want is for that red thing to be stopped on the ground it wants to just be in a fixed place on the ground instead of sliding too bad I can't tilt the camera up and down right so that's sort of what it should be like I don't know why it requires a multiply by 10 to get somewhere close to the correct behavior but that's sort of what we're trying for here and then the whole point is that we have to interpolate the path of the foot we don't want to tell what the foot to try to actually be hitting that point all the time but we want that point to be computed correctly upfront was the whole the whole point of all this now we have a point that's being computed kind of correctly if we can figure out how to fix this times 10 thing all right times 10 seems pretty improbable like it might be something totally different it might be that something's using the wrong variable and so it happens to be off by a factor of 10 or so thank god check my twitter mentions see if anybody's talking to me uh yes it's procedural animation so so we need to get the foot placement right then we can start worrying about getting the animation animating the foot placements the current foot target once we get the foot placement correct so why times 10 it wasn't quite right you could see it was unstable which it probably wouldn't be if it was correct so it's probably not it's probably is more like the wrong variable kind of thing all right so the relative phase stuff seems reasonable to me maybe what we should do is not convert all this stuff into phase maybe this stuff shouldn't be in terms of pi maybe it should go to zero to one let's simplify our lives a little bit probably shouldn't make this change at the same time i'm dealing with all this other stuff but that shouldn't be divided by two maybe instead of being phase it should be in time let's see the other one while we're at it does this stuff use the phase i don't think it does i don't think it does no it doesn't um now the times 10 is terribly wrong so i didn't fix something in there correctly or that fixed the bug that would be amazing but i don't think so no it's not pushing out almost it's a little too fast oops it's 1415 that's pi oops just double closed i can't i have imagined any reason why that would be the correct factor to convert by but you know you just try something sometimes as a debugging thing it's kind of correct but again it's got a little weird squishiness that i don't think is right it moves back and forth a little bit so like i said i think that just means i'm using the wrong variable somewhere here but there are very many variables so i'm not sure what it would be it could also be that this divide by two is wrong but i don't think it is what could i be doing wrong here why would that stuff be slippery uh i don't know i don't have a i don't have a clue i can't think what i'm doing wrong and breaking in the debugger ain't gonna help because i'm printing out those variables like and i don't know what i don't know what i would look at in the debugger that would help me understand are we sure that we got that velocity thing correct so it's printing out the second velocity number should be constant ish it's a little more variable than i would expect i guess because i keep opening into things it's the terrain isn't flat or i guess i'm accelerating slowly like whatever my physics is it's just slowly accelerating uh which i guess then could account for the foot placement being moving a little bit would be because my speed isn't constant well why is this stuff hyper speed why is time running hyper fast it's weird my speed up thing doesn't i must have a bug oh i don't not how that stuff works anymore scan codes instead scan code be slow motion it's one zero point one one point zero so when i toggle off slow motion all right is it or is it just ultra fast always it's ultra fast always i must have checked in something that makes it ultra fast or i broke something uh or i just don't remember how fast this game is i don't think that's correct though there's no ways it used to move this fast why is this about the right speed yeah you can see the turning is wrong now why why is everything running four or five times faster than it should what in the world is going on i can imagine that this was something i did to speed up animation for testing the animation i just don't remember it so or even that i did it for pathfinding to to well i didn't comment it so i'm just going to have to search through all the code to find out where that's happening so where do we gotta stop calling it that time slow motion do i multiply by anything else anywhere i don't see it being multiplied by anything else anywhere draw where do i do the rotation animation i don't even know how that works anymore i would rather have seen their box of world i don't see it doing the rotations animation in there but it's i know it's some one of these somewhere in here texanum texanum offset oh no that's the scrolling and i saw that the scrolling did update it's the rotation animation it's something different no it is texanum offset logistic sticks he's calling logistic stick also stick raw i don't think i'm calling this multiple times am i doesn't look like it looks pretty straightforward to me it's not multiple by four so motion is 1.0 i don't get it i don't know why this is all running so fast motion is 1.0 very very weird it's very disturbing i have no idea what i did to change that what the heck is going on let's see how fast the arms move on these things yeah yeah look at that arm moving there's no way this was correct oh that's too slow um i have no idea no idea what is this loop even doing this is all commented out so this is doing nothing except subtracting carry dt which is never used anywhere um this just makes no sense and now my guy moves way too slow why would logistic sim yeah the animation rate for that stuff actually looks a little slow but the pickers look about right the tab is not working to oh where it does i forgot that the tab speeds things up without speeding up the animation so you can see the logistics running even though the scrolling doesn't speed up and these are outputting invisible things again instead of green things all right whatever but yeah now the character is moving too slow so it's definitely specific to the logistic system i don't know then if it's specific to the logistic system we'll just leave it alone and come back to that that's just really weird uh yeah it wasn't the times four from earlier so anyway so back to what we were doing which is working on this the foot placement problem why the foot placement is wrong right is that what we were on going on you can see the foot anymore all right yeah why i had to have a fudge to make this even close to correct which is back in main so so this is without the fudge wait this is without the fudge it doesn't look that bad did i refudge it somewhere else that i've forgotten that's not perfect but it's not terrible the fact this is not perfect is a problem of course because it means it will it will do goofy things you can see when the foot comes off that's just because the i can't reach to the the old placement so the foot comes off but it's not actually animating at all so you don't want that you want the foot the moment the i can't reach it needs to actually start computing the foot so we want to think about that too where's the red maybe that's okay maybe that's working correctly i don't think it is because it is still sliding but yeah i know that's super slightly there we just can't normally see it that much so i don't think that's right i don't think this is looking at the right amount it's just that that the whole thing of even when it's wrong it's continuous so it eventually seeks to the right spot works which is maybe good enough maybe we don't have to fix this bug maybe we can just live with it because it's never gonna be perfectly correct anyway because it's trying to predict where the foot's going to go and it doesn't know that so now that we have a foot location that we actually want we want to start seeking to that you have to look at where we are arc to there and then this is finally back to this problem that i was talking about here where this problem i was talking about here where we need to restart the arc so in terms of the curve what we can do is do the curve entirely in the z which is the way it's currently working which is that you make the motion in the horizontal plane so this is with respect to time make the motion horizontally be that and make the motion in the vertical be that and that will result in you know going from here to here like that and going from here to here let's do it from here to here like that that's terrible going from here to here like and importantly it means that like if you were for some reason to be trying to go from here to here it's not going to do that right it's going to do it's very hard to draw this it's going to do that basically right and maybe what you're thinking is if the points are like that it should be perpendicular it should do a nice curve that's perpendicular to that and that's not what it'll do it'll do it'll take this line and add an offset and it's going to be more like that i can't actually draw this the difference right but it's something more like like which is maybe not ideal but is a lot simpler to do in the math so it lets us separate concerns so the way we do that is we add a linear motion from the old position to the new position time to foot impact is going to go to zero so so we need some state but the state needs to be in world space uh the state needs to be in world space because the actual foot placement we found is in world space we didn't we didn't run this logic here except in world space so we have it in world space so and here we're in object space and here we're in world space so so what we want to do our effective world space is right foot x yeah right foot dot y z right so plus plus x plus y that's the actual world space thing computer this wait okay i i i'm confused um that's the old placement this the new placement is yes okay right i see it's these but these are in object space so we need them in world space so it's this okay so this is where we think the foot should go new goal but that's not ideal we need to be and the i k actually outputs it to that so i don't even need to do that i wanted to solve it first without the i k so we'll go ahead and do that and not because the i k correction may screw us up i don't know so i need to try to solve it without worrying about the i k first okay so so what we want is conceptually to interpolate except as i talked about in that in the uh Milton thing it's not really going to be an interpolation but we effectively want to interpolate from the old position uh it actually goes the other order time to foot impact is zero when we reach the new goal so we kind of want that but the last position is d t ago do we have d t here and we do not have d t here so we actually need to do that we need to know how long ago that was global d t we're just looking at this newt mode global timer so what we want to do is timer equals we can say here we can say so we can do that and then we want to move so what we're trying to lurp is so if we write it like that exceptually we were trying to do x equals original position y equals new position t goes from zero to one but what we now have is time to foot impact the remaining time so that equals one minus t and we have which is so we know the old lurp thing so old lurp previous was lurp t minus last time step original position goal now that's not the way to think about that i don't want to even think about the old lurp that's that's the whole point of this okay how do i think about this it's just really easy thing i'm just trying to get my brain to the math uh if i just brute force this um i have a number line like this here is zero last time step then to impact time to foot impact so then and i have old position and i have and i want to solve for this and it's just a linear it's just a linear relationship so um has to be a linear remap zero come on your last time step foot impact position come on your goal that's why i have stb linear remap so i don't have to solve those problems okay so now i should be able to substitute these things and get this all to be correct so this is rotating it's a little weird because we find the ideal placement which can itself be perturbed let's just ignore that and just see what happens so um we can't work in ob space it's the main thing like these these things are working in ob space and i have to make them not work in ob space now so um and i have a non one b a right foot so oh i've overwritten b a right foot which i don't want to do so the one later i change it from old right foot to right foot i can just use that it's unchanged so we go old x so we're going to do this for x and y and z yeah we will do it for all three um so sb linear remap zero now if both of those are zero this blows up let's do this then go from old position new goal new goal is wrong wrong wrong wrong wrong this is all in the wrong spot uh we'd still have to compute where the foot is supposed to land and it's all supposed to be up here it's only once we found where the foot's supposed to land that we're supposed to interpolate like that maybe did i forget something is that all i had to do just those linear remaps old right foot old time old time whatever old time just teleports up so somewhere i overwrote something or something let's save after our interpolate but that shouldn't matter now i want to save i do want to save that right there it's the old position right there yeah the target is foot not i don't know how that would ever work i have no idea what that would that should never have worked i know we're overwriting it here that's the problem let's just do it like this well the foot moves gradually it just doesn't actually make it up to where it's supposed to make it up to you and i forgot to add in the z right so we want the z to follow this curve that's determined by z right um we can't superimpose that so after we save it because we want the foot computation to just do a line trace uh corresponding to the elevation change of the foot we we want to superimpose a curvature of lifting the foot on top of what just interpolates a linear motion between where the foot positions actually are so we just need to add that on top and so it's just a matter figure out where to put it so it does add on top but it's all still wrong because the foot's still not going to be going far enough forward and i don't know why it was far enough forward before so the interpolation is just not managing to push it far enough forward and i don't know if it's because of all this crazy data handling that doesn't make any sense or if this math is wrong it's all seems so squirreling complicated in a way it shouldn't doesn't seem like it should be this messy to do so i wonder if i'm doing it a hard way or we are overwriting the z right here all right because we have to for the finding the foot placement right right that's all fine um okay the first thing we do is grab old so it doesn't matter as long as we use old we use old we don't have to worry about where that gets written it's currently get written late enough that doesn't matter but just to be on the same side um you see where it actually is after we've added this you write right right no okay it's not about the z we're just worried about the x y position it's wrong again um okay so if we don't do this is that put us back to where we are yeah the foot's reaching all the way forward so that doesn't seem right all right so is this wrong in some way yes this will be archived on youtube as usual um what what am i doing what's wrong how is it i told you i didn't want to do with a controller this is even the easiest controller easiest controller um i mean it's not and the whole point is it's not a controller at all it doesn't have a velocity it just tries to work to the right position at the right time oh my gosh i'm so sleepy all right i'm going to take a five minute break so back in five all right i don't know if that was actually five minutes but whatever if you missed it because you thought i'd be gone for the full five minutes it's tough break and if i went longer than five minutes tough break all right so this is failing to get to the destination wait this is still testing m pi all right right so it's supposed to be changed to 0.5 wouldn't that just make it plant instantly what was that doing oh okay that's still basically the same as it was comes forward but not fast enough um why would this math not be right last time step looks right to me last time step global timer minus old time which is the previous global timer this is larger than that so this is positive so to get earlier than now we go negative time step current time is zero time to foot impact time to foot impact goes to zero this goes to zero should warp us to the new goal if they're equal foot will just be unmodified which is correct because the whole point of this is computed into foot on this stuff it's definitely dead z right is not quite correct is it yeah because we're adding bottom z but we'll fix up the z's later the z issues can be addressed separately from the x y issues question is why the x y is not right uh seems right to me seems right to me zero negative last time step time to foot impact goal to single why won't get to the very end will we reach a time no this should never be zero so normal usage um we should get a case where time to foot impact equals zero if that happens equals foot it should have actually interpolated this back to its to the targeted value okay no do we ever actually hit that yes we are hitting it okay so does it does in fact interpolated to its final value but we found that if we if zero this it did look correct that's what that was funny to watch the foot to trying to find a placement there so does that mean it is actually correct and it just doesn't look correct to me hmm and it is correct then just doesn't seem like it's far enough forward yeah it seems like it should come farther forward for that um let us change the color when it's planted and then let's switch it back to the other mode but if zero and see where the plant is having maybe that's i'm being fooled by the fact that i don't realize how late the plant is here because i can't tell through the i k aha yes so that is not right it's not far enough forward it needs to be ahead it's almost under the body at the time it plants it's right under the body when it plants it looks like it's exactly under the body when it plants which is not right it should be ahead of the body so so all this stuff is still wrong um so when time to foot impact is zero this adds zero but why right itself should be significantly far forward oh excuse me um right 0.5 when it stops which is half a block ahead but it looks like it's right under basal foot placement looks like it's right under so assuming i'm not cheating the torsos position why don't if i just add one just to see that's more correct so is it just not placing it far enough forward when that was being hidden by other factors or is this phase not correct and it actually is in the wrong part of the phase um okay when the foot plant happens oh right we don't even want to use this why right at all we just won't mag over 20 right so this was strictly for the animation we don't even need it anymore because we're not using the circular animation let's actually yeah let's just set it to zero here it's foot place distance and we haven't fixed the left foot at all so we're gonna leave that alone now let's take a look and that could be why we could never get this thing to look right was because that was always wrong the time to impact thing was it was being fought with by that i'm not drawing the target that's right okay it still doesn't turn blue till it's under it it's still not right so it's about half a block that it thinks it should be ahead which is a pretty small distance but it still looks like it's turning blue run it's right under it claims it to 0.5 let me try and spoil but it looks like it's right under but this was an arbitrary number so we can just change it there we go that's better so now we're doing that and now we can do this and see if this works reasonable no it looks like it's popping still oh right because the why does it jump so far forward as the starting position all right so if we use the ik output it means changing this to right foot what does that do nope it's still popping why is it popping why does it snap to that position and not did i it is the interpolation turned off again no the interpolation is on why is it behaving like the interpolation is off maybe because because of that whole reusing the old state isn't isn't actually good okay now it pops all the way forward when i use the ik output as the old position it seems to not move it somehow teleports forward which you don't think it should do uh i know why it's teleporting forward that needs to always happen every frame otherwise the very first frame it teleports long distance what is this all messed it inside of okay now moves forward continuously and it's not arcing the zeeb correctly because i said i'd have to fix that looking better the right foot should be pretty continuous there's no shadows so it's a little disorienting when the foot goes to the ground it does snap sometimes and you can see it pop through the forward there better better better so let's see if we can fix up the zee stuff so the zee stuff needs to be super posed so we don't want this stuff now we just want an arc to the zee and we just want to add that we don't want to floor it we just want to superpose the zee arc so we still need the old but the ik fix up so we add it the ik will reposition it then we'll subtract it out of the ik which isn't really quite right but that's okay uh that's redundant now too oh wait we don't use the old one anymore do we we're having the main why did i not tab back to main oh because i'm so simple um yeah we got rid of old right foot okay so let's check this out whoa why is so much and got so much slower oh it's just right it's all okay so that's wrong it's um negative some of the time and or huge possibly super huge i thought i got rid of the thing that made zee right it should just be zero to one well and zero to point four actually zee right zee right zee right i don't see any zee rights okay yep that's totally wrong no it shouldn't be plus equal anything right and then i was saying this stuff was in the wrong coordinate space no right i figured that out eventually okay still broken still seeking to the wrong spot oh this doesn't have it at all it needs to be able to step up and i don't know how that works i don't know if i just want to add 1.0 maybe so it can search one higher yeah i guess that's a little weird that it hit that spot yeah it doesn't seem very far forward again and feet aren't tilting obviously it seems like it's not reaching as far forward again but maybe that's what it was doing before and i just don't remember yes it's okay yeah and there's the weird physics which causes him to stop but the right foot is down nice and smooth following on this little sinusoidal curve there vertically see if he steps up yep terrible uh step up but whatever all right so we just need to get the left foot to match and see what it looks like okay so you just basically need to redo all these changes to the left foot which probably is cleanest to just cut and paste the whole thing we convert the rights to lefts and do some other fixes just right this has to be less than 0.5 this does not subtract 0.5 still be a minus real phase is that true oh i don't know if that's actually right here if this runs from phase zero to zero point five then when we hit one we should be at one and that should be unchanged i think that everything else should just be that can place foot needs to be different right no okay it's one of these like the sign rivers or anything doesn't look like it and so this is the old code uh this right here has to change oh yeah there's still a bug it's still pushed sideways the wrong side so there was something negated somewhere foot space and gets negated okay there's obviously a bug there oh i know what it is well i know what would be hello alt f4 oh i forgot to update this so why left become zero and see left become there we go woohoo it's to tilt the feet it's pretty flaky when it when that's flake stuff does flake out side to side is not going to be correct at all if i move sideways because it doesn't lead to the side at all it only leads forward doesn't lead backwards let's check backwards nope it only leads forward but that's fine so yeah it's crappy but hey it's good enough to ship an indie game well not that way the midair i don't have a jump to i know i should do a jump and fix it fix him when he's in freefall let's run up these stairs and then free fall on the other far side oops oh you can't run up this how do i turn off third person i don't remember yeah uh and this is a run cycle and it needs to be tweaked to be a walk cycle that's the other thing there's this whole notion of multiple gates and i need to actually implement those and have the walk be a little different so it doesn't it doesn't get so aggressive yeah it's a little spider-luggy but you know it's got the basics going why do they get them going yeah see they're at a walk speed and it looks totally wrong because they're lifting their feet you know dumb pattern that's fine we we will make this stuff a little more data driven allow for the how does it walk yeah yeah and when you're walking you have both feet down for a part of the time so we need to sort of introduce a more better phase logic or whatever yeah and i need to add arms but the arms are just going to be pure animation no i k well they'll use i k to do the animation but they're basically going to be pure animation so okay all right so let's find the to-do list in here let's see what we actually did off the to-do list i never actually read it before just halfway from previous visiting an expulsion place and that was what i was going to try to do to make it not do stuff too early we just went directly gates we were just talking about that torso position lower and tilt torso when one foot is much lower yep can't lower torso when in mid-air sideways tilt around corners arm animation more data driven which was just talking about that foot placement search that's just an optimization i think mainly so this is done or done enough you can always come back to it if we really want all right so so um i'll take opinions in chat what do you want me to work on should i keep working on making this i k better should i do something else should i figure out why my factory is running at quadruple speed back to the to-do list see what else we have on the to-do list yeah i still haven't installed so any vagus uh why these aren't checked off maybe because i haven't this is another copy that i had somewhere else speed bug two different people say i should fix the speed bug all right well let's do that then wait this way go back before pathfinding simple collision make it easy to enable disable v-sync for profiling all right so let's go to this one 96 let's do a rebuild all in case it didn't it looked fast to me nope oh that looks correct speed to me okay i guess what does binary search it de 53 oh right you can't you can't get logged once you're in that's so dumb anybody know how you get a git log that goes beyond your current detached head uh let's have to scroll back to it zero zero c five c so get checked out was am i on was i on master or was i on working given that i'm ahead by four commits so i just did zero zero c five c four b nine one b why is that i must have just forgotten to nine one later yeah i forgot to check that in and it must have been for a while um no i don't know where scb back came from i know what scb back i used maybe it's out of let's try this one yep now it's super speed that's not maybe better player physics from controls there it goes still fast so i think that's gonna be it's gonna be one of these two yeah i already did this one so it's gotta be that one yep all right so get diff see fv one six fd t eight seven hey look process tick raw right there these change from 60 to 240 so why did i do that change what was i thinking oh look it's also where i checked in scb back so why did i make that change no comments on it well i don't normally get to do this but you know what i'm gonna do i don't normally get to find out what i was thinking at the time i did something but i'm just gonna go look it up so i wanted to find a place where i check in so i can see what my check in comment is i'll turn on the audio so you guys can hear it as well hopefully um three four i can't quite read that there's b three a eight what are we currently on okay so with these right here and then what which ones you cannot see on here procedural legs move object origin defeat procedural legs move object origin feet so it's what's before this maybe that was on a different day physics controls more responsive player controls okay that was the previous one it's foot planning better physics from controls was that the one no it's the one after better physics from controls okay so right now is when i might make this change although i might have already made the change it's all rendering maybe it's trying to make the physics smoother so i ran them physics at a higher tick i mean it doesn't really matter why i did it i mean maybe it's a lot later it's all just animation stuff promise is just gonna be a really fast change so i have to search some pretty fine granularity to find it here oh i already have it on the done in today's stream wait was it the more responsive controls was not the one i said better player physics from controls plant feet and player animation what's the one that oh wait i can see the conveyor belts so i can check if conveyor belts look yeah exactly this is a really slow binary search though because it's not a binary search yep they are a fast could just barely see it yep yeah you can see they're super fast so somewhere in here i changed it this is 414 better player physics so it hasn't been done yet hasn't been checked in yet i could have been done already all right i may have to give up oh do i have the annotations oh the annotations will tell me i bet i have annotations for this for all those annotations do they are they still just in my inbox somewhere have it said 49 is it 48 annotations do your magic work here what do i want to look for picture tick maybe what was that function maybe it'll have the function name uh wasn't loop load it was process tick i guess yeah process tick nope is it not this one it has to be that one right nope okay so it just doesn't have that name annotated which may mean he doesn't have it annotated at all that would suck um not a criticism of the annotations like it may not have seemed important it's very hard to read this does he notate when i make commits i don't think so oh he does all right wait for these commits are totally not okay here we go so it's after this so we add the vec i have a slow motion mode oh i missed where the commit happened i did not see it when the game to find the moment is just one tweak it i don't see anything in here that sounds like that change 238 to 356 so i have an hour and a half to review god came in more often um 236 to 236 to 356 so if i can find a place where i can see the conveyor belts here we go couldn't really tell no those are normal seat so it's after 248 that's still okay at 311 so it's between 311 and 356 but stay away from the conveyor belts most of the time is the problem when i'm doing this stuff here we go that looks correct still yep so somewhere between 334 and 356 still correct okay it's gotta be in the next 15 minutes or did i get the search wrong did i misread which commit it was oh here's where i add slow motion sorry i sorry i wasn't looking 348 19 so somebody in chat i had covered up chat accidentally yep here it is all right so why oh because the slow motion is no that's not why yeah okay it is because the slow motion was not speeding up was stepping okay so without that the slow motion was steppy okay so we decided to up our tech by 460 to 240 so now we can i could have just done this fix right away but i just wanted to understand what was going on um so um you could i could see in that when it was running in slow motion before i made that change that the the character animation was totally smooth but the ground was moving in steps because we were running in slow motion but the physics was still running at 60 fps it wasn't making the physics run at final rate because i decided to use fixed size steps for the physics so now the fixed size steps are 240 so i just need to change the logistic system uh small ticks like that in a header it might be in a header but it's the long tick oh right the long tick is the tick okay so if we go up as we did earlier and change the logistics long tick to four times bigger oh headers all the stuff got reset when i checked out the old dsp's so we go find the long tick i would make that four times bigger so 48 and then the uh that should the conveyor about the animation should automatically be fixed but we have to manually fix the rotation animation and i looked at and found where that was earlier but now i've forgotten where i found that that was it was directly hardcoded in here text anim or something like that text anim offset so this just needs to go still logistic ticks doesn't change that okay nope it's still wrong those are animating wrong maybe that's not the texture scroll section separate this why is this logistics tick it should now be ticking the long ticks uh the long ticks logistics ticks are okay right so this needs to be shifted by five all right there we go now the other way i do game physics sometimes is to actually use the past ndt rather than to convert to fixed time steps and if you do that then the slow mo is magically good and if you want fixed time steps for reproducibility and you want good looking slow mo in game because you want to do bullet time or something then you have to actually sort of do both you have to allow your time step your fixed time step to change but still convert to fixed time steps and then you just convert to shorter fixed time steps all right um i'm going to take a like a one minute break and while i'm taking that break uh go ahead and make suggestions what i should work on next since i fixed the thing you told me to work on that's all factory ideas do i have non factory stuff there's various non factory stuff and i can go back to working on the character stuff if you want shoot guns explode stuff and character arms are some proposals reading my dms or whatever so uh procedural terrain textures that's not on the list i don't think a pseudo wing towel work on the list is that in here somewhere i won't work on trains dmc pseudo wing towel um maybe i could work on slip blocks and then um start thinking about how to make physics account for slip blocks because of physics like there are slip blocks in there currently and the physics just ignores them treats them as full blocks i don't know i don't really feel like that well i wasn't denying the pseudo wing towel stuff it was the sort of procedural terrain textures that somebody said that i was saying is not on the list um shadows yeah shadows are interesting because i was like originally kind of avoiding them because i don't want to draw all the terrain twice because i was trying to push out the view distance but it's possible to cache that so it might actually be possible to do a decent job i don't know without without too much performance overhead without cutting performance in half i'm thinking i might just stop because i'm just none of this sounds appealing so that's usually a good if i a good sign that i'm just not into it um the rather than try to force something out maybe better to just stop huh plus i need to take a nap so old i'm so old i only slept for like six hours um or less what else did we fix today continuous foot motion fix logistics yeah let's put shadows on that to-do list because it's probably worth doing i'm gonna put in two places go put it near the top even though i don't use the top that way these days and then we'll put i guess i guess when you make changes to terrain when you dynamically change terrain you do have to rebuild the whole the least the whole area that that casts you when you delete something if you add something you don't have to you can just add that in but all right yeah we'll stop there um so um thanks for watching i hope you found that educational mold and um you know it's a pretty great program and you're the best audience i think this game is going to be huge so here we go see you next time bye bye