cinera_handmade.network/cmuratori/hero/code/code293.hmml

34 lines
2.6 KiB
Plaintext
Raw Normal View History

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Moving Familiars" vod_platform=youtube id=DIssBI1JBz8 annotator=Miblo]
[2:02][Recap and set the stage for the day]
[5:22][handmade_entity.h: Add MovementMode_Floating to entity_movement_mode]
[10:00][Consider where the delineation between MovementMode and Brain should be]
[13:40][handmade_brain.cpp: Enable ExecuteBrain to make the Familiar occupy traversables and do transactional movement]
[21:50][Debugger: Step into Type_brain_familiar in ExecuteBrain and investigate why the Familiar isn't moving]
[24:40][handmade_sim_region.cpp: Make GetClosestTraversable set Entity.Index]
[24:59][Run the game and see the Familiar move]
[26:27][Blackboard: Proportional Derivative (and Integral) Controller]
[30:31][handmade_brain.cpp: Make ExecuteBrain set a spring on the Familiar]
[31:15][Run the game and see the spring in action]
[35:11][handmade_brain.cpp: Introduce the notion of a TargetTraversable which the Familiar moves towards]
[37:09][handmade_sim_region.cpp: Introduce IsOccupied]
[38:50][Run the game and see that the Familiar follows us]
[39:07][handmade_world_mode.cpp: Make AddStandardRoom randomly offset the grid points]
[41:31][Run the game and see the irregular grid, with everyone able to function on it]
[44:20][handmade_sim_region.cpp: Introduce GetClosestTraversableAlongRay]
[46:39][handmade_brain.cpp: Make ExecuteBrain call GetClosestTraversableAlongRay for the Familiar]
[49:04][Run the game and see that the Familiar is more stable]
[50:20][handmade_sim_region.cpp: Add a TIMED_FUNCTION for GetClosestTraversable and GetClosestTraversableAlongRay]
[51:06][Run the game and view the profiler]
[52:43][build.bat: Temporarily switch to -O2 and then run the game and see how that affects our performance]
[56:11][handmade_sim_region.cpp: Introduce GetClosestEntityWithBrain and closest_entity]
[1:00:17][handmade_brain.cpp: Make ExecuteBrain call GetClosestEntityWithBrain for the Familiar]
[1:01:44][Run the game and see that it works beautifully]
[1:01:59][Q&A][:speech]
[1:02:44][@garryjohanson][Any thoughts on multithreading the entity system?]
[1:03:01][@insobot][++ and += to reduce memory useage...]
[1:06:07][@evraire][How many more times will you get hit with the texture upload issue before you actually fix it?]
[1:06:42][@roam00010011][Do you have a max entity count at the sim region on the debug display?]
[1:09:26][@serge_rgb][(Out of topic) Milton seems to be treating Wacom input as mouse input. Restart Milton? Will look into it]
[1:10:40][Close things down][:speech]
[/video]