Handmade Hero»Episode Guide
Breaking Sprites into Layers
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next marker
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:43Recap and set the stage for the day
0:43Recap and set the stage for the day
0:43Recap and set the stage for the day
3:01Run the game and see where we're at
3:01Run the game and see where we're at
3:01Run the game and see where we're at
5:20handmade_entity.cpp: Stop UpdateAndRenderEntities() from calling ConvertToLayerRelative() and instead calculate the RelativeLayer as worked out yesterday
5:20handmade_entity.cpp: Stop UpdateAndRenderEntities() from calling ConvertToLayerRelative() and instead calculate the RelativeLayer as worked out yesterday
5:20handmade_entity.cpp: Stop UpdateAndRenderEntities() from calling ConvertToLayerRelative() and instead calculate the RelativeLayer as worked out yesterday
8:08handmade_entity.cpp: Make UpdateAndRenderEntities() get a WorldPos from MapIntoChunkSpace() in order to compute that RelativeLayer
8:08handmade_entity.cpp: Make UpdateAndRenderEntities() get a WorldPos from MapIntoChunkSpace() in order to compute that RelativeLayer
8:08handmade_entity.cpp: Make UpdateAndRenderEntities() get a WorldPos from MapIntoChunkSpace() in order to compute that RelativeLayer
10:29Run the game and see that we're in much better shape
10:29Run the game and see that we're in much better shape
10:29Run the game and see that we're in much better shape
11:02Consider introducing a concept in the render of the layer Z and the actual Z value
11:02Consider introducing a concept in the render of the layer Z and the actual Z value
11:02Consider introducing a concept in the render of the layer Z and the actual Z value
12:44handmade_render.h: Add ChunkZ to the sprite_bound struct
12:44handmade_render.h: Add ChunkZ to the sprite_bound struct
12:44handmade_render.h: Add ChunkZ to the sprite_bound struct
13:14handmade_render.cpp: Make IsInFrontOf() test that ChunkZ
13:14handmade_render.cpp: Make IsInFrontOf() test that ChunkZ
13:14handmade_render.cpp: Make IsInFrontOf() test that ChunkZ
15:07handmade_render_group.h: Add ChunkZ to the object_transform struct
15:07handmade_render_group.h: Add ChunkZ to the object_transform struct
15:07handmade_render_group.h: Add ChunkZ to the object_transform struct
15:40handmade_render_group.cpp: Make GetBoundFor() set the ChunkZ
15:40handmade_render_group.cpp: Make GetBoundFor() set the ChunkZ
15:40handmade_render_group.cpp: Make GetBoundFor() set the ChunkZ
16:04Run the game and see that that doesn't affect anything
16:04Run the game and see that that doesn't affect anything
16:04Run the game and see that that doesn't affect anything
16:21handmade_entity.cpp: Make UpdateAndRenderEntities() set that ChunkZ
16:21handmade_entity.cpp: Make UpdateAndRenderEntities() set that ChunkZ
16:21handmade_entity.cpp: Make UpdateAndRenderEntities() set that ChunkZ
16:43See how that affects the sort
16:43See how that affects the sort
16:43See how that affects the sort
18:21handmade_entity.cpp: Make UpdateAndRenderEntities() expand the bounds of the traversables to draw them like actual tiles
18:21handmade_entity.cpp: Make UpdateAndRenderEntities() expand the bounds of the traversables to draw them like actual tiles
18:21handmade_entity.cpp: Make UpdateAndRenderEntities() expand the bounds of the traversables to draw them like actual tiles
19:34Run the game and consider our cycling situation
19:34Run the game and consider our cycling situation
19:34Run the game and consider our cycling situation
20:52handmade_render.cpp: Shrink the sizes passed to the RectanglesIntersect() call in BuildSpriteGraph()
20:52handmade_render.cpp: Shrink the sizes passed to the RectanglesIntersect() call in BuildSpriteGraph()
20:52handmade_render.cpp: Shrink the sizes passed to the RectanglesIntersect() call in BuildSpriteGraph()
22:03handmade_debug.cpp: Make DEBUGStart() set the ChunkZ for the debug elements
22:03handmade_debug.cpp: Make DEBUGStart() set the ChunkZ for the debug elements
22:03handmade_debug.cpp: Make DEBUGStart() set the ChunkZ for the debug elements
23:13Run the game and toggle on the debug groups
23:13Run the game and toggle on the debug groups
23:13Run the game and toggle on the debug groups
24:55Consider how to leverage the layer data in the renderer
24:55Consider how to leverage the layer data in the renderer
24:55Consider how to leverage the layer data in the renderer
28:11handmade_entity.cpp: Simplify UpdateAndRenderEntities() so that it only knows about the alpha and the fog levels
28:11handmade_entity.cpp: Simplify UpdateAndRenderEntities() so that it only knows about the alpha and the fog levels
28:11handmade_entity.cpp: Simplify UpdateAndRenderEntities() so that it only knows about the alpha and the fog levels
32:25handmade_entity.cpp: Turn off the Alpha
32:25handmade_entity.cpp: Turn off the Alpha
32:25handmade_entity.cpp: Turn off the Alpha
33:35handmade_render_group.cpp: Make StoreColor() take a pointer to an object_transform and change all other functions to take a pointer to it
33:35handmade_render_group.cpp: Make StoreColor() take a pointer to an object_transform and change all other functions to take a pointer to it
33:35handmade_render_group.cpp: Make StoreColor() take a pointer to an object_transform and change all other functions to take a pointer to it
40:43"In theory this is a computer, yes?"α
40:43"In theory this is a computer, yes?"α
40:43"In theory this is a computer, yes?"α
41:08handmade_entity.cpp: Make UpdateAndRenderEntities() set the Color and tColor for the top layer and the far fog
41:08handmade_entity.cpp: Make UpdateAndRenderEntities() set the Color and tColor for the top layer and the far fog
41:08handmade_entity.cpp: Make UpdateAndRenderEntities() set the Color and tColor for the top layer and the far fog
43:00Run the game, break into UpdateAndRenderEntities() and inspect the EntityTransform values
43:00Run the game, break into UpdateAndRenderEntities() and inspect the EntityTransform values
43:00Run the game, break into UpdateAndRenderEntities() and inspect the EntityTransform values
43:57handmade_entity.cpp: Make UpdateAndRenderEntities() reverse the TestAlpha computation
43:57handmade_entity.cpp: Make UpdateAndRenderEntities() reverse the TestAlpha computation
43:57handmade_entity.cpp: Make UpdateAndRenderEntities() reverse the TestAlpha computation
44:40handmade_world_mode.cpp: Make AddStandardRoom() generate multiple layers of rooms
44:40handmade_world_mode.cpp: Make AddStandardRoom() generate multiple layers of rooms
44:40handmade_world_mode.cpp: Make AddStandardRoom() generate multiple layers of rooms
45:00Run the game, see how those layers of rooms look and consult the profiler
45:00Run the game, see how those layers of rooms look and consult the profiler
45:00Run the game, see how those layers of rooms look and consult the profiler
45:39build.bat: Switch to -O2, run the game and consult the profiler again
45:39build.bat: Switch to -O2, run the game and consult the profiler again
45:39build.bat: Switch to -O2, run the game and consult the profiler again
46:16"Oh my god! Why are there so many heads following me?"β
46:16"Oh my god! Why are there so many heads following me?"β
46:16"Oh my god! Why are there so many heads following me?"β
48:41Consider always rendering everyone with the ChunkZ they started with
48:41Consider always rendering everyone with the ChunkZ they started with
48:41Consider always rendering everyone with the ChunkZ they started with
50:34Blackboard: Sort Barriers
50:34Blackboard: Sort Barriers
50:34Blackboard: Sort Barriers
53:02handmade_render.h: #define SPRITE_BARRIER_OFFSET_VALUE
53:02handmade_render.h: #define SPRITE_BARRIER_OFFSET_VALUE
53:02handmade_render.h: #define SPRITE_BARRIER_OFFSET_VALUE
53:57handmade_render.cpp: Make BuildSpriteGraph() take and return NodeIndexA, which SortEntries() will pass to it
53:57handmade_render.cpp: Make BuildSpriteGraph() take and return NodeIndexA, which SortEntries() will pass to it
53:57handmade_render.cpp: Make BuildSpriteGraph() take and return NodeIndexA, which SortEntries() will pass to it
57:07Run the game and see that we have no change
57:07Run the game and see that we have no change
57:07Run the game and see that we have no change
57:22build.bat: Switch back to -Od, run the game and enable the sort groups
57:22build.bat: Switch back to -Od, run the game and enable the sort groups
57:22build.bat: Switch back to -Od, run the game and enable the sort groups
58:15Q&A
🗩
58:15Q&A
🗩
58:15Q&A
🗩
58:44Miblo Where are all those familiars coming from?!
🗪
58:44Miblo Where are all those familiars coming from?!
🗪
58:44Miblo Where are all those familiars coming from?!
🗪
1:01:15jheringa Snake looks broken?
🗪
1:01:15jheringa Snake looks broken?
🗪
1:01:15jheringa Snake looks broken?
🗪
1:06:47Wrap it up
🗩
1:06:47Wrap it up
🗩
1:06:47Wrap it up
🗩