Handmade Hero»Episode Guide
Making an Orbiting Debug Camera
?
?

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:08Recap and set the stage for the day
0:08Recap and set the stage for the day
0:08Recap and set the stage for the day
0:47"It's always very bad to forget your water bottle"α
0:47"It's always very bad to forget your water bottle"α
0:47"It's always very bad to forget your water bottle"α
2:21Run the game to see the current camera, and consider unifying the camera and clip rect operations
2:21Run the game to see the current camera, and consider unifying the camera and clip rect operations
2:21Run the game to see the current camera, and consider unifying the camera and clip rect operations
4:43handmade_render_group.cpp: Put the PushClipRect() functions together
4:43handmade_render_group.cpp: Put the PushClipRect() functions together
4:43handmade_render_group.cpp: Put the PushClipRect() functions together
6:27Consider the cleanliness of the 3D pipeline
6:27Consider the cleanliness of the 3D pipeline
6:27Consider the cleanliness of the 3D pipeline
10:32handmade_entity.cpp: Prevent UpdateAndRenderEntites() from taking DrawBuffer and make it set the AlphaFloorClipRect with PushRenderTarget()
10:32handmade_entity.cpp: Prevent UpdateAndRenderEntites() from taking DrawBuffer and make it set the AlphaFloorClipRect with PushRenderTarget()
10:32handmade_entity.cpp: Prevent UpdateAndRenderEntites() from taking DrawBuffer and make it set the AlphaFloorClipRect with PushRenderTarget()
12:22handmade_render_group.cpp: Introduce PushRenderTarget()
12:22handmade_render_group.cpp: Introduce PushRenderTarget()
12:22handmade_render_group.cpp: Introduce PushRenderTarget()
13:03handmade_render_group.cpp: Prevent PushClipRect() from taking RenderTargetIndex and rename the main PushClipRect() to PushSetup()
13:03handmade_render_group.cpp: Prevent PushClipRect() from taking RenderTargetIndex and rename the main PushClipRect() to PushSetup()
13:03handmade_render_group.cpp: Prevent PushClipRect() from taking RenderTargetIndex and rename the main PushClipRect() to PushSetup()
15:15handmade_render_group.h: Change the render_group struct to store an m4x4 LastProj and LastRenderTarget
15:15handmade_render_group.h: Change the render_group struct to store an m4x4 LastProj and LastRenderTarget
15:15handmade_render_group.h: Change the render_group struct to store an m4x4 LastProj and LastRenderTarget
17:17handmade_render_group.cpp: Make PushSetup() set the render_group values, and implement PushRenderTarget()
17:17handmade_render_group.cpp: Make PushSetup() set the render_group values, and implement PushRenderTarget()
17:17handmade_render_group.cpp: Make PushSetup() set the render_group values, and implement PushRenderTarget()
19:54handmade_render_group.cpp: Make SetCameraTransform() take the m4x4 CameraTransform and conditionally call Orthographic() and Projection()
19:54handmade_render_group.cpp: Make SetCameraTransform() take the m4x4 CameraTransform and conditionally call Orthographic() and Projection()
19:54handmade_render_group.cpp: Make SetCameraTransform() take the m4x4 CameraTransform and conditionally call Orthographic() and Projection()
23:47handmade_render_group.cpp: Simplify GetRenderEntityBasisP()
23:47handmade_render_group.cpp: Simplify GetRenderEntityBasisP()
23:47handmade_render_group.cpp: Simplify GetRenderEntityBasisP()
26:06handmade_render_group.cpp: Consider the need to invert the projection matrix in Unproject(), and clean up compile errors
26:06handmade_render_group.cpp: Consider the need to invert the projection matrix in Unproject(), and clean up compile errors
26:06handmade_render_group.cpp: Consider the need to invert the projection matrix in Unproject(), and clean up compile errors
29:31handmade_render_group.cpp: Remove Perspective() and Orthographic()
29:31handmade_render_group.cpp: Remove Perspective() and Orthographic()
29:31handmade_render_group.cpp: Remove Perspective() and Orthographic()
31:21handmade_entity.cpp: Simplify and prevent UpdateAndRenderEntities() from computing the Z for the fog
31:21handmade_entity.cpp: Simplify and prevent UpdateAndRenderEntities() from computing the Z for the fog
31:21handmade_entity.cpp: Simplify and prevent UpdateAndRenderEntities() from computing the Z for the fog
39:03handmade_render_group.cpp: Enable UpdateAndRenderWorld() to perform perspective projections using SetCameraTransform()
39:03handmade_render_group.cpp: Enable UpdateAndRenderWorld() to perform perspective projections using SetCameraTransform()
39:03handmade_render_group.cpp: Enable UpdateAndRenderWorld() to perform perspective projections using SetCameraTransform()
42:31handmade_math.h: Implement PerspectiveProjection() and OrthographicProjection()
42:31handmade_math.h: Implement PerspectiveProjection() and OrthographicProjection()
42:31handmade_math.h: Implement PerspectiveProjection() and OrthographicProjection()
44:38Step into UpdateAndRenderWorld() and inspect the camera-related values
44:38Step into UpdateAndRenderWorld() and inspect the camera-related values
44:38Step into UpdateAndRenderWorld() and inspect the camera-related values
48:20Fantastic auto-updateβ
48:20Fantastic auto-updateβ
48:20Fantastic auto-updateβ
49:18Continue stepping through UpdateAndRenderEntities()
49:18Continue stepping through UpdateAndRenderEntities()
49:18Continue stepping through UpdateAndRenderEntities()
55:49Step through OpenGLRenderCommands()
55:49Step through OpenGLRenderCommands()
55:49Step through OpenGLRenderCommands()
56:43handmade_opengl.cpp: Prevent OpenGLRenderCommands() from setting a cliprect for a render_entry_cliprect
56:43handmade_opengl.cpp: Prevent OpenGLRenderCommands() from setting a cliprect for a render_entry_cliprect
56:43handmade_opengl.cpp: Prevent OpenGLRenderCommands() from setting a cliprect for a render_entry_cliprect
59:03Continue stepping through OpenGLRenderCommands()
59:03Continue stepping through OpenGLRenderCommands()
59:03Continue stepping through OpenGLRenderCommands()
1:00:54Investigate why the W is being set to a negative value
1:00:54Investigate why the W is being set to a negative value
1:00:54Investigate why the W is being set to a negative value
1:04:27Continue stepping through OpenGLRenderCommands() and inspect the XAxis and YAxis
1:04:27Continue stepping through OpenGLRenderCommands() and inspect the XAxis and YAxis
1:04:27Continue stepping through OpenGLRenderCommands() and inspect the XAxis and YAxis
1:07:05handmade_math.h: PerspectiveProjection() near and far clip plane
1:07:05handmade_math.h: PerspectiveProjection() near and far clip plane
1:07:05handmade_math.h: PerspectiveProjection() near and far clip plane
1:09:30Research how OpenGL wants the perspective projection matrix to be set up1
1:09:30Research how OpenGL wants the perspective projection matrix to be set up1
1:09:30Research how OpenGL wants the perspective projection matrix to be set up1
1:18:31handmade_math.h: Make PerspectiveProjection() set up the matrix as per the diagram
1:18:31handmade_math.h: Make PerspectiveProjection() set up the matrix as per the diagram
1:18:31handmade_math.h: Make PerspectiveProjection() set up the matrix as per the diagram
1:22:04handmade_render_group.cpp: Prevent GetRenderEntityBasisP() from negating the Z coordinate
1:22:04handmade_render_group.cpp: Prevent GetRenderEntityBasisP() from negating the Z coordinate
1:22:04handmade_render_group.cpp: Prevent GetRenderEntityBasisP() from negating the Z coordinate
1:23:50Blackboard: Z Inversion
1:23:50Blackboard: Z Inversion
1:23:50Blackboard: Z Inversion
1:26:42Run the game to see that we're getting closer to reasonable
1:26:42Run the game to see that we're getting closer to reasonable
1:26:42Run the game to see that we're getting closer to reasonable
1:30:45Blackboard: Conceptualising rotation around an axis
1:30:45Blackboard: Conceptualising rotation around an axis
1:30:45Blackboard: Conceptualising rotation around an axis
1:32:08handmade_world_mode.cpp: Enable UpdateAndRenderWorld() to rotate the camera around X
1:32:08handmade_world_mode.cpp: Enable UpdateAndRenderWorld() to rotate the camera around X
1:32:08handmade_world_mode.cpp: Enable UpdateAndRenderWorld() to rotate the camera around X
1:33:47Run the game to see the tilted world
1:33:47Run the game to see the tilted world
1:33:47Run the game to see the tilted world
1:34:22Blackboard: Tilting the camera
1:34:22Blackboard: Tilting the camera
1:34:22Blackboard: Tilting the camera
1:35:03handmade_world_mode.cpp: Negate that CameraD computation, with a few words on understanding what's happening
1:35:03handmade_world_mode.cpp: Negate that CameraD computation, with a few words on understanding what's happening
1:35:03handmade_world_mode.cpp: Negate that CameraD computation, with a few words on understanding what's happening
1:36:46handmade_world_mode.cpp: Double-check what this transform is doing, and add a Z rotation
1:36:46handmade_world_mode.cpp: Double-check what this transform is doing, and add a Z rotation
1:36:46handmade_world_mode.cpp: Double-check what this transform is doing, and add a Z rotation
1:37:54Run the game and consider increasing the focal length
1:37:54Run the game and consider increasing the focal length
1:37:54Run the game and consider increasing the focal length
1:38:32Blackboard: Moving the camera to maintain focus on the same point
1:38:32Blackboard: Moving the camera to maintain focus on the same point
1:38:32Blackboard: Moving the camera to maintain focus on the same point
1:40:34handmade_world_mode.cpp: Make UpdateAndRenderWorld() factor in that counter-rotation
1:40:34handmade_world_mode.cpp: Make UpdateAndRenderWorld() factor in that counter-rotation
1:40:34handmade_world_mode.cpp: Make UpdateAndRenderWorld() factor in that counter-rotation
1:41:37Blackboard: Camera counter-rotation
1:41:37Blackboard: Camera counter-rotation
1:41:37Blackboard: Camera counter-rotation
1:43:36Step into UpdateAndRenderWorld() and inspect what it's doing
1:43:36Step into UpdateAndRenderWorld() and inspect what it's doing
1:43:36Step into UpdateAndRenderWorld() and inspect what it's doing
1:44:40handmade_world_mode.cpp: Enable UpdateAndRenderWorld() to set the rotations from the mouse position
1:44:40handmade_world_mode.cpp: Enable UpdateAndRenderWorld() to set the rotations from the mouse position
1:44:40handmade_world_mode.cpp: Enable UpdateAndRenderWorld() to set the rotations from the mouse position
1:49:26Run the game to try moving the camera and consider introducing a moveable debug camera
1:49:26Run the game to try moving the camera and consider introducing a moveable debug camera
1:49:26Run the game to try moving the camera and consider introducing a moveable debug camera
1:52:51handmade_render_group.cpp: Add LastUserProj to the render_group struct
1:52:51handmade_render_group.cpp: Add LastUserProj to the render_group struct
1:52:51handmade_render_group.cpp: Add LastUserProj to the render_group struct
1:55:38handmade_world_mode.cpp: Enable UpdateAndRenderWorld() to zoom the camera
1:55:38handmade_world_mode.cpp: Enable UpdateAndRenderWorld() to zoom the camera
1:55:38handmade_world_mode.cpp: Enable UpdateAndRenderWorld() to zoom the camera
1:57:16Run the game and try zooming
1:57:16Run the game and try zooming
1:57:16Run the game and try zooming
1:57:52A few words on zooming at a speed proportional to the distance to the target with this poor man's differential equation
1:57:52A few words on zooming at a speed proportional to the distance to the target with this poor man's differential equation
1:57:52A few words on zooming at a speed proportional to the distance to the target with this poor man's differential equation
2:01:36Q&A
🗩
2:01:36Q&A
🗩
2:01:36Q&A
🗩
2:02:07aceflameseer Sorry for being a dummy: In the camera transform in 3D games (as far as I've been watching tutorials), there's something called an "Up" vector. What's the purpose of it and do we have it in Handmade Hero? Since it's a 2D game I guess it's different. Your explanations have been wonderful and I would love it if you could explain it. And also thanks for doing EU friendly streams Kappa
🗪
2:02:07aceflameseer Sorry for being a dummy: In the camera transform in 3D games (as far as I've been watching tutorials), there's something called an "Up" vector. What's the purpose of it and do we have it in Handmade Hero? Since it's a 2D game I guess it's different. Your explanations have been wonderful and I would love it if you could explain it. And also thanks for doing EU friendly streams Kappa
🗪
2:02:07aceflameseer Sorry for being a dummy: In the camera transform in 3D games (as far as I've been watching tutorials), there's something called an "Up" vector. What's the purpose of it and do we have it in Handmade Hero? Since it's a 2D game I guess it's different. Your explanations have been wonderful and I would love it if you could explain it. And also thanks for doing EU friendly streams Kappa
🗪
2:03:44Blackboard: Object- vs Camera Transform
2:03:44Blackboard: Object- vs Camera Transform
2:03:44Blackboard: Object- vs Camera Transform
2:06:58Blackboard: Up Vector
2:06:58Blackboard: Up Vector
2:06:58Blackboard: Up Vector
2:09:37Blackboard: Constructing a camera transform without already having the camera object itself
2:09:37Blackboard: Constructing a camera transform without already having the camera object itself
2:09:37Blackboard: Constructing a camera transform without already having the camera object itself
2:18:16Blackboard: "Sense of Up" vector
2:18:16Blackboard: "Sense of Up" vector
2:18:16Blackboard: "Sense of Up" vector
2:23:20Blackboard: Look-at matrix / camera equations
2:23:20Blackboard: Look-at matrix / camera equations
2:23:20Blackboard: Look-at matrix / camera equations
2:24:36aceflameseer Wow, that was amazing, thanks a lot!
🗪
2:24:36aceflameseer Wow, that was amazing, thanks a lot!
🗪
2:24:36aceflameseer Wow, that was amazing, thanks a lot!
🗪
2:24:47pileopoop Would it be weird to change the focal length as the pitch changes or should the focal length always stay constant?
🗪
2:24:47pileopoop Would it be weird to change the focal length as the pitch changes or should the focal length always stay constant?
🗪
2:24:47pileopoop Would it be weird to change the focal length as the pitch changes or should the focal length always stay constant?
🗪
2:25:47sahfortv Minor point, you called your variables pitch and orbit: Should probably be pitch and yaw
🗪
2:25:47sahfortv Minor point, you called your variables pitch and orbit: Should probably be pitch and yaw
🗪
2:25:47sahfortv Minor point, you called your variables pitch and orbit: Should probably be pitch and yaw
🗪
2:26:22Wrap it up
🗩
2:26:22Wrap it up
🗩
2:26:22Wrap it up
🗩