Handmade Hero»Episode Guide
Debugging the Basic Editor UI
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next marker
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 Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

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:01Recap and set the stage for the day wiring up our asset editor
🗩
0:01Recap and set the stage for the day wiring up our asset editor
🗩
0:01Recap and set the stage for the day wiring up our asset editor
🗩
1:03Run the game to show our current asset editor UI
🏃
1:03Run the game to show our current asset editor UI
🏃
1:03Run the game to show our current asset editor UI
🏃
2:36A few words on our immediate-mode user interface
🗩
2:36A few words on our immediate-mode user interface
🗩
2:36A few words on our immediate-mode user interface
🗩
8:42Introduce the notion of an Immediate Button
8:42Introduce the notion of an Immediate Button
8:42Introduce the notion of an Immediate Button
15:22See if there's anything of DEBUGInteract() that could be shared between the asset and debug systems
📖
15:22See if there's anything of DEBUGInteract() that could be shared between the asset and debug systems
📖
15:22See if there's anything of DEBUGInteract() that could be shared between the asset and debug systems
📖
18:24Introduce EditorInteract() for GameUpdateAndRender() to call, guided by DEBUGInteract()
18:24Introduce EditorInteract() for GameUpdateAndRender() to call, guided by DEBUGInteract()
18:24Introduce EditorInteract() for GameUpdateAndRender() to call, guided by DEBUGInteract()
29:50Enable EditorInteract() to handle mouse input
29:50Enable EditorInteract() to handle mouse input
29:50Enable EditorInteract() to handle mouse input
42:40Run the game and crash in Undo()
🏃
42:40Run the game and crash in Undo()
🏃
42:40Run the game and crash in Undo()
🏃
43:05Introduce IsValid() for Button() to call
43:05Introduce IsValid() for Button() to call
43:05Introduce IsValid() for Button() to call
44:59Run the game to see all our UI buttons lighting up because they share the same ID
🏃
44:59Run the game to see all our UI buttons lighting up because they share the same ID
🏃
44:59Run the game to see all our UI buttons lighting up because they share the same ID
🏃
45:36Try making Button() set the ID from the passed LabelText
45:36Try making Button() set the ID from the passed LabelText
45:36Try making Button() set the ID from the passed LabelText
46:41Run the game to see that buttons with the same label light up, due to our compiler doing string pooling
🏃
46:41Run the game to see that buttons with the same label light up, due to our compiler doing string pooling
🏃
46:41Run the game to see that buttons with the same label light up, due to our compiler doing string pooling
🏃
47:14String pooling
🗩
47:14String pooling
🗩
47:14String pooling
🗩
48:11Make Button() take a dev_id ID which AssetEditor() is responsible for constructing
48:11Make Button() take a dev_id ID which AssetEditor() is responsible for constructing
48:11Make Button() take a dev_id ID which AssetEditor() is responsible for constructing
49:57Introduce DevIDFromPointer() calling a newly introduced FILE_AND_LINE(), and rename UniqueFileCounterString() to DEBUG_NAME()
49:57Introduce DevIDFromPointer() calling a newly introduced FILE_AND_LINE(), and rename UniqueFileCounterString() to DEBUG_NAME()
49:57Introduce DevIDFromPointer() calling a newly introduced FILE_AND_LINE(), and rename UniqueFileCounterString() to DEBUG_NAME()
57:42Make AssetEditor() and UpdateAndRenderEditor() call DevIDFromPointer()
57:42Make AssetEditor() and UpdateAndRenderEditor() call DevIDFromPointer()
57:42Make AssetEditor() and UpdateAndRenderEditor() call DevIDFromPointer()
58:41Run the game to find that our UI buttons light up individually, and that Undo() crashes
🏃
58:41Run the game to find that our UI buttons light up individually, and that Undo() crashes
🏃
58:41Run the game to find that our UI buttons light up individually, and that Undo() crashes
🏃
59:34Introduce Sentinelize() to initialise the Undo and Redo lists
59:34Introduce Sentinelize() to initialise the Undo and Redo lists
59:34Introduce Sentinelize() to initialise the Undo and Redo lists
1:01:47Run the game to find that Undo and Redo are unavailable
🏃
1:01:47Run the game to find that Undo and Redo are unavailable
🏃
1:01:47Run the game to find that Undo and Redo are unavailable
🏃
1:02:07Make AllocateEditorEdit() call PushFirst()
1:02:07Make AllocateEditorEdit() call PushFirst()
1:02:07Make AllocateEditorEdit() call PushFirst()
1:04:32Run the game and crash in Undo()
🏃
1:04:32Run the game and crash in Undo()
🏃
1:04:32Run the game and crash in Undo()
🏃
1:04:55Make EndUIFrame() clear the UI->IDToExecute to prevent Undo from operating forever
1:04:55Make EndUIFrame() clear the UI->IDToExecute to prevent Undo from operating forever
1:04:55Make EndUIFrame() clear the UI->IDToExecute to prevent Undo from operating forever
1:05:33Run the game to find that our button clicks do not perform an edit
🏃
1:05:33Run the game to find that our button clicks do not perform an edit
🏃
1:05:33Run the game to find that our button clicks do not perform an edit
🏃
1:05:46Augment dev_ui with a NextIDToExecute so that EndUIFrame() may set an IDToExecute that is valid for the current frame only
1:05:46Augment dev_ui with a NextIDToExecute so that EndUIFrame() may set an IDToExecute that is valid for the current frame only
1:05:46Augment dev_ui with a NextIDToExecute so that EndUIFrame() may set an IDToExecute that is valid for the current frame only
1:07:49Run the game to find that edits, Undo and Redo all work, but Revert crashes
🏃
1:07:49Run the game to find that edits, Undo and Redo all work, but Revert crashes
🏃
1:07:49Run the game to find that edits, Undo and Redo all work, but Revert crashes
🏃
1:08:11Make InitializeEditor() initialise the CleanUndoSentinalNext
1:08:11Make InitializeEditor() initialise the CleanUndoSentinalNext
1:08:11Make InitializeEditor() initialise the CleanUndoSentinalNext
1:09:02Run the game to find that Revert now works, but Delete does not
🏃
1:09:02Run the game to find that Revert now works, but Delete does not
🏃
1:09:02Run the game to find that Revert now works, but Delete does not
🏃
1:10:00Fix AssetEditor() to correctly delete edits
1:10:00Fix AssetEditor() to correctly delete edits
1:10:00Fix AssetEditor() to correctly delete edits
1:11:55Run the game to find that deletion works, and prioritise our next steps: 1) Asset selection; 2) UI positioning; 3) UI edit interaction
🏃
1:11:55Run the game to find that deletion works, and prioritise our next steps: 1) Asset selection; 2) UI positioning; 3) UI edit interaction
🏃
1:11:55Run the game to find that deletion works, and prioritise our next steps: 1) Asset selection; 2) UI positioning; 3) UI edit interaction
🏃
1:13:55Enable EditorInteract() to handle asset picking on click
1:13:55Enable EditorInteract() to handle asset picking on click
1:13:55Enable EditorInteract() to handle asset picking on click
1:21:28Run the game to find that asset picking works
🏃
1:21:28Run the game to find that asset picking works
🏃
1:21:28Run the game to find that asset picking works
🏃
1:22:47Dive into making UpdateAndRenderEntities() only highlight the selected entity
1:22:47Dive into making UpdateAndRenderEntities() only highlight the selected entity
1:22:47Dive into making UpdateAndRenderEntities() only highlight the selected entity
1:28:34Introduce DevIDFromU32s() and a dev_id_value union to enable even 32-bit systems to use 64-bit IDs
1:28:34Introduce DevIDFromU32s() and a dev_id_value union to enable even 32-bit systems to use 64-bit IDs
1:28:34Introduce DevIDFromU32s() and a dev_id_value union to enable even 32-bit systems to use 64-bit IDs
1:34:38Replace the u32 HighlightAssetIndex in editable_hit_test with a dev_id HighlightID, and make AssetEditor() set this HighlightID
1:34:38Replace the u32 HighlightAssetIndex in editable_hit_test with a dev_id HighlightID, and make AssetEditor() set this HighlightID
1:34:38Replace the u32 HighlightAssetIndex in editable_hit_test with a dev_id HighlightID, and make AssetEditor() set this HighlightID
1:37:08Run the game to find that the highlighting still occurs on hover
🏃
1:37:08Run the game to find that the highlighting still occurs on hover
🏃
1:37:08Run the game to find that the highlighting still occurs on hover
🏃
1:37:21Make UpdateAndRenderEntities() only call PushVolumeOutline() to highlight the entity whose DevID matches the HighlightID
1:37:21Make UpdateAndRenderEntities() only call PushVolumeOutline() to highlight the entity whose DevID matches the HighlightID
1:37:21Make UpdateAndRenderEntities() only call PushVolumeOutline() to highlight the entity whose DevID matches the HighlightID
1:38:43Run the game to find that everyone highlights
🏃
1:38:43Run the game to find that everyone highlights
🏃
1:38:43Run the game to find that everyone highlights
🏃
1:39:21Fix typo in DevIDFromU32s()
1:39:21Fix typo in DevIDFromU32s()
1:39:21Fix typo in DevIDFromU32s()
1:39:44Run the game to find that selection / highlighting works
🏃
1:39:44Run the game to find that selection / highlighting works
🏃
1:39:44Run the game to find that selection / highlighting works
🏃
1:40:01Enable EditorInteract() to clear highlighting when clicking on no asset
1:40:01Enable EditorInteract() to clear highlighting when clicking on no asset
1:40:01Enable EditorInteract() to clear highlighting when clicking on no asset
1:41:00Run the game to find that highlight clearing works, but certain entities are tough to pick
🏃
1:41:00Run the game to find that highlight clearing works, but certain entities are tough to pick
🏃
1:41:00Run the game to find that highlight clearing works, but certain entities are tough to pick
🏃
1:42:11Investigate the sorting in RayInterectsBox()
📖
1:42:11Investigate the sorting in RayInterectsBox()
📖
1:42:11Investigate the sorting in RayInterectsBox()
📖
1:44:07Run the game to find that our currently picked entity seems to affect which entity we may pick next
🏃
1:44:07Run the game to find that our currently picked entity seems to affect which entity we may pick next
🏃
1:44:07Run the game to find that our currently picked entity seems to affect which entity we may pick next
🏃
1:45:39Make EditorInteract() straight up set the HighlightID to the first asset in the hot group
1:45:39Make EditorInteract() straight up set the HighlightID to the first asset in the hot group
1:45:39Make EditorInteract() straight up set the HighlightID to the first asset in the hot group
1:46:17Run the game and move the cursor around the scene to see which entity gets highlighted
🏃
1:46:17Run the game and move the cursor around the scene to see which entity gets highlighted
🏃
1:46:17Run the game and move the cursor around the scene to see which entity gets highlighted
🏃
1:47:40Make UpdateAndRenderEditor() set the HighlightID on every update
1:47:40Make UpdateAndRenderEditor() set the HighlightID on every update
1:47:40Make UpdateAndRenderEditor() set the HighlightID on every update
1:47:56Run the game to still see stickiness on some entities
🏃
1:47:56Run the game to still see stickiness on some entities
🏃
1:47:56Run the game to still see stickiness on some entities
🏃
1:50:18Make UpdateAndRenderEntities() highlight whichever entity our ray cast hits
1:50:18Make UpdateAndRenderEntities() highlight whichever entity our ray cast hits
1:50:18Make UpdateAndRenderEntities() highlight whichever entity our ray cast hits
1:51:02Run the game to find that our cursor does not get stuck, which suggests that either our hit sorting routine or ID setting may be incorrect
🏃
1:51:02Run the game to find that our cursor does not get stuck, which suggests that either our hit sorting routine or ID setting may be incorrect
🏃
1:51:02Run the game to find that our cursor does not get stuck, which suggests that either our hit sorting routine or ID setting may be incorrect
🏃
1:52:15Make UpdateAndRenderEntities() highlight both our ray hits and the entity the asset system told us to highlight
1:52:15Make UpdateAndRenderEntities() highlight both our ray hits and the entity the asset system told us to highlight
1:52:15Make UpdateAndRenderEntities() highlight both our ray hits and the entity the asset system told us to highlight
1:52:43Run the game to see these different highlights
🏃
1:52:43Run the game to see these different highlights
🏃
1:52:43Run the game to see these different highlights
🏃
1:54:17Fix AddHit() to set the ID
1:54:17Fix AddHit() to set the ID
1:54:17Fix AddHit() to set the ID
1:54:42Run the game to find that our asset picking works perfectly
🏃
1:54:42Run the game to find that our asset picking works perfectly
🏃
1:54:42Run the game to find that our asset picking works perfectly
🏃
1:54:51Revert UpdateAndRenderEditor() to only set the HighlightID on click
1:54:51Revert UpdateAndRenderEditor() to only set the HighlightID on click
1:54:51Revert UpdateAndRenderEditor() to only set the HighlightID on click
1:55:12Run the game to find that all is good, and consider our next steps
🏃
1:55:12Run the game to find that all is good, and consider our next steps
🏃
1:55:12Run the game to find that all is good, and consider our next steps
🏃
1:56:19Q&A
🗩
1:56:19Q&A
🗩
1:56:19Q&A
🗩
1:57:28guybru5h_vi Q: How long do you think it would have taken you to get to this level in the project if you were working on it 8 hours a day?
🗪
1:57:28guybru5h_vi Q: How long do you think it would have taken you to get to this level in the project if you were working on it 8 hours a day?
🗪
1:57:28guybru5h_vi Q: How long do you think it would have taken you to get to this level in the project if you were working on it 8 hours a day?
🗪
1:59:07cvaucher Q: Is there a reason for making two lists for undo / redo rather than one?
🗪
1:59:07cvaucher Q: Is there a reason for making two lists for undo / redo rather than one?
🗪
1:59:07cvaucher Q: Is there a reason for making two lists for undo / redo rather than one?
🗪
2:00:22montify Q: Big engines support multiple render paths (D3D, OpenGL), but why do these engines not use only OpenGL instead of D3D?
🗪
2:00:22montify Q: Big engines support multiple render paths (D3D, OpenGL), but why do these engines not use only OpenGL instead of D3D?
🗪
2:00:22montify Q: Big engines support multiple render paths (D3D, OpenGL), but why do these engines not use only OpenGL instead of D3D?
🗪
2:02:34euphius Q: Which parts of C++ do you use?
🗪
2:02:34euphius Q: Which parts of C++ do you use?
🗪
2:02:34euphius Q: Which parts of C++ do you use?
🗪
2:03:21pythno Q: Follow-up question regarding OpenGL: Can you name some of the stuff of the subset they should have marked as OpenGL v5?
🗪
2:03:21pythno Q: Follow-up question regarding OpenGL: Can you name some of the stuff of the subset they should have marked as OpenGL v5?
🗪
2:03:21pythno Q: Follow-up question regarding OpenGL: Can you name some of the stuff of the subset they should have marked as OpenGL v5?
🗪
2:04:10mekagem Q: Then do you think Vulkan would not have this type of problem with bugs because it's more low level?
🗪
2:04:10mekagem Q: Then do you think Vulkan would not have this type of problem with bugs because it's more low level?
🗪
2:04:10mekagem Q: Then do you think Vulkan would not have this type of problem with bugs because it's more low level?
🗪
2:06:13vaualbus Q: So will we switch to D3D before shipping this game, or for simplicity will we stay with OpenGL?
🗪
2:06:13vaualbus Q: So will we switch to D3D before shipping this game, or for simplicity will we stay with OpenGL?
🗪
2:06:13vaualbus Q: So will we switch to D3D before shipping this game, or for simplicity will we stay with OpenGL?
🗪
2:07:53easylovingyou Q: Can you program shaders in asm on Vulkan, or any of the other graphics APIs?
🗪
2:07:53easylovingyou Q: Can you program shaders in asm on Vulkan, or any of the other graphics APIs?
🗪
2:07:53easylovingyou Q: Can you program shaders in asm on Vulkan, or any of the other graphics APIs?
🗪
2:10:57craterlord Q: Doesn't that same problem – APIs growing old and unsuitable for current graphics cards – also apply to DX12?
🗪
2:10:57craterlord Q: Doesn't that same problem – APIs growing old and unsuitable for current graphics cards – also apply to DX12?
🗪
2:10:57craterlord Q: Doesn't that same problem – APIs growing old and unsuitable for current graphics cards – also apply to DX12?
🗪
2:15:59pythno Q: In Handmade Hero I saw this concept of BeginRender / EndRender (I believe it is called) which reminds me of fixed function OpenGL glBegin, glEnd. Can you say how these functions in Handmade Hero roughly work or what is the concept behind it?
🗪
2:15:59pythno Q: In Handmade Hero I saw this concept of BeginRender / EndRender (I believe it is called) which reminds me of fixed function OpenGL glBegin, glEnd. Can you say how these functions in Handmade Hero roughly work or what is the concept behind it?
🗪
2:15:59pythno Q: In Handmade Hero I saw this concept of BeginRender / EndRender (I believe it is called) which reminds me of fixed function OpenGL glBegin, glEnd. Can you say how these functions in Handmade Hero roughly work or what is the concept behind it?
🗪
2:16:49l04d Q: Shouldn't these graphics APIs be made by GPU vendors, or can they not do that?
🗪
2:16:49l04d Q: Shouldn't these graphics APIs be made by GPU vendors, or can they not do that?
🗪
2:16:49l04d Q: Shouldn't these graphics APIs be made by GPU vendors, or can they not do that?
🗪
2:18:09easylovingyou Q: I mean current APIs. I know DX9 supports it up to 3.x or 4.0
🗪
2:18:09easylovingyou Q: I mean current APIs. I know DX9 supports it up to 3.x or 4.0
🗪
2:18:09easylovingyou Q: I mean current APIs. I know DX9 supports it up to 3.x or 4.0
🗪
2:18:21gaius_is_best_colossus Q: What do you expect people to learn with this series, other than how to make a game?
🗪
2:18:21gaius_is_best_colossus Q: What do you expect people to learn with this series, other than how to make a game?
🗪
2:18:21gaius_is_best_colossus Q: What do you expect people to learn with this series, other than how to make a game?
🗪
2:19:38guybru5h_vi Q: Do you think next generation consoles will adopt raytracing extensions, even if just to avoid using shadow maps?
🗪
2:19:38guybru5h_vi Q: Do you think next generation consoles will adopt raytracing extensions, even if just to avoid using shadow maps?
🗪
2:19:38guybru5h_vi Q: Do you think next generation consoles will adopt raytracing extensions, even if just to avoid using shadow maps?
🗪
2:21:09blamebauer Q: Why are most AAA games still running on DX11? Is DX12 too new and still not well supported?
🗪
2:21:09blamebauer Q: Why are most AAA games still running on DX11? Is DX12 too new and still not well supported?
🗪
2:21:09blamebauer Q: Why are most AAA games still running on DX11? Is DX12 too new and still not well supported?
🗪
2:21:45serioussennaw Q: What would make a graphics API great?
🗪
2:21:45serioussennaw Q: What would make a graphics API great?
🗪
2:21:45serioussennaw Q: What would make a graphics API great?
🗪
2:22:04yoshimoto555 Q: How often do you read other people's code bases? Do you have any recommendations of good examples of well architected code bases to learn from?
🗪
2:22:04yoshimoto555 Q: How often do you read other people's code bases? Do you have any recommendations of good examples of well architected code bases to learn from?
🗪
2:22:04yoshimoto555 Q: How often do you read other people's code bases? Do you have any recommendations of good examples of well architected code bases to learn from?
🗪
2:23:15cacheoverride Q: Was OpenGL 2.1 a great API?
🗪
2:23:15cacheoverride Q: Was OpenGL 2.1 a great API?
🗪
2:23:15cacheoverride Q: Was OpenGL 2.1 a great API?
🗪
2:23:25xxthebigfoxx Q: Is there a good API for GUI applications on Windows that you would suggest?
🗪
2:23:25xxthebigfoxx Q: Is there a good API for GUI applications on Windows that you would suggest?
🗪
2:23:25xxthebigfoxx Q: Is there a good API for GUI applications on Windows that you would suggest?
🗪
2:23:47Wrap it up
🗩
2:23:47Wrap it up
🗩
2:23:47Wrap it up
🗩