diff --git a/cmuratori/hero/code/code474.hmml b/cmuratori/hero/code/code474.hmml new file mode 100644 index 0000000..34948d1 --- /dev/null +++ b/cmuratori/hero/code/code474.hmml @@ -0,0 +1,42 @@ +[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Removing the Transient State Concept" vod_platform=youtube id=R-_cK8jBNPE annotator=Miblo] +[0:01][Recap and set the stage for the day continuing our renderer :API cleanup, with a few general words on API design][:speech] +[3:03][Walk through RenderLoop()][:api :research] +[5:07][On offering user-controllable granularity in an :API, including both low-level control of data and high-level utility functions][:speech] +[7:22][Consider enforcing a maximum of one depth peel per render group, and making depth peeling a toggle][:api :rendering :speech] +[9:21][Set up to make depth peeling a toggle, and consider removing the redundant notion of GenerationID which was previously used to prevent asset eviction during a frame they're being used][:api :rendering :speech] +[12:30][Change OpenGLRenderCommands() to call OpenGLManageTextures() at its end, and remove GenerationID from asset_memory_header and DEBUGGetMainGenerationID()][:api :rendering] +[20:08][:Run the Renderer Test and the game successfully][:api :rendering] +[20:53][A few words on multithreaded texture transfer in OpenGL][:hardware :speech :threading] +[21:38][Make BeginRenderGroup() and EndRenderGroup() directly call BeginDepthPeel() and EndDepthPeel() respectively, introducing render_group_flags and eliminating DrawBuffer entirely][:api :rendering] +[41:29][Change the UpdateAndRender*() functions to take RenderCommands rather than RenderGroup and themselves open a RenderGroup using the passed RenderCommands][:api :rendering] +[48:54][:Run the Renderer Test successfully, and the game unsuccessfully, crashing in BuildSpatialPartitionForLighting()][:api :lighting :rendering] +[50:29][Fix UpdateAndRenderWorld() to call LightingTest() before EndRenderGroup()][:api :lighting :rendering] +[52:43][:Run the game successfully, but crash somewhere after OpenGLRenderCommands()][:api :lighting :rendering] +[53:29][Subsume transient_state into game_state, cleaning out the MainGenerationID and TranArena in favour of a general FrameArena][:memory] +[1:21:38][:Run the game successfully with the transient arena merged into the frame][:memory] +[1:24:24][:Run the game and successfully perform :"hot reloading"] +[1:25:46][Crash in StringLength() upon trying to open the profiler, and consider not unloading DLLs][:"debug system" :"hot reloading" :run] +[1:26:34][Return to debugging the cutscene :rendering][:api :lighting :run] +[1:28:59][Remove lighting_textures TestTextures from game_mode_world in favour of making PushLighting() allocate and return lighting_textures][:api :memory] +[1:32:27][:Run the game, crash with the lighting_textures having been freed before the renderer is invoked][:api :memory] +[1:33:20][Change GameUpdateAndRender() to clear the FrameArenaTemp only right before using it][:api :memory] +[1:34:56][Continue to debug our cutscene][:run] +[1:36:16][Change UpdateAndRenderTitleScreen() and UpdateAndRenderCutScene() to instantiate a Render_Default RenderGroup][:rendering] +[1:36:36][:Run our cutscene successfully, deducing that we do not currently support a lack of depth peels][:api :rendering] +[1:38:03][Q&A][:speech] +[1:38:17][@agendoo7][@handmade_hero Hi, do you use some wrist support while typing and using mouse? Does it help?][:health] +[1:38:50][@pythno][Q: Can you go through the :rendering pipeline briefly, again? What are the RenderCommands and RenderGroups are used for and where do they get initialized? Then, what exactly is OpenGL doing with them?][:api] +[1:41:49][@nxsy][Q: Hidden triforces on the orphanage still the best] +[1:42:11][@nordicplayer][Q: How can I start in game development, without knowing much about C++? How did you do it?] +[1:48:28][@rale_2][Q: Can you recommend any game / engine source code that would be helpful to look over for general architecture, e.g. the Doom engine, etc?] +[1:49:32][@chainelove][Q: As a reference, can you disclose how much you paid the artist for [~hero Handmade Hero] (a general idea of it)?] +[1:52:45][@pythno][Q: Quake 2 is pretty interesting to go through. Does it matter that much that it is not multithreaded, because at least it is only around 120k lines of code and with Fabien's overview it is a good starting point, I guess?] +[1:54:31][@ivereadthesequel][Q: Super off-topic, but as someone who is older and perhaps a lot more experienced than someone like me who is younger: do you have anything to say regarding interpersonal issues? Ever encounter people giving you issues, being rude? Even absolute bullies? Do you have any advice for that if one encounters that even as an adult in university or at their job?] +[1:56:57][@garryjohanson][Q: I'll go ahead and recommend Doom 3 as a learning engine since, from what I can tell, it meets all the criteria you just suggested: on a modern :API, has multithreading] +[1:58:36][@centhusiast][Q: Do you think the :performance of the game would be fine on the Intel iGPU or in general the integrated GPU?][:run] +[2:02:09][Shut it down[ref + site="Handmade Hero" + url=https://handmadehero.org/][ref + site="Molly Rocket's Site Nexus" + url=https://mollyrocket.com/nexus]][:speech] +[/video]