Handmade Hero»Episode Guide
Isolating the Camera Update Code
?
?

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:07Recap the career-switching side-streams
0:07Recap the career-switching side-streams
0:07Recap the career-switching side-streams
3:26todo.txt: Consult the TODO list and set the stage for the day's programming
3:26todo.txt: Consult the TODO list and set the stage for the day's programming
3:26todo.txt: Consult the TODO list and set the stage for the day's programming
12:16Run the game to remind ourselves of where we are
12:16Run the game to remind ourselves of where we are
12:16Run the game to remind ourselves of where we are
14:39handmade_world_mode.cpp: Reacquaint ourselves with how the region simulation works
14:39handmade_world_mode.cpp: Reacquaint ourselves with how the region simulation works
14:39handmade_world_mode.cpp: Reacquaint ourselves with how the region simulation works
18:29handmade_sim_region.cpp: Reacquiant ourselves with how EndWorldChange() updates the camera
18:29handmade_sim_region.cpp: Reacquiant ourselves with how EndWorldChange() updates the camera
18:29handmade_sim_region.cpp: Reacquiant ourselves with how EndWorldChange() updates the camera
21:28A few words on dependency reduction and functional programming
21:28A few words on dependency reduction and functional programming
21:28A few words on dependency reduction and functional programming
24:34handmade_sim_region.cpp: Pull out the camera updating code from EndWorldChange() into a new UpdateCameraForEntityMovement() function
24:34handmade_sim_region.cpp: Pull out the camera updating code from EndWorldChange() into a new UpdateCameraForEntityMovement() function
24:34handmade_sim_region.cpp: Pull out the camera updating code from EndWorldChange() into a new UpdateCameraForEntityMovement() function
28:05Run the game to find that the camera no longer functions
28:05Run the game to find that the camera no longer functions
28:05Run the game to find that the camera no longer functions
28:23handmade_world_mode.cpp: Make UpdateAndRenderWorld() call UpdateCameraForEntityMovement()
28:23handmade_world_mode.cpp: Make UpdateAndRenderWorld() call UpdateCameraForEntityMovement()
28:23handmade_world_mode.cpp: Make UpdateAndRenderWorld() call UpdateCameraForEntityMovement()
31:31Run the game to find that the camera now follows the hero again
31:31Run the game to find that the camera now follows the hero again
31:31Run the game to find that the camera now follows the hero again
32:02handmade_sim_region.cpp: Reorganise the code and consider BeginWorldChange() and EndWorldChange()
32:02handmade_sim_region.cpp: Reorganise the code and consider BeginWorldChange() and EndWorldChange()
32:02handmade_sim_region.cpp: Reorganise the code and consider BeginWorldChange() and EndWorldChange()
33:30handmade_world_mode.h: Introduce game_camera struct and make the necessary functions use it
33:30handmade_world_mode.h: Introduce game_camera struct and make the necessary functions use it
33:30handmade_world_mode.h: Introduce game_camera struct and make the necessary functions use it
36:46handmade_world_mode.cpp: Prevent AddStandardRoom() from generating boost pads
36:46handmade_world_mode.cpp: Prevent AddStandardRoom() from generating boost pads
36:46handmade_world_mode.cpp: Prevent AddStandardRoom() from generating boost pads
37:46Run the game to find that we have the same functionality as before
37:46Run the game to find that we have the same functionality as before
37:46Run the game to find that we have the same functionality as before
38:00handmade_sim_region.cpp and handmade_world_mode.cpp: Make every function that uses the camera take game_camera
38:00handmade_sim_region.cpp and handmade_world_mode.cpp: Make every function that uses the camera take game_camera
38:00handmade_sim_region.cpp and handmade_world_mode.cpp: Make every function that uses the camera take game_camera
41:38A few words on supporting multiple-sized rooms
41:38A few words on supporting multiple-sized rooms
41:38A few words on supporting multiple-sized rooms
45:55handmade_sim_region.cpp and handmade_world_mode.cpp: Continue making functions take a world rather than game_mode_world
45:55handmade_sim_region.cpp and handmade_world_mode.cpp: Continue making functions take a world rather than game_mode_world
45:55handmade_sim_region.cpp and handmade_world_mode.cpp: Continue making functions take a world rather than game_mode_world
50:18handmade_world_mode.cpp: Isolate the CameraP computation from BeginSim()
50:18handmade_world_mode.cpp: Isolate the CameraP computation from BeginSim()
50:18handmade_world_mode.cpp: Isolate the CameraP computation from BeginSim()
1:02:41Run the game to find that everything appears to be working properly, but that the game is running faster
1:02:41Run the game to find that everything appears to be working properly, but that the game is running faster
1:02:41Run the game to find that everything appears to be working properly, but that the game is running faster
1:03:39handmade_world_mode.cpp: Consider preventing Simulate() from taking a game_mode_world
1:03:39handmade_world_mode.cpp: Consider preventing Simulate() from taking a game_mode_world
1:03:39handmade_world_mode.cpp: Consider preventing Simulate() from taking a game_mode_world
1:06:27handmade_entity.cpp: Consider preventing UpdateAndRenderEntities() from taking the TypicalFloorHeight
1:06:27handmade_entity.cpp: Consider preventing UpdateAndRenderEntities() from taking the TypicalFloorHeight
1:06:27handmade_entity.cpp: Consider preventing UpdateAndRenderEntities() from taking the TypicalFloorHeight
1:07:37handmade_world_mode.cpp: Temporarily make Simulate() take the TypicalFloorHeight and GameEntropy rather than a whole game_mode_world
1:07:37handmade_world_mode.cpp: Temporarily make Simulate() take the TypicalFloorHeight and GameEntropy rather than a whole game_mode_world
1:07:37handmade_world_mode.cpp: Temporarily make Simulate() take the TypicalFloorHeight and GameEntropy rather than a whole game_mode_world
1:10:23handmade_world.h: Make GameEntropy belong in the world struct
1:10:23handmade_world.h: Make GameEntropy belong in the world struct
1:10:23handmade_world.h: Make GameEntropy belong in the world struct
1:15:28handmade_world.h: Consider specifying rooms as entities
1:15:28handmade_world.h: Consider specifying rooms as entities
1:15:28handmade_world.h: Consider specifying rooms as entities
1:18:23handmade_entity.h and handmade_world_mode.cpp: Add EntityType_Room to the entity_type struct and change AddStandardRoom() to create rooms as entities
1:18:23handmade_entity.h and handmade_world_mode.cpp: Add EntityType_Room to the entity_type struct and change AddStandardRoom() to create rooms as entities
1:18:23handmade_entity.h and handmade_world_mode.cpp: Add EntityType_Room to the entity_type struct and change AddStandardRoom() to create rooms as entities
1:25:39handmade_entity.cpp: Re-enable UpdateAndRenderEntities() to do volume rendering debug visualisation
1:25:39handmade_entity.cpp: Re-enable UpdateAndRenderEntities() to do volume rendering debug visualisation
1:25:39handmade_entity.cpp: Re-enable UpdateAndRenderEntities() to do volume rendering debug visualisation
1:29:08handmade_render_group.cpp: Disable entity rendering and run the game to see the volume bounds more clearly
1:29:08handmade_render_group.cpp: Disable entity rendering and run the game to see the volume bounds more clearly
1:29:08handmade_render_group.cpp: Disable entity rendering and run the game to see the volume bounds more clearly
1:32:08handmade_particles.cpp: Re-enable UpdateAndRenderFire() to do the full particle effect
1:32:08handmade_particles.cpp: Re-enable UpdateAndRenderFire() to do the full particle effect
1:32:08handmade_particles.cpp: Re-enable UpdateAndRenderFire() to do the full particle effect
1:32:39handmade_world_mode.cpp: Enable AddStandardRoom() to make the added rooms encompass the shape that the room actually is
1:32:39handmade_world_mode.cpp: Enable AddStandardRoom() to make the added rooms encompass the shape that the room actually is
1:32:39handmade_world_mode.cpp: Enable AddStandardRoom() to make the added rooms encompass the shape that the room actually is
1:33:27handmade_entity.h: Remove the entity_type struct
1:33:27handmade_entity.h: Remove the entity_type struct
1:33:27handmade_entity.h: Remove the entity_type struct
1:34:13handmade_entity.cpp and handmade_world_mode.cpp: Disable rendering of traversables and addition of trees
1:34:13handmade_entity.cpp and handmade_world_mode.cpp: Disable rendering of traversables and addition of trees
1:34:13handmade_entity.cpp and handmade_world_mode.cpp: Disable rendering of traversables and addition of trees
1:36:04Run the game to see the bounding box of the room, and consider how to make rooms encompass their contained entities
1:36:04Run the game to see the bounding box of the room, and consider how to make rooms encompass their contained entities
1:36:04Run the game to see the bounding box of the room, and consider how to make rooms encompass their contained entities
1:38:14handmade_brain.h: Consider adding Type_brain_room to the brain_type struct
1:38:14handmade_brain.h: Consider adding Type_brain_room to the brain_type struct
1:38:14handmade_brain.h: Consider adding Type_brain_room to the brain_type struct
1:44:41handmade_brain.h: Add Type_brain_room to the brain_type struct
1:44:41handmade_brain.h: Add Type_brain_room to the brain_type struct
1:44:41handmade_brain.h: Add Type_brain_room to the brain_type struct
1:46:32handmade_world_mode.cpp and handmade_brain.h: Make AddStandardRoom() give the room a brain, and introduce SpecialBrain() and SpecialBrainSlot()
1:46:32handmade_world_mode.cpp and handmade_brain.h: Make AddStandardRoom() give the room a brain, and introduce SpecialBrain() and SpecialBrainSlot()
1:46:32handmade_world_mode.cpp and handmade_brain.h: Make AddStandardRoom() give the room a brain, and introduce SpecialBrain() and SpecialBrainSlot()
1:49:40Run the game to find that the brain system isn't broken
1:49:40Run the game to find that the brain system isn't broken
1:49:40Run the game to find that the brain system isn't broken
1:49:54handmade_sim_region.cpp: Enable UpdateCameraForEntityMovement() to determine which, if any, room we are in and move the camera accordingly
1:49:54handmade_sim_region.cpp: Enable UpdateCameraForEntityMovement() to determine which, if any, room we are in and move the camera accordingly
1:49:54handmade_sim_region.cpp: Enable UpdateCameraForEntityMovement() to determine which, if any, room we are in and move the camera accordingly
2:00:07Run the game to find that the camera fails to follow the hero
2:00:07Run the game to find that the camera fails to follow the hero
2:00:07Run the game to find that the camera fails to follow the hero
2:00:59Q&A
🗩
2:00:59Q&A
🗩
2:00:59Q&A
🗩
2:01:37godling72 1) Do you ever work on large (multimillion LOC) codebases like Chrome, GCC, Unreal, etc? The full build dev process you've been using works for small projects, but how do you scale?
🗪
2:01:37godling72 1) Do you ever work on large (multimillion LOC) codebases like Chrome, GCC, Unreal, etc? The full build dev process you've been using works for small projects, but how do you scale?
🗪
2:01:37godling72 1) Do you ever work on large (multimillion LOC) codebases like Chrome, GCC, Unreal, etc? The full build dev process you've been using works for small projects, but how do you scale?
🗪
2:05:22godling72 2) Why is past video archiving disabled?
🗪
2:05:22godling72 2) Why is past video archiving disabled?
🗪
2:05:22godling72 2) Why is past video archiving disabled?
🗪
2:06:13godling72 3) Are you in a closet? The back wall looks really close
🗪
2:06:13godling72 3) Are you in a closet? The back wall looks really close
🗪
2:06:13godling72 3) Are you in a closet? The back wall looks really close
🗪
2:06:19sevesos2 I don't know if unrelated questions are allowed, but how do you stay so focused on your programming and are so efficient?
🗪
2:06:19sevesos2 I don't know if unrelated questions are allowed, but how do you stay so focused on your programming and are so efficient?
🗪
2:06:19sevesos2 I don't know if unrelated questions are allowed, but how do you stay so focused on your programming and are so efficient?
🗪
2:09:21mtsmox I think the speedup is due to wrong offsets of the simulation regions for the multithreaded tasks: you used tile size for your calculation, not chunk / room size
🗪
2:09:21mtsmox I think the speedup is due to wrong offsets of the simulation regions for the multithreaded tasks: you used tile size for your calculation, not chunk / room size
🗪
2:09:21mtsmox I think the speedup is due to wrong offsets of the simulation regions for the multithreaded tasks: you used tile size for your calculation, not chunk / room size
🗪
2:09:47iantjac Now that you intend to use 3D, will the code support software rendering?
🗪
2:09:47iantjac Now that you intend to use 3D, will the code support software rendering?
🗪
2:09:47iantjac Now that you intend to use 3D, will the code support software rendering?
🗪
2:10:03dsjimenez Is the career advice episode uploaded anywhere? I'm having trouble finding it
🗪
2:10:03dsjimenez Is the career advice episode uploaded anywhere? I'm having trouble finding it
🗪
2:10:03dsjimenez Is the career advice episode uploaded anywhere? I'm having trouble finding it
🗪
2:10:25mtsmox You said you wanted to remove the notion of rooms / layers from the drawing routine, but don't you still need it for fading in the room above you?
🗪
2:10:25mtsmox You said you wanted to remove the notion of rooms / layers from the drawing routine, but don't you still need it for fading in the room above you?
🗪
2:10:25mtsmox You said you wanted to remove the notion of rooms / layers from the drawing routine, but don't you still need it for fading in the room above you?
🗪
2:11:28a_pulsing_mage You said that 20 seconds to build is a reasonable amount of time? It's huge! 10 seconds is too much
🗪
2:11:28a_pulsing_mage You said that 20 seconds to build is a reasonable amount of time? It's huge! 10 seconds is too much
🗪
2:11:28a_pulsing_mage You said that 20 seconds to build is a reasonable amount of time? It's huge! 10 seconds is too much
🗪
2:13:09gene_victor Off-topic: Will HandmadeCon 2016 VOD be on YouTube soon?
🗪
2:13:09gene_victor Off-topic: Will HandmadeCon 2016 VOD be on YouTube soon?
🗪
2:13:09gene_victor Off-topic: Will HandmadeCon 2016 VOD be on YouTube soon?
🗪
2:13:28godling72 How long did The Witness take to build?
🗪
2:13:28godling72 How long did The Witness take to build?
🗪
2:13:28godling72 How long did The Witness take to build?
🗪
2:15:15popcorn0x90 I would think it would take about 5-10 mins
🗪
2:15:15popcorn0x90 I would think it would take about 5-10 mins
🗪
2:15:15popcorn0x90 I would think it would take about 5-10 mins
🗪
2:15:49Wrap it up
🗩
2:15:49Wrap it up
🗩
2:15:49Wrap it up
🗩