cinera_handmade.network/cmuratori/hero/code/code190.hmml

35 lines
2.8 KiB
Plaintext
Raw Permalink Normal View History

[video output=day190 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Cleaning Up Debug Globals" vod_platform=youtube id=7jmDV_Hk42U annotator=Miblo annotator=debiatan]
[0:14][The only reason we are writing a user interface is to support our debug system]
[1:08][Since we are the only users of the UI, we don't care if it's not intuitive, as long as it provides efficient interaction at a low implementation cost]
[3:08][Recap]
[3:22][Our approach to UI code]
[4:45][Initial plan for today: Turning off the profiling visualization]
[7:09][The debug UI can be a nice complement live code editing]
[9:19][Change of plans: We'll get rid of the global debug variables]
[10:30][Moving global variables inside the debug state]
[10:50][Making sure all routines have access to the debug state]
[12:22][It will be better to access the debug state through the DebugGlobalMemory. Implementing DEBUGGetState]
[17:15][Testing. We got rid of those global variables]
[18:19][The memory for the DEBUGRenderGroup comes from the transient arena. It should come from the debug arena]
[19:05][Performing the DEBUGRenderGroup allocation inside DEBUGReset]
[20:06][Access to the debug state should imply its initialization]
[22:20][CollationArena will be a subarena of DebugArena]
[23:50][Initializing the debug RenderGroup]
[24:32][DEBUGReset will call BeginRender]
[25:42][DEBUGOverlay will call EndRender]
[26:50][The debug system shouldn't rely on the asset system; debug assets should be baked into the binary]
[32:45][If we want the debug system to have access to the asset system, we need to make sure that the asset system is initialized first]
[33:58][Implementing DEBUGStart and DEBUGEnd]
[39:09][Testing. Live code editing and debug services work together now]
[40:10][Resizing the profile view by changing its orthographic projection]
[44:43][The mouse pointer position should also be transformed]
[45:27][Controlling the placement of the profile rectangle]
[49:57][Adjusting lane heights]
[53:37][Displaying the profile rectangle so that we can debug the code that scales and positions it]
[56:41][Fixing lane heights]
[1:01:00][Q&A][:speech]
[1:01:40][@Miblo][I appreciate that there are more robust ways of implementing such things, but would it be practical to use the debug data to drive some of the game's visual effects, e.g. fire or, more likely, some otherworldly magical entity or the display on an in-game computer? Maybe it could be a sort of Easter Egg for those of us who know how the game's made]
[1:02:45][@elxenoaizd][There are magenta spikes in the debug graph that happens so fast we don't have time to click on them. How do we plan to catch those? Having the ability to step-over frame-by-frame would be useful, methinks. Another idea is to have the debug text left off at the last rect position we hovered at]
[1:04:38][Wrap it up][:speech]
[/video]