Handmade Hero»Episode Guide
Using the Spatial Partition
?
?

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:28Assets: handmade_hero_test_assets_002.zip is released
0:28Assets: handmade_hero_test_assets_002.zip is released
0:28Assets: handmade_hero_test_assets_002.zip is released
2:01Recap
2:01Recap
2:01Recap
3:28handmade.cpp: Pull in entities by chunk, rather than tile
3:28handmade.cpp: Pull in entities by chunk, rather than tile
3:28handmade.cpp: Pull in entities by chunk, rather than tile
5:12Blackboard: Pulling entities into the working set
5:12Blackboard: Pulling entities into the working set
5:12Blackboard: Pulling entities into the working set
8:46handmade.cpp: Figure out the CameraBounds situation
8:46handmade.cpp: Figure out the CameraBounds situation
8:46handmade.cpp: Figure out the CameraBounds situation
15:25Make a version of MakeEntityHighFrequency to be called at the lower level
15:25Make a version of MakeEntityHighFrequency to be called at the lower level
15:25Make a version of MakeEntityHighFrequency to be called at the lower level
16:21Introduce GetCameraSpaceP
16:21Introduce GetCameraSpaceP
16:21Introduce GetCameraSpaceP
17:41Continue writing these versions of MakeEntityHighFrequency
17:41Continue writing these versions of MakeEntityHighFrequency
17:41Continue writing these versions of MakeEntityHighFrequency
20:18Use these functions in SetCamera
20:18Use these functions in SetCamera
20:18Use these functions in SetCamera
21:41handmade_math.h: Introduce GetMinCorner, GetMaxCorner and GetCenter
21:41handmade_math.h: Introduce GetMinCorner, GetMaxCorner and GetCenter
21:41handmade_math.h: Introduce GetMinCorner, GetMaxCorner and GetCenter
22:52Debugger: Step through and see what's happening
22:52Debugger: Step through and see what's happening
22:52Debugger: Step through and see what's happening
24:14handmade.cpp: Fix the Assertion in MakeEntityHighFrequency
24:14handmade.cpp: Fix the Assertion in MakeEntityHighFrequency
24:14handmade.cpp: Fix the Assertion in MakeEntityHighFrequency
24:34Look at AddWall
24:34Look at AddWall
24:34Look at AddWall
25:51handmade_world.cpp: Look at Subtract and ChunkPositionFromTilePosition
25:51handmade_world.cpp: Look at Subtract and ChunkPositionFromTilePosition
25:51handmade_world.cpp: Look at Subtract and ChunkPositionFromTilePosition
26:44Debugger: Step in to AddWall
26:44Debugger: Step in to AddWall
26:44Debugger: Step in to AddWall
28:56handmade.cpp: Call ChangeEntityLocation in AddLowEntity and make it pass world_position P
28:56handmade.cpp: Call ChangeEntityLocation in AddLowEntity and make it pass world_position P
28:56handmade.cpp: Call ChangeEntityLocation in AddLowEntity and make it pass world_position P
30:29Pass the world_position P to AddPlayer and finish implementing the spatial partition
30:29Pass the world_position P to AddPlayer and finish implementing the spatial partition
30:29Pass the world_position P to AddPlayer and finish implementing the spatial partition
34:53Run it and see what's happening
34:53Run it and see what's happening
34:53Run it and see what's happening
35:59Debugger: Step into AddPlayer
35:59Debugger: Step into AddPlayer
35:59Debugger: Step into AddPlayer
36:47handmade.cpp: Tweak AddLowEntity
36:47handmade.cpp: Tweak AddLowEntity
36:47handmade.cpp: Tweak AddLowEntity
38:02Debugger: Continue debugging AddPlayer
38:02Debugger: Continue debugging AddPlayer
38:02Debugger: Continue debugging AddPlayer
38:37handmade_world.cpp: Tweak ChangeEntityLocation
38:37handmade_world.cpp: Tweak ChangeEntityLocation
38:37handmade_world.cpp: Tweak ChangeEntityLocation
39:40Debugger: Step through the loop in OffsetAndCheckFrequencyByArea
39:40Debugger: Step through the loop in OffsetAndCheckFrequencyByArea
39:40Debugger: Step through the loop in OffsetAndCheckFrequencyByArea
41:25handmade.cpp: Add an assertion in OffsetAndCheckFrequencyByArea
41:25handmade.cpp: Add an assertion in OffsetAndCheckFrequencyByArea
41:25handmade.cpp: Add an assertion in OffsetAndCheckFrequencyByArea
42:37Debugger: Step through and hit this assertion
42:37Debugger: Step through and hit this assertion
42:37Debugger: Step through and hit this assertion
43:34handmade.cpp: Introduce ValidateEntityPairs
43:34handmade.cpp: Introduce ValidateEntityPairs
43:34handmade.cpp: Introduce ValidateEntityPairs
45:56Debugger: The MakeEntityHighFrequency routine in SetCamera is the problem
45:56Debugger: The MakeEntityHighFrequency routine in SetCamera is the problem
45:56Debugger: The MakeEntityHighFrequency routine in SetCamera is the problem
47:04handmade.cpp: Pass the correct Index to this routine
47:04handmade.cpp: Pass the correct Index to this routine
47:04handmade.cpp: Pass the correct Index to this routine
48:05Run the game and note that the spatial partition is nominally working
48:05Run the game and note that the spatial partition is nominally working
48:05Run the game and note that the spatial partition is nominally working
48:48handmade.h and handmade.cpp: Test the new assets
48:48handmade.h and handmade.cpp: Test the new assets
48:48handmade.h and handmade.cpp: Test the new assets
50:40Run the game and find that the new trees are drawn at the wrong locations
50:40Run the game and find that the new trees are drawn at the wrong locations
50:40Run the game and find that the new trees are drawn at the wrong locations
51:04handmade.cpp: Stop drawing the textured background
51:04handmade.cpp: Stop drawing the textured background
51:04handmade.cpp: Stop drawing the textured background
52:51Assets: Find the base point for the tree in GIMP
52:51Assets: Find the base point for the tree in GIMP
52:51Assets: Find the base point for the tree in GIMP
53:37handmade.cpp: Set the tree's alignment and do DrawRectangle as well
53:37handmade.cpp: Set the tree's alignment and do DrawRectangle as well
53:37handmade.cpp: Set the tree's alignment and do DrawRectangle as well
54:32Run the game and observe our new trees in their correct positions
54:32Run the game and observe our new trees in their correct positions
54:32Run the game and observe our new trees in their correct positions
57:44Q&A
🗩
57:44Q&A
🗩
57:44Q&A
🗩
58:52Q: For zooming out, could you somehow modify MetersToPixels to make things smaller as you zoom?
58:52Q: For zooming out, could you somehow modify MetersToPixels to make things smaller as you zoom?
58:52Q: For zooming out, could you somehow modify MetersToPixels to make things smaller as you zoom?
59:39Q: What is inline v2?
59:39Q: What is inline v2?
59:39Q: What is inline v2?
1:01:04Q: Why use Emacs versus Visual Studio's IDE?
1:01:04Q: Why use Emacs versus Visual Studio's IDE?
1:01:04Q: Why use Emacs versus Visual Studio's IDE?
1:02:36Q: Is Emacs better than Vim, or is it just preference?
1:02:36Q: Is Emacs better than Vim, or is it just preference?
1:02:36Q: Is Emacs better than Vim, or is it just preference?
1:03:43Q: Do you think that how fast code runs is the best metric for good code, or do you value simplicity or extensibility as well?
1:03:43Q: Do you think that how fast code runs is the best metric for good code, or do you value simplicity or extensibility as well?
1:03:43Q: Do you think that how fast code runs is the best metric for good code, or do you value simplicity or extensibility as well?
1:05:59Q: Why are you using Visual Studio here if you use Emacs?
1:05:59Q: Why are you using Visual Studio here if you use Emacs?
1:05:59Q: Why are you using Visual Studio here if you use Emacs?
1:06:34swagkitty69 Did you ever figure out a fix for Emacs whenever you try to create a new file and the patch changes?
🗪
1:06:34swagkitty69 Did you ever figure out a fix for Emacs whenever you try to create a new file and the patch changes?
🗪
1:06:34swagkitty69 Did you ever figure out a fix for Emacs whenever you try to create a new file and the patch changes?
🗪
1:07:03Q: What's guiding you to make steps towards completing the game, i.e. a list of requirements for the game?
1:07:03Q: What's guiding you to make steps towards completing the game, i.e. a list of requirements for the game?
1:07:03Q: What's guiding you to make steps towards completing the game, i.e. a list of requirements for the game?
1:08:54Q: Do you ever get annoyed with reading a high depth of nested for loops?
1:08:54Q: Do you ever get annoyed with reading a high depth of nested for loops?
1:08:54Q: Do you ever get annoyed with reading a high depth of nested for loops?
1:09:55Q: Was watching some ROM hacking earlier and watching the registers and memory update in real time was really cool. Do you think a debugger for C could work as well as that?
1:09:55Q: Was watching some ROM hacking earlier and watching the registers and memory update in real time was really cool. Do you think a debugger for C could work as well as that?
1:09:55Q: Was watching some ROM hacking earlier and watching the registers and memory update in real time was really cool. Do you think a debugger for C could work as well as that?
1:10:39Q: How much time do you spend outside the stream in thinking about the code and game design? If you coded eight hours a day, would you be able to code consistently with the same pace as during your stream?
1:10:39Q: How much time do you spend outside the stream in thinking about the code and game design? If you coded eight hours a day, would you be able to code consistently with the same pace as during your stream?
1:10:39Q: How much time do you spend outside the stream in thinking about the code and game design? If you coded eight hours a day, would you be able to code consistently with the same pace as during your stream?
1:11:38Q: Can you please put in a proper PRNG before you write world gen algorithms?
1:11:38Q: Can you please put in a proper PRNG before you write world gen algorithms?
1:11:38Q: Can you please put in a proper PRNG before you write world gen algorithms?
1:12:46Q: Do you ever feel the need to use recursive functions?
1:12:46Q: Do you ever feel the need to use recursive functions?
1:12:46Q: Do you ever feel the need to use recursive functions?
1:13:15Q: Do you build with build.exe in command prompt or batch file?
1:13:15Q: Do you build with build.exe in command prompt or batch file?
1:13:15Q: Do you build with build.exe in command prompt or batch file?
1:14:11Q: When you say "renderer", what exactly does that mean? If the drawing you have now isn't rendering, then at what point do we go from drawing to rendering?
1:14:11Q: When you say "renderer", what exactly does that mean? If the drawing you have now isn't rendering, then at what point do we go from drawing to rendering?
1:14:11Q: When you say "renderer", what exactly does that mean? If the drawing you have now isn't rendering, then at what point do we go from drawing to rendering?
1:15:55Q: Have any of your friends voiced disagreement with design decisions you've made in this engine?
1:15:55Q: Have any of your friends voiced disagreement with design decisions you've made in this engine?
1:15:55Q: Have any of your friends voiced disagreement with design decisions you've made in this engine?
1:16:22Q: How do you distinguish between what a lot of people might called "premature optimisation" versus ensuring a good design that allows for high performance? The difference there seems really subtle. I feel that designing for high performance is simply organising the code and writing in such a way that does not unnecessarily slow down the code and prevent future optimisations, while premature optimisation is simply optimising something because you think something will be slow without evidence
1:16:22Q: How do you distinguish between what a lot of people might called "premature optimisation" versus ensuring a good design that allows for high performance? The difference there seems really subtle. I feel that designing for high performance is simply organising the code and writing in such a way that does not unnecessarily slow down the code and prevent future optimisations, while premature optimisation is simply optimising something because you think something will be slow without evidence
1:16:22Q: How do you distinguish between what a lot of people might called "premature optimisation" versus ensuring a good design that allows for high performance? The difference there seems really subtle. I feel that designing for high performance is simply organising the code and writing in such a way that does not unnecessarily slow down the code and prevent future optimisations, while premature optimisation is simply optimising something because you think something will be slow without evidence
1:19:52Q: 4096 random numbers
1:19:52Q: 4096 random numbers
1:19:52Q: 4096 random numbers
1:20:03Q: Will we have positionless entities? Would something like the current price of Almond Milk futures be an entity?
1:20:03Q: Will we have positionless entities? Would something like the current price of Almond Milk futures be an entity?
1:20:03Q: Will we have positionless entities? Would something like the current price of Almond Milk futures be an entity?
1:20:22Q: Will you be making a level / tile map editor for this game, for easier level creation?
1:20:22Q: Will you be making a level / tile map editor for this game, for easier level creation?
1:20:22Q: Will you be making a level / tile map editor for this game, for easier level creation?
1:20:40Q: What is your algorithm for a collision with three and more entities?
1:20:40Q: What is your algorithm for a collision with three and more entities?
1:20:40Q: What is your algorithm for a collision with three and more entities?
1:21:21Blackboard: Moving in 1/30th sec
1:21:21Blackboard: Moving in 1/30th sec
1:21:21Blackboard: Moving in 1/30th sec
1:23:15Q: Do you plan to use some form of logging for debugging purposes?
1:23:15Q: Do you plan to use some form of logging for debugging purposes?
1:23:15Q: Do you plan to use some form of logging for debugging purposes?
1:23:48Q: When you remove a LowEntity from the Chunk list, you swap another into its place. Won't that mess with references?
1:23:48Q: When you remove a LowEntity from the Chunk list, you swap another into its place. Won't that mess with references?
1:23:48Q: When you remove a LowEntity from the Chunk list, you swap another into its place. Won't that mess with references?
1:24:15happy_vertex Even for slow frequency entities?
🗪
1:24:15happy_vertex Even for slow frequency entities?
🗪
1:24:15happy_vertex Even for slow frequency entities?
🗪
1:24:59We have come to the end of the questions
🗩
1:24:59We have come to the end of the questions
🗩
1:24:59We have come to the end of the questions
🗩