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

119 lines
9.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[video output=day624 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Turns Out It Really WAS a Feature" vod_platform=youtube id=aHPNZoXOe7A annotator=Miblo]
[0:03][Recap and set the stage for the day][:speech]
[0:59][Try to provoke our :lighting bug][:run]
[2:07][See our "value contamination" :lighting bug][:run]
[3:14][Demo the cutscene asset finding bug][:"asset system" :run]
[3:50][Reacquaint ourselves with the cutscene asset picking code][:"asset system" :research]
[5:39][Fix RenderLayeredScene() to use the Tag_IntroCutscene][:"asset system"]
[5:55][Our cutscene now plays fine][:"asset system" :run]
[7:21][@fatkidforlife][Who did this :art!!!]
[7:31][Cutscene, continued][:"asset system" :run]
[8:43][@rupan3][Are you in Texas?]
[8:49][Cutscene, continued][:"asset system" :run]
[9:28][@thedustydino][I stopped programming two years ago so I haven't watched for a long time, but I still have so much respect for your work]
[9:31][Consider the cutscene good][:"asset system" :run]
[9:53][We don't have trees, but we do have an unaligned baby in the garden][:"asset system" :run]
[10:17][Align the baby][:"asset system" :run]
[11:23][We need our trees back][:"asset system" :run]
[12:23][Investigate our trees absence][:"asset system" :research]
[14:36][Fix GetTreeTags() to use the Tag_Tree][:"asset system"]
[15:15][Our trees are back][:"asset system" :run]
[16:01][Scale and position the trees][:"asset system" :run]
[17:42][Restart with proper trees][:"asset system" :run]
[18:48][Move on to our :lighting bug][:run]
[23:03][Make ValidateTexelComponent() consider values less than 0.1 invalid][:lighting]
[24:45][Invalid values with apparently working :lighting][:run]
[25:46][Add a break line in ValidateTexelComponent() and compile in -Od][:lighting]
[26:46][Try to break in to ValidateTexelComponent()][:lighting :run]
[27:04][~remedybg bug: Breakpoint failure despite fully loaded .dll][:admin]
[29:51][~remedybg bug: Duplicate file loading][:admin]
[31:24][~remedybg bug due to Microsoft change: C:\\ baked in to paths in .pdb, breaking subst drives][:admin]
[33:15][Add our breakpoint in ValidateTexelComponent() but never hit it in -Od][:lighting :run]
[34:54][Resize the window and pick up a snake head partner][:lighting :run]
[35:28][@xxthebigfoxx][Compiling with /fp\:fast on release?]
[36:05][Realise that we've gathered the snake head][:lighting :run]
[38:40][Investigate the gathering of our snake head, breaking in to ExecuteBrain() and ExecuteBrainHero()][:"entity system" :run]
[44:18][AddPlayer() does not use the head (to associate a hat)][:"entity system" :research]
[46:28][Break in to ExecuteBrainHero() to see the Head containing multiple pieces][:"entity system" :run]
[47:38][Investigate this as an improper entity initialisation problem][:"entity system" :research]
[52:16][ClearWorldEntityBlock() does not clear, but CreateEntity() does][:"entity system" :memory :research]
[54:12][Hunt for clues as to how we gathered the snake head][:"entity system" :research]
[57:03][AddBrain() increments the World->LastUsedEntityStorageIndex][:"entity system" :research]
[57:45][CheckForJoiningPlayers() sets BrainID to ReservedBrainID_FirstHero + ControllerIndex][:"entity system" :research]
[59:07][@floorislava][dukedoHand]
[59:15][@enemypanda][I was on reddit]
[59:39][@somebody_took_my_name][The snake gets the controller's brain ID][:"entity system"]
[59:47][@moache][I'm guessing you're using a new brain index instead of a reserved one][:"entity system"]
[1:00:05][Reacquaint ourselves with the ReservedBrainID_ values and usage][:"entity system" :research]
[1:04:55][@xxthebigfoxx][Chat didn't find the bug because there is no bug, obviously]
[1:05:21][Continue to investigate our snake head gathering bug][:"entity system" :memory :research]
[1:07:04][RegisterEntity() does not check slot usage][:"entity system" :memory :research]
[1:15:59][The snake head's tBob, dtBob and ddtBob are FLT_MIN][:"entity system" :research]
[1:19:00][AddSnake() is the only running function that sets HitPointMax to 3][:"entity system" :research]
[1:22:06][Step in to AddSnake() and inspect the BrainID][:"entity system" :run]
[1:23:44][Investigate this as a post-initialisation corruption bug][:"entity system" :memory :research]
[1:26:43][Scour CheckForJoiningPlayers() for possible problems][:"entity system" :memory :research]
[1:28:12][It was a feature all along?][:"entity system" :memory :research]
[1:29:25][Try out our snake head collection feature][:"entity system" :run]
[1:31:14][Make AddPlayer() create the Head as an associable entity][:"entity system"]
[1:32:54][Try out our nearby head swapping feature][:"entity system" :run]
[1:34:17][Make ExecuteBrainHero() position the Head nearer the Body][:"entity system"]
[1:35:13][Our head has a Z-offset and disappears when moving left][:"entity system" :run]
[1:35:48][Make ExecuteBrainHero() decrease the clutch offset][:"entity system"]
[1:36:17][Try out our closer clutch][:"entity system" :run]
[1:36:23][Make ExecuteBrainHero() raise the head][:"entity system"]
[1:36:46][Try making ExecuteBrainHero() set the Head's position to match the Body's][:"entity system"]
[1:36:55][The head no longer disappears][:"entity system" :run]
[1:37:12][Check the ddP computation in ExecuteBrainHero()][:"entity system" :research]
[1:41:32][Try making ExecuteBrainHero() use ConHero->ddP in the Head->P computation][:"entity system"]
[1:41:59][Our head disappears][:"entity system" :run]
[1:42:02][Try making ExecuteBrainHero() use the left-facing (1, 0, 0) values always][:"entity system"]
[1:42:27][The head is always missing][:"entity system" :run]
[1:42:34][Try making ExecuteBrainHero() use the right-facing (1, 0, 0) values always][:"entity system"]
[1:42:39][The head is always visible][:"entity system" :run]
[1:42:41][Continue to consider our head disappearance][:"entity system" :research]
[1:43:18][@molly][Meow]
[1:45:02][Investigate this as a downstream computation problem][:"entity system" :research]
[1:47:43][Make ExecuteBrainHero() use the left-facing (1, 0, 0) values, and #if 0 out all Head->P related code][:"entity system"]
[1:48:54][The head has returned][:"entity system" :run]
[1:49:06][Reintroduce the ddP computation code][:"entity system"]
[1:49:14][The head remains][:"entity system" :run]
[1:49:18][Focus on the HeadDelta][:"entity system" :research]
[1:50:01][Let ExecuteBrainHero() use the computed ddP for the Head->P][:"entity system"]
[1:50:15][The head remains][:"entity system" :run]
[1:50:22][Let ExecuteBrainHero() use the HeadDelta][:"entity system"]
[1:51:18][The head disappears][:"entity system" :run]
[1:51:24][Comment out the Body->FloorDisplace setting in ExecuteBrainHero()][:"entity system"]
[1:51:29][The head disappears][:"entity system" :run]
[1:51:32][Instead comment out the Body->YAxis setting in ExecuteBrainHero()][:"entity system"]
[1:51:36][The head remains][:"entity system" :run]
[1:51:42][Investigate our problem in the Body->YAxis][:"entity system" :research]
[1:53:17][Try making ExecuteBrainHero() set Body->YAxis to (0, 1)][:"entity system"]
[1:53:25][The head remains][:"entity system" :run]
[1:53:35][Remove Body->YAxis][:"entity system"]
[1:53:40][Reacquaint ourselves with the Entity->FloorDisplace usage][:"entity system" :research]
[1:53:59][Consider the Entity->FloorDisplace to be fine][:"entity system" :run]
[1:54:03][Try out conversations and swappable heads][:"entity system" :run]
[1:55:26][Q&A][:speech]
[1:56:20][@pikeman_xd]["It's not a bug, it's a feature"]
[1:56:46][@rydgel_][What's your Windows coding environment? Is it Vim inside mingw?]
[1:56:57][@somebody_took_my_name][Q: The Linux branch has the debug / release bug as well, and it triggers all the time on my setup at least]
[1:57:17][@r2game][Yes, it is a Q&A request in Day 290[ref
site="Handmade Hero Episode Guide"
page="Finishing Separated Rendering"
url=https://guide.handmadehero.org/code/day290/#3842]]
[1:57:52][@x13pixels][Q: Looks like MSVC is writing the subst'd drive to the PDB as long as you build from the subst drive (as one would expect). Does building from ~4coder somehow change to the C: drive before building or something like this? In any case, will make ~RemedyBG more resilient to these sorts of things! Thank you!]
[1:58:40][@stuntcoder][@handmade_hero There is something wrong with capturing ~4coder. The screen gets very busy, which is distracting. I saw it last week too, but we thought it might be on my side. It also shows on the YouTube upload of last week's episode.[ref
site="Handmade Hero Episode Guide"
page="Investigating a Lighting Bug"
url=https://guide.handmadehero.org/code/day623/] The older YouTube uploads are clean…]
[2:02:14][@somebody_took_my_name][Q: Someone asked if the swap would work on the orphans as well?][:"entity system"]
[2:02:53][@stuntcoder][Might help if you go black background for the time being. It did not show on your black cmd window]
[2:04:07][@dufji][I would rather blame twitch encoding than your machine]
[2:05:57][@anusaa][Q: [~hero Handmade Hero] is running for a while by now. Is there any scheduled ending? I'm at episode 308[ref
site="Handmade Hero Episode Guide"
page="Debugging the Cycle Check"
url=https://guide.handmadehero.org/code/day308/] and I love the series]
[2:06:27][Thank you, everyone][:speech]
[/video]