Index hero/code654

This commit is contained in:
Miblo 2022-05-16 19:20:53 +01:00
parent 7e9caa9ea0
commit 73279d012b
1 changed files with 125 additions and 0 deletions

View File

@ -0,0 +1,125 @@
[video output=day654 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Self-illuminating Floor Tiles" vod_platform=youtube id=w4lHAdy6KaA annotator=Miblo]
[0:00][Recap and set the stage for the day][:speech]
[0:18][Demo the :lighting][:run]
[2:10][Determine to add self-illuminating tiles][:lighting :run]
[4:11][Reacquaint ourselves with our :rendering pipeline][:research]
[11:14][Consider doing self-illumination through the ACES film curve vs directly (like the cutscene)][:lighting :research]
[14:50][Reacquaint ourselves with the source of FragEmission][:lighting :research]
[15:57][Introduce the notion of FragTone in the vertex and fragment shaders in CompileZBiasProgram()][:lighting]
[17:02][:Run successfully][:lighting]
[17:16][Indent the fragment shader]
[18:08][Yearn for lunch][:speech]
[18:58][Indent the fragment shader (cont.)]
[21:39][@dedknd][Not sure if this is part of Buddhist teaching]
[22:23][@ryanfleury][Don't tell me this is about the ~4coder layer]
[23:13][Reacquaint ourselves with the fog, emission, etc. "tuning knobs" in the fragment shader][:rendering :research]
[25:43][Separate out the fogging and ACES filtered :rendering knobs]
[28:22][The game is not tone-mapped, and the cutscene looks right][:rendering :run]
[28:53][Premiere the cutscene narration][:run]
[32:09][The cutscene is still working][:rendering :run]
[32:32][@chillagen][No way, this game has TF2 hats?]
[32:58][Thank you for the sub gifting][:speech]
[33:56][@redunlocked][Your posh British accent isn't terrible]
[34:42][Start to enable PushQuad() to set the Tone renaming Reserved to Tone in textured_quad][:"data structure" :rendering]
[37:54][@ryanfleury][A really sweet ~4coder layer feature would be to log per-line edits and correlate them with timestamps in a session]
[38:08][Plug @AndrewJDR's annotated [~hero Handmade Hero] source code linking to the indexed episode guide[ref
site=GitHub
page="HandmadeHero / annotated_cpp"
url=https://github.com/HandmadeHero/annotated_cpp]]
[39:08][Enable PushQuad() to set Tone to a VertTone, which is either 255 or, if lighting is off, 0][:lighting :rendering]
[41:29][The game remains not tone-mapped][:rendering :run]
[41:40][Specify a Tone vertex array in UseProgramEnd() and UseProgramBegin()][:rendering]
[44:27][@botondar][As far as I know, on modern GPUs the input assembler is just shader code, so you can just fetch them manually (if I understood you correctly)][:rendering]
[45:27][@brian_nevec][You can in D3D11 with StructuredBuffer][:rendering]
[45:46][Associate VertTone in OpenGLCreateProgram()][:rendering]
[46:18][@brian_nevec][Yeah, you can use the vertexid to index the buffer][:rendering]
[47:00][Our tone-mapping is back, the debug overlay is now correctly unlit and the cutscene still looks right][:lighting :rendering :run]
[47:35][Determine to add self-illuminating blocks][:lighting :speech]
[48:23][We've have it all][:speech]
[49:32][@ryanfleury][This DLSR autofocus is in... UNACCEPTABLE CONDITION]
[50:28][Change CreateWorld() to connect the dungeon entrance room to the north of (rather than below) the forest entrance][:"procedural generation"]
[51:24][Traverse to the outdoors, where the ground cover is not lit][:lighting :run]
[52:13][Reacquaint ourselves with the ground cover drawing code][:rendering]
[52:58][Make VertexOut() set the Tone to 255 (i.e. tone-map and light it)][:rendering]
[53:05][Our ground cover is lit again][:lighting :run]
[53:14][@ponkkiz][It fixed the blocky :lighting bug?]
[53:24][Traverse to the dungeon][:run]
[54:22][Volunteer voice acting services to "Downward Dungeon"][:speech]
[56:52][Sample reel for "Downward Dungeon"][:speech]
[57:14][Workshop some dungeon-based game titles][:speech]
[58:50][@wakeuphate][There should be a game about travelling to the dungeon but not actually doing the dungeon]
[59:43][Workshop some dungeon-based game titles (cont.)][:speech]
[1:00:17][@vtlmks]["Dude, Where's the Dungeon?"]
[1:00:34][@technicbeam][I wrote a game once called "Walking Simulator" - it was a text adventure where all you did was walk different directions and 'look']
[1:00:43][Pitch "Dungeon?" / "Imagine Dragons"][:speech]
[1:03:09][@kindly_sloth][You could make a Tycoon-style game where you design such a town]
[1:04:37][@sneakybob_wot]["Dave Made a Dungeon"]
[1:05:01][Toggle on TileSwitchPattern in CreateDungeon()][:"procedural generation"]
[1:06:08][@spacenaming]["My First Dungeon", and make the game all bright red, yellow and blue]
[1:06:14][Traverse to the dungeon's tile switches][:run]
[1:07:10][Reacquaint ourselves with the tile switch :lighting code][:research]
[1:07:59][Make ExecuteBrainSwitches() decrease the light's brightness from 10 to 1][:lighting]
[1:08:17][Consider making :"hot reloading" work with the :"procedural generation"][:research]
[1:08:48][Make CreateWorld() place the player in the dungeon][:"procedural generation"]
[1:09:10][Start in the dungeon and toggle the tile switches][:run]
[1:09:42][Consider not adding a light source, but just setting the emission of the cube][:lighting :research]
[1:10:28][@e11m][Is the light never going away?][:lighting]
[1:10:34][Consider removing the AddPieceLight() call from TileSwitchPattern()][:lighting :"procedural generation" :research]
[1:10:57][Imagine the "Downward Dungeon" theme song][:speech]
[1:11:58][Prevent TileSwitchPattern from calling AddPieceLight()][:lighting :"procedural generation"]
[1:12:19][The tiles turn on but do not light up][:lighting :"procedural generation" :run]
[1:12:31][Prevent AddPlayer() from adding a head light, and make the glove's light less green][:lighting :"procedural generation"]
[1:13:17][The glove light is a bit too bright][:lighting :"procedural generation" :run]
[1:13:21][Make AddPlayer() dim the (commented out) head light from 0.1 to 0.05][:lighting :"procedural generation"]
[1:13:29][The glove light remains too bright][:lighting :"procedural generation" :run]
[1:13:35][Make AddPlayer() dim the glove light from 0.1 to 0.025][:lighting :"procedural generation"]
[1:13:43][Our glove's glow is more like it][:lighting :"procedural generation" :run]
[1:13:57][Make TileSwitchPattern() apply the Tag_Stone tag][:lighting :"procedural generation"]
[1:15:51][Our stone switches look better][:lighting :"procedural generation" :run]
[1:16:18][@aukkras][Heh, the certificate for ~4coder website[ref
site=4coder
url=https://4coder.net/] expired]
[1:16:52][The :AI goes wherever it wants][:run]
[1:17:10][@kindly_sloth][Did one of those heads just phase through the wall?]
[1:19:09][@dedknd][03/04/22 Allen: I am not currently developing ~4coder. But I intend to pick it up again soon to get the codebase organized for open sourcing]
[1:19:34][Consider how to represent self-illumination][:"entity system" :research]
[1:21:33][Try making UpdateAndRenderEntities() pass 1 as the Emission value to PushCube()][:"entity system" :lighting]
[1:21:40][All our cubes are lit][:"entity system" :lighting :run]
[1:21:44][Revert UpdateAndRenderEntities() to pass 0 as the Emission value to PushCube()][:"entity system" :lighting]
[1:22:15][Consider how best to articulate our desired Emission value to the system][:"entity system" :lighting :research]
[1:24:01][Introduce cube_piece containing an Emission value to replace cube_uv_layout in entity_visible_piece][:"data structure" :"entity system" :lighting]
[1:25:26][The game still runs][:run]
[1:25:30][Make UpdateAndRenderEntities() unpack the Emission[ref
author="Frank Zappa"
title="Dumb All Over"
publisher=YouTube
url=https://www.youtube.com/watch?v=Y8TKiRo-W4U]][:"entity system" :lighting]
[1:26:46][There are no emission cubes][:"entity system" :lighting :run]
[1:26:58][Make ExecuteBrainSwitches() set the switch's emission to 50][:"entity system" :lighting]
[1:27:24][The switches don't emit light][:"entity system" :lighting :run]
[1:27:54][Make UpdateAndRenderEntities() pass the unpacked Emission to PushCube()][:"entity system" :lighting]
[1:28:19][The switches emit light, but don't tell the :lighting system they're doing it][:"entity system" :lighting :run]
[1:28:54][Reacquaint ourselves with PushOccluder() and its use][:"entity system" :lighting :research]
[1:36:00][Replace the IsLight boolean with an Emission float in lighting_box][:"data structure" :"entity system" :lighting]
[1:38:21][The switches still emit light][:"entity system" :lighting :run]
[1:38:44][Fold PushLight() and PushOccluder() into a unified PushLightingElement()][:"entity system" :lighting]
[1:41:24][The switches still emit light][:"entity system" :lighting :run]
[1:41:39][Make ExecuteBrainSwitches() set the Emission on the switch's occluder, rather than the base piece][:"entity system" :lighting]
[1:41:56][The switches are not lit][:"entity system" :lighting :run]
[1:42:13][Make ExecuteBrainSwitches() also set the Emission on the switch's base piece][:"entity system" :lighting]
[1:43:01][@sagian2005][What would translucent :lighting even be?]
[1:43:15][The switches remain not telling the :lighting system about their emission][:"entity system" :run]
[1:44:06][The light leaks a little][:lighting :run]
[1:45:10][Make UpdateAndRenderEntities() unpack and pass the Emission of occluders to PushLightingElement()][:"entity system" :lighting]
[1:45:50][The switches emit light and tell the :lighting system about it][:"entity system" :run]
[1:46:06][Make ExecuteBrainSwitches() set the Color of the switch's occluder piece][:"entity system" :lighting]
[1:46:29][The switches emit cyan light][:"entity system" :lighting :run]
[1:47:15][Make ExecuteBrainSwitches() dim the light from 50 to 25][:"entity system" :lighting]
[1:47:25][Our tile switch light is better][:"entity system" :lighting :run]
[1:47:52][That's it, with a plug of Molly Movie Club[ref
site="Molly Movie Club"
url=https://www.mollymovieclub.com/]][:speech]
[1:49:35][@me_love_pomegranate][Are you watching Better Call Saul season 6?]
[1:50:52][@rooctag][Do I need to watch Interstellar to enjoy the podcast?]
[1:57:20][Thanks, everyone][:speech]
[/video]