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

25 lines
3.1 KiB
Plaintext

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Starting to Decouple Entity Behavior" vod_platform=youtube id=rGwAhNAYCKg annotator=Miblo]
[1:05][Recap and set the stage for the day]
[6:28][handmade_entity.h: Consider how to eliminate Type from the entity struct]
[11:30][handmade_entity.h: Move things off the Type variable that need not be there]
[16:04][Run the game and see that we've lost nothing, besides the FloatyThingForNow]
[20:11][handmade_entity.h: Partition the entity struct to separate the meaningful from the exploratory]
[21:14][handmade_entity.h: Add an entity_reference *PairedEntities and a u32 PairedEntityCount in the meaningful area to provide some notion of pairing of entities]
[26:55][Blackboard: Norm, and Pythagoras' Theorem]
[32:31][handmade_world_mode.cpp: Write the usage code for pairing multiple entities]
[36:42][handmade_world_mode.cpp: Consider making PackEntityIntoChunk pair aware and PairedEntities dynamically resize, and how to track the entity_id]
[47:09][handmade_entity.h: Consider introducing enum entity_relationship to denote how an entity is paired]
[51:48][handmade_entity.h: Introduce ReferenceIsValid, entity_stored_reference and ReferencesAreEqual]
[56:41][handmade_world_mode.cpp: Make PackEntityReferenceArray correctly pack these variably-sized paired entities]
[1:03:39][handmade_world.cpp, handmade_sim_region.cpp and handmade_world_mode.cpp: Fix compile errors]
[1:07:57][Q&A][:speech]
[1:08:27][@andsz_][A fairly simple way to describe or understand the infinity norm is to draw the unit hyperspheres for each of those common norms. The 1-norm would be a diamond shape, 2-norm is the regular circle / hypersphere, 3-norm gets more squareish / hypercubish and so on. You'd quickly see that this series converges towards a square / hypercube]
[1:09:02][@filiadelski][Have you seen Scott Meyer's talk on CPU caches? He talks about how it's better to store data of the same type together in memory because they end up on the same cache line, which is good for performance. Is this something that you think about, or will cover in Handmade Hero?]
[1:11:22][@blah238][Could you use the entity pairing concept for a vehicle-occupant relationship, like an airship and its passenger(s)? And, if so, (how) would movement work on it?]
[1:11:44][@stevoid1990][I was just wondering why you don't have a subscriber button for those that enjoy your frequent broadcasts. From what I gather you were offered partnership but turned it down due to something in the contract. Can you tell me a little why you made that decision and what options do you have to donate?]
[1:15:10][@guitarm87][Is it not possible to subscribe to forum posts anymore now since the new stuff was made I don't get any posts to my mail]
[1:15:57][@omnitechnomancer][Subscribe doesn't make it ad-free anymore, as far as I know]
[1:18:29][@Mr4thDimention][This entity reference stuff feels premature to me since I don't think we have a lot of examples of how it will be used. Are you doing it now for a particular reason?]
[1:21:25][Close down][:speech]
[/video]