diff --git a/cmuratori/hero/code/code639.hmml b/cmuratori/hero/code/code639.hmml new file mode 100644 index 0000000..060cf81 --- /dev/null +++ b/cmuratori/hero/code/code639.hmml @@ -0,0 +1,46 @@ +[video output=day639 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Drawing Debug Diagrams" vod_platform=youtube id=-3XleCNqp1s annotator=Miblo] +[0:00][Recap and set the stage for the day][:"debug system" :speech] +[1:28][Conditionally define HANDMADE_DIAGRAMS to HANDMADE_INTERNAL][:"debug system"] +[2:01][Prepare to draw our diagrams][:"debug system" :research] +[3:21][Demo the debug overlays and plan our diagram drawing and filtering][:"debug system" :run] +[9:31][Determine to move the entity :"debug visualisation" into the diagramming system][:"debug system" :research] +[11:18][Change MoveEntity(), RefineVoxelPlacement() and UpdateBest() to use our diagramming system, introducing a version of DIAGRAM_Color() that takes R, G and B separately][:"debug system"] +[17:41][Our old :"debug visualisation" is gone][:run] +[18:12][Force AddPlayer() to let the glove pass our diagramming filter][:"debug system"] +[19:41][Hit an assertion on DEBUG_RECORD_ALLOCATION() via a DIAGRAM_Text() call in ShapesCollide()][:"debug system" :memory :run] +[20:59][Investigate our DEBUG_RECORD_ALLOCATION() assertion hit][:"debug system" :memory :research] +[22:02][Try disabling the diagramming in ShapesCollide()][:"debug system"] +[22:27][No longer hit that DEBUG_RECORD_ALLOCATION() assertion][:"debug system" :memory :run] +[23:04][Add an assertion in RenderDiagrams()][:"debug visualisation"] +[23:58][Never hit that assertion in RenderDiagrams()][:"debug visualisation" :run] +[24:06][Make UpdateAndRenderWorld() call RenderDiagrams()][:"debug visualisation"] +[25:04][Implement RenderDiagrams()][:"debug visualisation"] +[30:19][Consider not buffering the diagrams][:"debug visualisation" :research] +[32:31][Continue to implement RenderDiagrams()][:"debug visualisation"] +[33:52][Our glove's :collision diagrams are not drawn][:"debug visualisation" :run] +[34:05][Quickly sanity check the diagramming code][:"debug visualisation" :research] +[34:32][Make RenderDiagrams() reset the Current diagram_attributes upon finishing the Diagram_Box case][:"debug visualisation"] +[35:06][Step through RenderDiagrams()][:"debug visualisation" :run] +[38:01][Our glove's :collision diagrams are drawn after all, in -Od][:"debug visualisation" :run] +[38:46][Our glove's :collision diagrams are also drawn in -O2][:"debug visualisation" :run] +[39:04][Decrease Sticky.Thick from 0.1f to 0.01f in RenderDiagrams()][:"debug visualisation" :run] +[39:22][Our diagramming system is in action][:"debug visualisation" :run] +[40:19][Implement the Diagram_Line case in RenderDiagrams()][:"debug visualisation"] +[42:14][Change the v3 Color in diagram_attributes to be a v4, augmenting diagram_entry with separate Color and Thick values][:"data structure" :"debug system"] +[43:46][Implement the Diagram_Point case in RenderDiagrams()][:"debug visualisation"] +[45:15][Reacquaint ourselves with our text :rendering][:font :research] +[50:30][Fix RenderDiagrams() to pass RenderGroup->WhiteTexture to PushCube()][:"debug visualisation"] +[51:16][Enable diagramming in ShapesCollide() when its Result is true][:collision :"debug visualisation"] +[52:24][Try out our collision-based diagramming][:collision :"debug visualisation" :run] +[53:02][Consider putting :filtering into the system][:"debug visualisation" :research] +[54:10][Diagramming in The Witness: Capturing diagrams over multiple frames][:collision :"debug visualisation" :run] +[56:57][Interpret our collision-based diagramming][:collision :"debug visualisation" :run] +[59:39][Determine to add a "Capture" button to remember diagrams, which we may then "Step" through][:collision :"debug visualisation" :run] +[1:00:57][Augment diagram_group with a Captured boolean, introducing DIAGRAM_Capture()][:"data structure" :"debug system"] +[1:03:56][Add a "Capture" / "Resume" button in CollisionEditor(), introducing DIAGRAM_IsCaptured()][:"debug system" :ui] +[1:07:10][Try out our "Capture" button][:"debug visualisation" :run :ui] +[1:08:32][Remove SingleStep and StepLatch from game_mode_world][:"data structure" :"debug system"] +[1:09:26][@Molly][Meow][:speech] +[1:11:49][Reinstate SingleStep and StepLatch in game_mode_world][:"data structure" :"debug system"] +[1:12:17][Try "Single Stepping"][:"debug visualisation" :run :ui] +[/video]