[video output=day075 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Conditional Movement Based on Step Heights" vod_platform=youtube id=bZxa4fdtI2Y annotator=Miblo annotator=schme]
[3:58][Blackboard: Handling stairwell traversal]
[7:45][Blackboard: Collision Detection in Z]
[8:21][Blackboard: Draw reasonably]
[8:35][Run the game to show the multiple visible floors]
[11:07][handmade_sim_region.cpp: Prevent the entities from being accelerated by gravity while on the ground]
[12:21][handmade_sim_region.h: Introduce EntityFlag_ZSupported]
[13:00][handmade_sim_region.cpp: Use EntityFlag_ZSupported]
[14:50][handmade.cpp: Take out the stairwell height padding]
[15:44][handmade_sim_region.cpp: Add a BreakHere variable in MoveEntity]
[16:05][Debugger: Step into this point in MoveEntity]
[17:34][Debugger: Note that EntityFlag_ZSupported is only being set when we're under the Ground]
[17:54][handmade_sim_region.cpp: Change that if statement to include the Ground]
[18:19][Debugger: Step into that point in MoveEntity]
[20:31][handmade.cpp: Give the stairwell some Z depth]
[21:31][Run the game and jump through the layers and find that we do now collide with the stairwell]
[22:28][handmade_sim_region.cpp: Specify another criteria to determine when we want to stay pegged to the ground]
[24:05][handmade.cpp: Stop the Familiar from following us]
[24:17][Walk up and down the stairs]
[25:39][handmade.cpp: Make the stairwell a little longer]
[28:03][Run the game and demonstrate teleporting to the top of the stairs]
[28:32][Blackboard: Consider building the stairwells out of multiple things]
[30:05][handmade_sim_region.cpp: Consider doing a speculative collide test on the stairs]
[32:33][handmade_sim_region.cpp: Introduce TestWallNormal, TestHitEntity and SpeculativeCollide to do these speculative tests]
[39:58][Debugger: Step into SpeculativeCollide and find that we are not hitting the stairwell]
[41:12][handmade_sim_region.cpp: Flip the logic of SpeculativeCollide]
[41:26][Run the game and find that the stairwell is behaving as expected expect for the fact that we're not gliding along it, and also that we are now not colliding with walls]
[42:34][handmade_sim_region.cpp: Tweak the logic of SpeculativeCollide]
[43:26][handmade_sim_region.cpp: Stop setting StopsOnCollision = false]
[43:42][Run up and down the stairs and note how good it feels]
[45:28][handmade.h: Attend to the TODO list]
[46:53][handmade_sim_region.cpp: Add DefaultGroundLevel to sim_region]
[47:56][handmade_sim_region.cpp: Compute the DefaultGroundLevel based on the information in BeginSim]
[48:32][Blackboard: Specifying the ground levels in a given sim region]
[50:29][handmade_sim_region.cpp: Rename DefaultGroundLevel to GroundZBase]
[51:26][Blackboard: Snapping to the correct ground level]
[53:47][handmade.h: TODO(casey) Need to make a solid concept of ground levels so the camera can be freely placed in Z and have multiple ground levels in one sim region]
[54:33][Run the game and note that the Familiar and Monstar are erroneously getting snapped up to our Z level]
[55:19][handmade.cpp: Tweak entities' positions based on their Z level]
[58:33][Q&A][:speech]
[59:18][@abnercoimbre][I'm guessing the engine will manage arbitrarily high ground levels? Would you really want that? Gameplay such as projecting attacks to a monstar below does sound fun]
[1:00:48][@programgamer][Why not use the X and Y positions as they appear on the screen for detecting sim regions?]
[1:01:18][@marco_castorina][Should you also check the "stair step" at the top of the top of the stairs? It seems you can exit earlier than at the bottom]
[1:03:01][@jarsefax][Could you please do an overview, on blackboard maybe, of the "entities position system" (world, screen, etc.) now that it's "done"? I'm having trouble understanding it (hopefully you'll understand my question)]
[1:06:39][@kknewkles][Why is the order of stuff drawn on the screen janky (some trees overlap others, some are proper)?]
[1:06:46][@kknewkles][Isn't it easy to draw them in order - each layer draws entities left to right, top to bottom?]
[1:08:09][@ikerms][Is the reason why things in different levels seem shifted up due to the Z-offset when rendering?]
[1:09:15][@ikerms][Will this cause for the wall on the top to be drawn above the screen when the camera is locked instead of following the character?]
[1:09:52][@acrmuui][When you are allocating everything with custom memory allocators, do you only use the stack for pointers?]
[1:10:25][@programgamer][Are you not worried that three dimensions might complicate entity A.I. to the point where it impacts performance?]
[1:11:21][@pjh777][Casey, can you check your forum registration process? I never got a confirmation email - registered a couple of days ago]
[1:12:23][@rooctag][When will you switch back to centered camera? It seems to be missing on the TODO list]
[1:12:44][@cvaucher][Any particular reason behind making the chunk origin the center of the chunk rather than one of the corners?]
[1:13:47][@acrmuui][Sorry for being unclear. Do you store anything else than pointers on the stack?]
[1:14:34][@programgamer][If the camera were far away enough from the player, would the player go into a simpler routine like the rest of the entities?]
[1:14:56][@rooctag][Should the possible collision test use the TestHitEntity instead of the TestEntity or are they the same? Can you briefly go over the flow of the HitEntity changes?]
[1:21:30][@rooctag][You could now cancel out the first HitThis == true and not do other checks]
[1:23:06][We have agreed to go on break for a week][:speech]
[/video]
