Handmade Hero»Episode Guide
Simulation Regions
?
?

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:25Recap on getting initial usage code down to avoid bad design
0:25Recap on getting initial usage code down to avoid bad design
0:25Recap on getting initial usage code down to avoid bad design
2:03Design constraints for high/low frequency entities
2:03Design constraints for high/low frequency entities
2:03Design constraints for high/low frequency entities
4:46Float precision problem for large worlds
4:46Float precision problem for large worlds
4:46Float precision problem for large worlds
8:21Problem of scaling to large entity counts
8:21Problem of scaling to large entity counts
8:21Problem of scaling to large entity counts
10:06Realizing the problem - wrong way to think about low frequency entities
10:06Realizing the problem - wrong way to think about low frequency entities
10:06Realizing the problem - wrong way to think about low frequency entities
11:18Realizing the solution - simulation regions
11:18Realizing the solution - simulation regions
11:18Realizing the solution - simulation regions
16:18Handling entities moving outside boundaries of simulation region
16:18Handling entities moving outside boundaries of simulation region
16:18Handling entities moving outside boundaries of simulation region
18:39Starting the code reorganization
18:39Starting the code reorganization
18:39Starting the code reorganization
19:33The sim_region struct
19:33The sim_region struct
19:33The sim_region struct
21:10How to alter SetCamera
21:10How to alter SetCamera
21:10How to alter SetCamera
21:56Ending simulation by mapping entities in a sim_region into low space
21:56Ending simulation by mapping entities in a sim_region into low space
21:56Ending simulation by mapping entities in a sim_region into low space
24:18Beginning simulation by mapping entities into a sim_region
24:18Beginning simulation by mapping entities into a sim_region
24:18Beginning simulation by mapping entities into a sim_region
26:12Simplifying entity structs
26:12Simplifying entity structs
26:12Simplifying entity structs
27:26More details on BeginSim
27:26More details on BeginSim
27:26More details on BeginSim
29:11Adding an entity to a sim_region
29:11Adding an entity to a sim_region
29:11Adding an entity to a sim_region
34:23Switching from camera space positions to simulation space positions
34:23Switching from camera space positions to simulation space positions
34:23Switching from camera space positions to simulation space positions
38:02Adjusting the entity structs
38:02Adjusting the entity structs
38:02Adjusting the entity structs
39:48Memory allocation for sim_regions
39:48Memory allocation for sim_regions
39:48Memory allocation for sim_regions
42:45Storing back to low entities in EndSim
42:45Storing back to low entities in EndSim
42:45Storing back to low entities in EndSim
45:45Deleting code that is no longer applicable
45:45Deleting code that is no longer applicable
45:45Deleting code that is no longer applicable
48:53Replacing SetCamera with getting a sim_region in the main loop
48:53Replacing SetCamera with getting a sim_region in the main loop
48:53Replacing SetCamera with getting a sim_region in the main loop
51:04Moving camera position update from main loop to EndSim
51:04Moving camera position update from main loop to EndSim
51:04Moving camera position update from main loop to EndSim
51:48Adjusting rendering for simulation regions
51:48Adjusting rendering for simulation regions
51:48Adjusting rendering for simulation regions
56:00Wrapping up for today - fixing compiler errors
56:00Wrapping up for today - fixing compiler errors
56:00Wrapping up for today - fixing compiler errors
59:10Q&A
🗩
59:10Q&A
🗩
59:10Q&A
🗩
59:46Recommendation for names - instead of stored entities you could have stasis_entity and stasis_region; for the high frequency, you would keep the sim_region and sim_entity.
59:46Recommendation for names - instead of stored entities you could have stasis_entity and stasis_region; for the high frequency, you would keep the sim_region and sim_entity.
59:46Recommendation for names - instead of stored entities you could have stasis_entity and stasis_region; for the high frequency, you would keep the sim_region and sim_entity.
1:00:29Since we know that an entity's speed is bounded, couldn't we calculate a sim_region with bounds such that no entity can move outside of it during the frame? That way anything that the entity could collide with would be pulled into the sim_region?
1:00:29Since we know that an entity's speed is bounded, couldn't we calculate a sim_region with bounds such that no entity can move outside of it during the frame? That way anything that the entity could collide with would be pulled into the sim_region?
1:00:29Since we know that an entity's speed is bounded, couldn't we calculate a sim_region with bounds such that no entity can move outside of it during the frame? That way anything that the entity could collide with would be pulled into the sim_region?
1:02:29How many TODOs do you have?
1:02:29How many TODOs do you have?
1:02:29How many TODOs do you have?
1:04:36How will you handle the disparity in update rate between offscreen and onscreen entities? Does it matter?
1:04:36How will you handle the disparity in update rate between offscreen and onscreen entities? Does it matter?
1:04:36How will you handle the disparity in update rate between offscreen and onscreen entities? Does it matter?
1:05:40Will the sim_region away from the player cause large timesteps from the normal?
1:05:40Will the sim_region away from the player cause large timesteps from the normal?
1:05:40Will the sim_region away from the player cause large timesteps from the normal?
1:06:22I missed whether this new system is based around discrete rooms or integer mapped coordinates. If it's based on rooms, would it be trivial to think in coords instead?
1:06:22I missed whether this new system is based around discrete rooms or integer mapped coordinates. If it's based on rooms, would it be trivial to think in coords instead?
1:06:22I missed whether this new system is based around discrete rooms or integer mapped coordinates. If it's based on rooms, would it be trivial to think in coords instead?
1:06:44What will happen if your sim_region and player location are at the same place? Will it bug out?
1:06:44What will happen if your sim_region and player location are at the same place? Will it bug out?
1:06:44What will happen if your sim_region and player location are at the same place? Will it bug out?
1:08:11Why is the low-high frequency system so important? Isn't creating basic gameplay rules and AI interactions in a small world more in-line with your philosophy of doing the simple thing first?
1:08:11Why is the low-high frequency system so important? Isn't creating basic gameplay rules and AI interactions in a small world more in-line with your philosophy of doing the simple thing first?
1:08:11Why is the low-high frequency system so important? Isn't creating basic gameplay rules and AI interactions in a small world more in-line with your philosophy of doing the simple thing first?
1:13:34How will we update low frequency regions given the sparse nature of the world?
1:13:34How will we update low frequency regions given the sparse nature of the world?
1:13:34How will we update low frequency regions given the sparse nature of the world?
1:14:04Is there a major advantage to using 'fors' instead of 'whiles'?
1:14:04Is there a major advantage to using 'fors' instead of 'whiles'?
1:14:04Is there a major advantage to using 'fors' instead of 'whiles'?
1:15:10What will the entities that are not visible on the screen be doing? I can't really think of examples of things that need to be updated if they're far from the player.
1:15:10What will the entities that are not visible on the screen be doing? I can't really think of examples of things that need to be updated if they're far from the player.
1:15:10What will the entities that are not visible on the screen be doing? I can't really think of examples of things that need to be updated if they're far from the player.
1:17:33How many low entities does it take to screw in a light bulb?
1:17:33How many low entities does it take to screw in a light bulb?
1:17:33How many low entities does it take to screw in a light bulb?
1:18:26For your sparse storage, why not store the (x,y,z) coords bit-shifted into an aligned integer to use it as a composite key into a dictionary or hash map?
1:18:26For your sparse storage, why not store the (x,y,z) coords bit-shifted into an aligned integer to use it as a composite key into a dictionary or hash map?
1:18:26For your sparse storage, why not store the (x,y,z) coords bit-shifted into an aligned integer to use it as a composite key into a dictionary or hash map?
1:20:01Do you approach design in a similar way to your architecture (i.e. exploration-based design, design sort of emerges itself organically, etc.)?
1:20:01Do you approach design in a similar way to your architecture (i.e. exploration-based design, design sort of emerges itself organically, etc.)?
1:20:01Do you approach design in a similar way to your architecture (i.e. exploration-based design, design sort of emerges itself organically, etc.)?
1:20:24Is multi-threading in the scope of topics for the project?
1:20:24Is multi-threading in the scope of topics for the project?
1:20:24Is multi-threading in the scope of topics for the project?
1:21:20If a far away room gets updated and the rooms around it are updated too, don't we have this recursive problem where the around rooms need their neighbor too?
1:21:20If a far away room gets updated and the rooms around it are updated too, don't we have this recursive problem where the around rooms need their neighbor too?
1:21:20If a far away room gets updated and the rooms around it are updated too, don't we have this recursive problem where the around rooms need their neighbor too?
1:22:29How much work would it take to turn the game you are making from a 2D world into a 3D world?
1:22:29How much work would it take to turn the game you are making from a 2D world into a 3D world?
1:22:29How much work would it take to turn the game you are making from a 2D world into a 3D world?
1:23:07To clarify my early design question, I just mean as far as your design decisions for Handmade Hero.
1:23:07To clarify my early design question, I just mean as far as your design decisions for Handmade Hero.
1:23:07To clarify my early design question, I just mean as far as your design decisions for Handmade Hero.