[video output=day307 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Visualizing Sort Groups" vod_platform=youtube id=PDg_4lBhTUI annotator=Miblo]
[0:11][A few words on the bonuses of programming on stream]
[2:07][Run the game and demo the bug]
[2:40][handmade_world_mode.cpp: Reenable the else clause in AddStandardRoom() to generate the rest of the room]
[3:23][handmade_render_group.cpp: Correct RectMinMax to RectMinDim in PushRect()]
[4:34][Run the game and see how the sprites are sorted with that typo having been corrected]
[7:06][build.bat: Toggle HANDMADE_INTERNAL on]
[8:12][Run the game and see the profiler being sorted improperly]
[9:02][Consider augmenting our ability to see how the sort is behaving]
[11:47][handmade_entity.cpp: Disable the volume highlighting and the PushRectOutline for the traversables]
[12:52][Run the game and note that the speed has increased, and that the trees are all now sorted properly]
[14:34][handmade_world_mode.cpp: Make AddStandardRoom() add a room above]
[15:04][Run the game and see that the sort is actually wrong]
[15:35][handmade_opengl.cpp: Make OpenGLRenderCommands() draw the sprite bounds]
[18:13][handmade_render.h: Add Sprite_DebugBox to the sprite_flag enum]
[18:42][handmade_opengl.cpp: Continue working on OpenGLRenderCommands()]
[19:25][handmade_opengl.cpp: Introduce OpenGLDrawBoundsRecursive()]
[22:07][handmade_opengl.cpp: Make OpenGLRenderCommands() draw each bound in a different colour]
[27:04][Run the game and see that it does nothing]
[27:16][handmade_opengl.cpp: Make OpenGLRenderCommands() call glDisable(GL_TEXTURE_2D) before the bounds drawing routine]
[27:57][handmade_opengl.cpp: Make OpenGLDrawBoundsRecursive() draw a line between the centres of two sprite bounds]
[30:39][handmade_opengl.cpp: Introduce OpenGLLineVertices()]
[31:53][handmade_opengl.cpp: Make OpenGLDrawBoundsRecursive() call OpenGLLineVertices()]
[32:27][Run the game and see our new debug visualisation]
[33:35][handmade_world_mode.cpp: Disable the Clear() in UpdateAndRenderWorld() for now]
[33:51][Run the game, see it without the Clear and consider how best to slipstream that Clear into the process]
[37:04][handmade_opengl.cpp: Make OpenGLRenderCommands() call glClear() and consider leaving the Clear() off in UpdateAndRenderWorld()]
[37:22][handmade_opengl.cpp: "Get our hideous pink on"][quote 498]
[38:21][handmade_platform.h: Add a ClearColor to the game_render_commands struct and change how the screen clearing works in general]
[41:46][Run the game and see what happens now]
[42:46][handmade_opengl.cpp: Enable OpenGLRenderCommands() to toggle drawing the sprite bounds]
[44:46][Run the game and try toggling the sprite bounds]
[45:14][handmade_world_mode.cpp: Make AddStandardRoom() draw multiple layers]
[45:54][Run the game and see the state of our sorting]
[46:39][Blackboard: Sort Error Sources]
[47:30][Blackboard: Bugs]
[47:49][Blackboard: Bad Comparison]
[48:56][Blackboard: Graph Cycle Resolution]
[51:06][Consider drawing graph cycles, and ways to resolve cycles]
[53:00][Blackboard: Generation Tag]
[54:32][Blackboard: Erasable Bit]
[55:33][handmade_render.h: Add Sprite_Cycle to the sprite_flag enum]
[56:22][handmade_render.cpp: Make RecursiveFromToBack() first set and later clear the Sprite_Cycle]
[57:14]["You know it's been a bad day when you don't know where the \~ key is"][quote 499]
[57:20][handmade_render.h: Add HitCycle to the sprite_graph_walk struct]
[58:04][handmade_render.cpp: Make WalkSpriteGraph() and RecursiveFromToBack() work in tandem with that HitCycle]
[59:34][handmade_opengl.cpp: Make OpenGLRenderCommands() only draw the sprite bounds for sprites that cycle]
[1:00:20][Run the game and see no cycles]
[1:00:59][Q&A][:speech]
[1:01:25][@insobot][Wherefore art thou... Can't wait to watch that stream begins?]
[1:02:26][@abner][Programming won't necessarily be in your life forever. I feel like you will eventually settle down and write fiction novels]
[1:02:40][@chronaldragon][How do you decide when a problem is complex enough to need visualization?]
[1:05:51][@roam00010011][Is the build graph still O(n^2)?]
[1:07:51][@Hjortshoej][When can we download JACS Season 5?]
[1:08:15][Wrap it up][:speech]
[/video]
