Debugging Graph-based Sort
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next timestamp
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu and Index Controls

a
w
s
d
h j k l


Esc Close menu / unfocus timestamp

Quotes and References Menus and Index

Enter Jump to timestamp

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:11Recap and set the stage for the day
0:11Recap and set the stage for the day
0:11Recap and set the stage for the day
1:40Run the game and see the current state
1:40Run the game and see the current state
1:40Run the game and see the current state
3:51"Let's use the word "evolucent""α
3:51"Let's use the word "evolucent""α
3:51"Let's use the word "evolucent""α
4:06handmade_render_group.cpp: Make PushRenderElement_() take and set the ScreenArea
4:06handmade_render_group.cpp: Make PushRenderElement_() take and set the ScreenArea
4:06handmade_render_group.cpp: Make PushRenderElement_() take and set the ScreenArea
5:01handmade_render_group.cpp: Make PushRect() set the ScreenArea
5:01handmade_render_group.cpp: Make PushRect() set the ScreenArea
5:01handmade_render_group.cpp: Make PushRect() set the ScreenArea
6:54handmade_render_group.cpp: Make PushBitmap() set a provisional ScreenArea for the sprite
6:54handmade_render_group.cpp: Make PushBitmap() set a provisional ScreenArea for the sprite
6:54handmade_render_group.cpp: Make PushBitmap() set a provisional ScreenArea for the sprite
8:10Blackboard: The ScreenArea for Regular vs Rotated Sprites
8:10Blackboard: The ScreenArea for Regular vs Rotated Sprites
8:10Blackboard: The ScreenArea for Regular vs Rotated Sprites
11:51handmade_render_group.h: Add ScreenArea to render_group and make Clear() take it
11:51handmade_render_group.h: Add ScreenArea to render_group and make Clear() take it
11:51handmade_render_group.h: Add ScreenArea to render_group and make Clear() take it
17:03handmade_render_group.cpp: Make Perspective() set the ScreenArea
17:03handmade_render_group.cpp: Make Perspective() set the ScreenArea
17:03handmade_render_group.cpp: Make Perspective() set the ScreenArea
18:15Debugger: Run the game, crash in BuildSpriteGraph() and inspect the ScreenArea values
18:15Debugger: Run the game, crash in BuildSpriteGraph() and inspect the ScreenArea values
18:15Debugger: Run the game, crash in BuildSpriteGraph() and inspect the ScreenArea values
20:18handmade_render_group.cpp: Look through GetRenderEntityBasisP() and note that NearClipPlane is set so that 0 is clipped out
20:18handmade_render_group.cpp: Look through GetRenderEntityBasisP() and note that NearClipPlane is set so that 0 is clipped out
20:18handmade_render_group.cpp: Look through GetRenderEntityBasisP() and note that NearClipPlane is set so that 0 is clipped out
20:59Debugger: Inspect the values of B
20:59Debugger: Inspect the values of B
20:59Debugger: Inspect the values of B
21:48handmade_render_group.cpp: Assert in PushRenderElement_() that GetArea(ScreenArea) < 2000 * 2000
21:48handmade_render_group.cpp: Assert in PushRenderElement_() that GetArea(ScreenArea) < 2000 * 2000
21:48handmade_render_group.cpp: Assert in PushRenderElement_() that GetArea(ScreenArea) < 2000 * 2000
23:28handmade_math.h: Introduce GetArea()
23:28handmade_math.h: Introduce GetArea()
23:28handmade_math.h: Introduce GetArea()
24:36Debugger: Run the game and hit that assertion, then step out and see who called that function
24:36Debugger: Run the game and hit that assertion, then step out and see who called that function
24:36Debugger: Run the game and hit that assertion, then step out and see who called that function
26:13handmade_render_group.cpp: Comment out that assertion, run the game and look at the actual bug
26:13handmade_render_group.cpp: Comment out that assertion, run the game and look at the actual bug
26:13handmade_render_group.cpp: Comment out that assertion, run the game and look at the actual bug
26:28handmade_render.cpp: Reenable the PushStuct() call in SortEntries()
26:28handmade_render.cpp: Reenable the PushStuct() call in SortEntries()
26:28handmade_render.cpp: Reenable the PushStuct() call in SortEntries()
26:54Run the game and see that we're running incredibly slowly
26:54Run the game and see that we're running incredibly slowly
26:54Run the game and see that we're running incredibly slowly
27:27handmade_render.cpp: Make BuildSpriteGraph() and WalkSpriteGraph() a TIMED_FUNCTION
27:27handmade_render.cpp: Make BuildSpriteGraph() and WalkSpriteGraph() a TIMED_FUNCTION
27:27handmade_render.cpp: Make BuildSpriteGraph() and WalkSpriteGraph() a TIMED_FUNCTION
27:58build.bat: Switch to -O2
27:58build.bat: Switch to -O2
27:58build.bat: Switch to -O2
28:24Run the game and realise that we can't see the debug display because it isn't sorted correctly
28:24Run the game and realise that we can't see the debug display because it isn't sorted correctly
28:24Run the game and realise that we can't see the debug display because it isn't sorted correctly
29:06build.bat: Switch back to -Od
29:06build.bat: Switch back to -Od
29:06build.bat: Switch back to -Od
29:52Run the game and see that we're getting some pretty non sequitur results
29:52Run the game and see that we're getting some pretty non sequitur results
29:52Run the game and see that we're getting some pretty non sequitur results
30:46handmade.cpp: Switch back to the title sequence in order to see how the sorting routine performs on these
30:46handmade.cpp: Switch back to the title sequence in order to see how the sorting routine performs on these
30:46handmade.cpp: Switch back to the title sequence in order to see how the sorting routine performs on these
31:43Note that the drop shadow of the text is being sorted incorrectly
31:43Note that the drop shadow of the text is being sorted incorrectly
31:43Note that the drop shadow of the text is being sorted incorrectly
33:42handmade_cutscene.cpp: Try and scramble the order of the first scene's layers
33:42handmade_cutscene.cpp: Try and scramble the order of the first scene's layers
33:42handmade_cutscene.cpp: Try and scramble the order of the first scene's layers
34:22Run the game and see that the scene is now incorrectly sorted
34:22Run the game and see that the scene is now incorrectly sorted
34:22Run the game and see that the scene is now incorrectly sorted
35:25Debugger: Break into BuildSpriteGraph() and inspect the values for A and B
35:25Debugger: Break into BuildSpriteGraph() and inspect the values for A and B
35:25Debugger: Break into BuildSpriteGraph() and inspect the values for A and B
35:56handmade_render.cpp: Prevent BuildSpriteGraph() from comparing NodeIndexA with itself
35:56handmade_render.cpp: Prevent BuildSpriteGraph() from comparing NodeIndexA with itself
35:56handmade_render.cpp: Prevent BuildSpriteGraph() from comparing NodeIndexA with itself
36:51Debugger: Break into BuildSpriteGraph() and see that A and B are now different
36:51Debugger: Break into BuildSpriteGraph() and see that A and B are now different
36:51Debugger: Break into BuildSpriteGraph() and see that A and B are now different
38:50Debugger: Step through BuildSpriteGraph() and see if it behaves as expected
38:50Debugger: Step through BuildSpriteGraph() and see if it behaves as expected
38:50Debugger: Step through BuildSpriteGraph() and see if it behaves as expected
41:03Debugger: Step through WalkSpriteGraph() and RecursiveFromToBack() and see if they behave as expected
41:03Debugger: Step through WalkSpriteGraph() and RecursiveFromToBack() and see if they behave as expected
41:03Debugger: Step through WalkSpriteGraph() and RecursiveFromToBack() and see if they behave as expected
45:37Debugger: Step through OpenGLRenderCommands() and inspect the SortedIndices array
45:37Debugger: Step through OpenGLRenderCommands() and inspect the SortedIndices array
45:37Debugger: Step through OpenGLRenderCommands() and inspect the SortedIndices array
47:09handmade_cutscene.cpp: Make RenderLayeredScene() DebugTag the cutscene layers
47:09handmade_cutscene.cpp: Make RenderLayeredScene() DebugTag the cutscene layers
47:09handmade_cutscene.cpp: Make RenderLayeredScene() DebugTag the cutscene layers
50:34Debugger: Run the game, step through BuildSpriteGraph() and RecursiveFromToBack() and watch the DebugTag values
50:34Debugger: Run the game, step through BuildSpriteGraph() and RecursiveFromToBack() and watch the DebugTag values
50:34Debugger: Run the game, step through BuildSpriteGraph() and RecursiveFromToBack() and watch the DebugTag values
52:30handmade_cutscene.cpp: Revert the cutscene layers to their original order
52:30handmade_cutscene.cpp: Revert the cutscene layers to their original order
52:30handmade_cutscene.cpp: Revert the cutscene layers to their original order
52:55Debugger: Step through RecursiveFromToBack(), watch the DebugTag values and confirm that the code is doing what we think it is doing
52:55Debugger: Step through RecursiveFromToBack(), watch the DebugTag values and confirm that the code is doing what we think it is doing
52:55Debugger: Step through RecursiveFromToBack(), watch the DebugTag values and confirm that the code is doing what we think it is doing
54:27handmade_render.cpp: Look through how the sort_sprite_bound flows through the functions
54:27handmade_render.cpp: Look through how the sort_sprite_bound flows through the functions
54:27handmade_render.cpp: Look through how the sort_sprite_bound flows through the functions
56:50handmade_cutscene.cpp: Note the reason why the cutscene was sorting as it was
56:50handmade_cutscene.cpp: Note the reason why the cutscene was sorting as it was
56:50handmade_cutscene.cpp: Note the reason why the cutscene was sorting as it was
58:12handmade_world_mode.cpp: Make UpdateAndRenderWorld() only generate one screen and disable the Monstar
58:12handmade_world_mode.cpp: Make UpdateAndRenderWorld() only generate one screen and disable the Monstar
58:12handmade_world_mode.cpp: Make UpdateAndRenderWorld() only generate one screen and disable the Monstar
1:00:18handmade_world_mode.cpp: Prevent AddStandardRoom() from calling BeginGroundedEntity()
1:00:18handmade_world_mode.cpp: Prevent AddStandardRoom() from calling BeginGroundedEntity()
1:00:18handmade_world_mode.cpp: Prevent AddStandardRoom() from calling BeginGroundedEntity()
1:00:36Run the game and hit the Assert in OpenGLRenderCommands() because ClipRectCount == 0
1:00:36Run the game and hit the Assert in OpenGLRenderCommands() because ClipRectCount == 0
1:00:36Run the game and hit the Assert in OpenGLRenderCommands() because ClipRectCount == 0
1:01:39Debugger: Investigate how we ended up with no ClipRects
1:01:39Debugger: Investigate how we ended up with no ClipRects
1:01:39Debugger: Investigate how we ended up with no ClipRects
1:05:27handmade_render_group.cpp: Make BeginRenderGroup() rather than Perspective() take the PixelWidth and PixelHeight in order to compute the ScreenArea, and call PushClipRect()
1:05:27handmade_render_group.cpp: Make BeginRenderGroup() rather than Perspective() take the PixelWidth and PixelHeight in order to compute the ScreenArea, and call PushClipRect()
1:05:27handmade_render_group.cpp: Make BeginRenderGroup() rather than Perspective() take the PixelWidth and PixelHeight in order to compute the ScreenArea, and call PushClipRect()
1:09:26handmade_world_mode.cpp: Make AddStandardRoom() create one tile
1:09:26handmade_world_mode.cpp: Make AddStandardRoom() create one tile
1:09:26handmade_world_mode.cpp: Make AddStandardRoom() create one tile
1:09:57Run the game and see that our sort appears to handle our Y-sprites just fine, but that our Z-sprites are all messed
1:09:57Run the game and see that our sort appears to handle our Y-sprites just fine, but that our Z-sprites are all messed
1:09:57Run the game and see that our sort appears to handle our Y-sprites just fine, but that our Z-sprites are all messed
1:10:32Defer questions until Monday and end it now
🗩
1:10:32Defer questions until Monday and end it now
🗩
1:10:32Defer questions until Monday and end it now
🗩