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

55 lines
4.9 KiB
Plaintext
Raw Permalink Normal View History

[video output=day257 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Cleaning Up Some Win32 Issues" vod_platform=youtube id=HOZQmCXJjmE annotator=Miblo]
[0:22][Set the stage for the day]
[1:59][build.bat: Introduce and check for HANDMADE_STREAMING environment variable]
[6:55]["Where are you, Mr. Environment Variables?"][quote 432]
[8:53][Double check to make sure that we can still stream][quote 433]
[9:35][Delete a bunch of stuff we no longer use]
[14:13][handmade_platform.h: Rename PointerToU32 to U32FromPointer and call it where needed, in order to prevent GCC and clang from complaining]
[18:00][Run the game and ensure that it does run]
[19:13][win32_handmade.cpp: Remove the fader]
[23:31][Consider removing the multi-threaded OpenGL contexts]
[25:23][Run the game and point out a bug in the profiler upon hot-reloading]
[30:23][Debugger: Manually write xor instructions into memory][quote 434]
[32:45][Run the game and verify that the strings are getting messed up]
[34:25][handmade_debug.cpp: Fix the string handling]
[40:50][Run the game, test the hot-reloading to see that the strings do remain stable, but crash]
[42:04][Debugger: Inspect the Thread and find that the OpeningEvent does not have to be valid]
[43:19][Q: Why did we make the GlobalDebugTable a static buffer?]
[45:45][win32_handmade.cpp: Make the GlobalDebugTable in here be the authoritative one and rewrite how it gets collated]
[52:43][Run the game and twiddle it a little bit][quote 435]
[54:04][Investigate what is wrong with our profile]
[1:01:30][win32_handmade.cpp: Conditionally clear the debug event array if the game failed to load]
[1:02:39][Run the game and resume our investigations]
[1:04:04][Debugger: Step into BeginBlock and inspect the DebugState]
[1:09:41][Debugger: Inspect the events' GUIDs and break into EventsMatch]
[1:10:18]["I don't care about you"][quote 436]
[1:11:13][handmade_debug.cpp: Temporarily Assert that EventsMatch and inspect the Events when we hit that assertion]
[1:14:24][handmade_debug.cpp: Note that the Event is transitory and instead use StoredEvent for now]
[1:16:16][Debugger: Inspect the Events and StoredEvent]
[1:16:35]["Something very strange is afoot"][quote 437]
[1:17:32]["So complicated. I rather enjoy it, though"][quote 438]
[1:17:36][handmade_debug.h: Make open_debug_block not store the entire debug_event but instead just store the data we want]
[1:20:24][Run the game and see that we're still losing our profile]
[1:21:19][Q&A][:speech]
[1:21:36][@desuused][Would it be reasonable to separate the debug UI into a separate program that communicates with the game over pipes / sockets? The game won't hold the debug data and won't waste cycles on debug collation, debug rendering; if game crashes, you can still inspect frames, or even save them to the disk independently of the game running]
[1:23:09][@badflydog][You are referring to GlobalDebugTable outside a HANDMADE_INTERNAL guard, when you initialize it in UpdateAndRender]
[1:23:25][@Miblo][Casey, your stream overlay disappeared at some point this evening. I'm pretty darn sure it might have happened out of protest when you removed the beautiful fade, so it could be worth reimplementing that, if only in the interest of overlay stability]
[1:23:39][@elxenoaizd][How are you finding modular editing so far?]
[1:24:39][handmade.cpp: Initialise GlobalDebugTable inside HANDMADE_INTERNAL]
[1:25:10][@cubercaleb][Why not use DebugBreak instead of *(int*)0=0 which will allow you to step over the assertion if you really want but will still trigger the breakpoint]
[1:25:31][@erdomina][The Handmade twitter account says tomorrow is an off day]
[1:25:37][@badflydog][What exactly is modular editing?]
[1:26:09][@elxenoaizd][When you're writing your own renderers and stuff, do you go for a left-handed coordinate system or right-handed (for vector-matrix multiplications, etc.), and why?]
[1:26:36][@longboolean][Something I noticed when you disabled the trees rendering, the white dot used to resize the profiler view is hard to see over a light background, like the text was hard to read before adding a shadow]
[1:27:42][@zach211w][Do you find that commentating as you work helps you reason or helps you overall when programming?]
[1:28:03][@elxenoaizd][Do you think 4coder is good enough to switch to coming from emacs? Or are you finding it's missing some stuff yet?]
[1:29:59][@elxenoaizd][And vertical- / block-kill / -selection?]
[1:30:32][@cubercaleb][Off topic: I noticed that pragma pack will change the alignment of the struct. Is there a way of keeping the original alignment?]
[1:30:48][@badflydog][Could you share your 4coder_custom.cpp?]
[1:32:22][@btngames][Do you think it would be neat to save a DebugUI "layout" with torn elements open as they were last?]
[1:33:02][@mr4thdimention][I include it in 4coder at the $10 level]
[1:33:30][@badflydog][Is it possible to use with the $5 build?]
[1:33:49][Call it a day][:speech]
[1:34:26][Promote 4coder][:speech]
[/video]