From 85e55669fd0f1c43737e80cf645c58e3d0e741ff Mon Sep 17 00:00:00 2001 From: Miblo Date: Tue, 20 Dec 2022 22:37:16 +0000 Subject: [PATCH] Index hero/code665 --- cmuratori/hero/code/code665.hmml | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 cmuratori/hero/code/code665.hmml diff --git a/cmuratori/hero/code/code665.hmml b/cmuratori/hero/code/code665.hmml new file mode 100644 index 0000000..16d0c2c --- /dev/null +++ b/cmuratori/hero/code/code665.hmml @@ -0,0 +1,60 @@ +[video output=day665 member=cmuratori stream_platform=twitch stream_username=molly_rocket project=code title="Changing How Entities are Packed and Unpacked" vod_platform=youtube id=jcEMRyqJHEg annotator=Miblo] +[0:01][Recap and set the stage for the day][:"entity system" :speech] +[1:09][Describe our storage of the world as geographic / geometric chunks][:"data structure" :"entity system" :research] +[5:26][Consider removing sim_region][:"data structure" :"entity system" :research] +[6:34][Note our need for entity lookup tables by ID][:"data structure" :"entity system" :research] +[7:19][Geometric / spatial query entity operations: :collision, :movement or :lighting gather][:"data structure" :"entity system" :research] +[7:54][Non-geometric entity operations][:"entity system" :research] +[8:13][Non-geometric entity operations: 1) Matching gamepad with entity][:"entity system" :"input handling" :research] +[8:43][Non-geometric entity operations: 2) Focusing :camera on player's entity][:"entity system" :research] +[9:54][Non-geometric entity operations: 3) Grouping entities][:"entity system" :research] +[11:35][Consider the need for entity identification irrespective of world location][:"entity system" :research] +[12:24][Non-positional entity identification][:"entity system" :research] +[12:38][Non-positional entity identification: 1) Giant direct addressing table][:"entity system" :research] +[13:23][Non-positional entity identification: 2) Localised direct addressing table][:"entity system" :research] +[14:13][Non-positional entity identification: 3) Disallowed, everything is a spatial query][:"entity system" :research] +[17:00][Consider storing moving and static entities separately][:"entity system" :research] +[18:02][Consider augmenting world_chunk with a table of movable entities, or unpacked_entity_block with a movable / skippable signifier][:"data structure" :"entity system" :research] +[20:06][Remove the #if 0 from unpacked_entity_block and fix the order of declarations][:"data structure" :"entity system"] +[21:23][Determine to store moving and static entities separately, with everything as a spatial query][:"entity system" :research] +[21:50][Determine to implement world_chunk (un)compressing][:compression :"entity system" :research] +[23:44][world_chunk: TODO(casey): Probably need to track access patterns here so we know what to repack for lack of use][:"data structure" :"entity system"] +[24:18][Consider changing the entity management :threading scheme][:"entity system" :research] +[26:19][Describe EnsureRegionIsUnpacked()][:"entity system" :research] +[28:11][Determine to enable interleaving of entity unpacking and updating for cache-friendliness][:"entity system" :research] +[29:24][@rct33][I just got here, so no] +[29:34][@frizzku][Yeah] +[29:39][@fat_dratini][Yes, you gotta eat your food while it's hot] +[29:46][Respecify EnsureRegionIsUnpacked() to support unpack and update interleaving, introducing world_chunk_iterator, IterateChunks(), IsValid() and Next()][:"data structure" :"entity system"] +[37:16][Implement our world chunk iterator: IterateChunks(), IsValid() and Next(), introducing EnsureValidChunk()][:"data structure" :"entity system"] +[54:50][Fix compile errors in the world chunk iterator][:"data structure" :"entity system"] +[56:43][Consider making the caller unpack the entity block][:"entity system" :research] +[57:21][Change world_chunk_iterator to contain a world_chunk for the caller to unpack as required][:"data structure" :"entity system"] +[59:56][Introduce EnsureChunkIsUnpacked() and EnsureChunkIsPacked()][:"data structure" :"entity system"] +[1:00:49][Consider not having a lookup table for unpacked entities in the world][:"data structure" :"entity system" :research] +[1:04:01][Implement EnsureChunkIsPacked() based on PackEntity()][:"entity system"] +[1:06:00][Consider who is responsible for moving entities between chunks][:"entity system" :research] +[1:07:47][Temporarily introduce MoveEntityToNewChunk()][:"entity system"] +[1:08:16][Determine to move entities between chunks immediately][:"entity system" :research] +[1:09:18][Introduce MoveEntityToNewPosition()][:"entity system"] +[1:11:14][Simplify EnsureRegionIsUnpacked()][:"entity system"] +[1:14:40][Implement EnsureChunkIsUnpacked() based on EnsureRegionIsUnpacked()][:"entity system"] +[1:14:50][Plan our :memory strategy for entity chunk unpacking][:"entity system" :research] +[1:15:39][Make EnsureChunkIsPacked() call AddToFreeList()][:"entity system"] +[1:16:20][Remove EnsureRegionIsUnpacked(), RepackEntitiesAsRequired(), ClearUnpackedEntityCache() and AcquireUnpackedEntitySlot()][:"entity system"] +[1:18:56][Note the orientation chunk dimensions around their centre][:"data structure" :"entity system"] +[1:20:09][Check the time][:admin] +[1:20:39][Remove MAX_SIM_REGION_ENTITY_COUNT][:"entity system"] +[1:20:49][Introduce entity_block_storage to contain packed_entity_block and unpacked_entity_block, making them roughly the same size][:"data structure" :"entity system"] +[1:26:01][Remove entity packing data from world][:"data structure" :"entity system"] +[1:26:42][Finish implementing EnsureChunkIsUnpacked(), renaming FirstBlock to FirstPacked in world_chunk][:"data structure" :"entity system"] +[1:30:54][Reacquaint ourselves with FillUnpackedEntity()][:"entity system" :research] +[1:31:29][Relieve FillUnpackedEntity() of taking the SimRegion][:"entity system"] +[1:31:42][Reacquaint ourselves with FillUnpackedEntity() (cont.)][:"entity system" :research] +[1:32:09][Change UpdateAndRenderEntities(), not EnsureChunkIsUnpacked(), to call FillUnpackedEntity(), adding EntityFlag_Unpacked][:"entity system"] +[1:35:16][End our streaming with a plug of Molly Rocket's 25% Off Everything sale[ref + author="Molly Rocket" + title="Holiday Sale: 25% Off Everything We Make!" + publisher=YouTube + url=https://www.youtube.com/watch?v=HI0IALE2g-M]][:research] +[/video]