[video output=day622 member=cmuratori stream_platform=twitch stream_username=handmade_hero  project=code title="Debugging Asset Tag Hashes" vod_platform=youtube id=mMf380TZ9Xw annotator=Miblo]
[0:02][Recap and set the stage for the day][:"asset system" :speech]
[2:06][Flexible vs Rigid Asset Lookup][:"asset system" :hashing :speech]
[5:55][Why Flexi-Rigid Asset Lookup: 1) Straightforward coding][:"asset system" :speech]
[7:16][Why Flexi-Rigid Asset Lookup: 2) :Performance][:"asset system" :hashing :speech]
[10:32][Moving from per-entity to per-piece tags][:"asset system" :"entity system" :speech]
[11:29][@Molly][Meow]
[12:24][Product request: Task chair (attachment) with a pussy perch][:admin]
[14:06][@j0has][Try a baby pouch]
[15:03][Commit to investing in a Task Cat chair][:admin]
[15:28][Introduce gen_entity_tag_builder as an asset tag aggregator, for GenerateRoom() to pass to AddTag()][:"asset system" :"data structure" :"entity system"]
[23:45][Augment gen_entity with a FacingDirection][:"asset system" :"data structure" :"entity system"]
[26:23][Update everyone to use the new gen_entity_tag_builder and FacingDirection][:"asset system" :"entity system"]
[32:55][@bullseyepie][@handmade_hero Not GET but GEN]
[32:59][Make GenerateRoom() pass a BaseHash to GenEntityAtTraversable()][:"asset system" :"entity system"]
[36:14][Introduce a version of GetPieceAsset() that takes a gen_entity_tag_builder][:"asset system" :"entity system"]
[38:51][Remove gen_entity_tag and fix compile errors][:"asset system" :"data structure" :"entity system"]
[41:37][:Run the game and hit our TextureIndex == TextureIndex32 assertion in PushQuad()][:"asset system"]
[42:46][:Run the game in -Od and again hit our TextureIndex == TextureIndex32 assertion in PushQuad()][:"asset system"]
[44:39][Investigate our 0 ID issue][:"asset system" :research]
[46:11][Eliminate the union from asset][:"asset system" :"data structure"]
[46:29][:Run the game without asserting][:"asset system"]
[46:35][Abandon the union from asset, documenting this][:"asset system" :documentation]
[48:09][Determine to add assets to the hash table and verify the need to size the table by a prime number][:"asset system" :hashing :speech]
[50:25][Begin to add assets to the hash table, replacing SetAssetType() with AddAssetToHash() and RemoveAssetFromHash(), and removing FirstAssetOfType from game_assets][:"asset system" :"data structure" :hashing]
[55:18][Introduce GetAssetHashSlot() and GetAssetHashSlotFrom(), and implement AddAssetToHash() and RemoveAssetFromHash()][:"asset system" :hashing]
[1:04:16][Remove MatchAnyFlags from asset][:"asset system" :"data structure" :hashing]
[1:07:18][@yixery][What is your vim colorscheme?]
[1:07:42][Set up to enable AllocateGameAssets() to set the AssetHash, removing GetAssetHashSlotFrom()][:"asset system" :hashing]
[1:11:57][Consider removing Tags from the hha_header][:"asset system" :"file format" :research]
[1:13:13][Enable AddAssetToHash() to rebuild the asset's TagHash][:"asset system" :hashing]
[1:22:38][Fix compile errors and remove GetVariantCount()][:"asset system"]
[1:23:40][Enable UpdateSingleAssetMetadata() to report errors][:"asset system" :"error handling"]
[1:24:51][:Run the game with more success than expected][:"asset system"]
[1:25:32][Consider this to be an order-dependency problem][:"asset system" :research]
[1:28:42][Trim down the specificity of the orphanage asset tags in base_game.hht][:admin :"asset system"]
[1:29:01][Prevent GenerateRoom() from adding the \"manmade\" tag][:"asset system"]
[1:29:27][Still see no wall textures][:"asset system" :run]
[1:30:46][Try to Reload HHTs, to no effect][:"asset system" :run]
[1:32:19][Investigate our apparent asset matching error][:"asset system" :research]
[1:34:01][Try unsuccessfully to break in to UpdateAndRenderEntities()][:"asset system" :"entity system" :run]
[1:36:19][@x13pixels][Did you get a later version of VS? If so, need 0.3.1.3 or later]
[1:36:26][Update ~remedybg to 0.3.1.4][:admin]
[1:38:01][Break in to UpdateAndRenderEntities()][:"asset system" :"entity system" :run]
[1:39:24][Inspect the Asset values for a ground cube][:"asset system" :"entity system" :run]
[1:41:13][~remedybg feature request: Get enum name from integer value][:admin]
[1:41:53][Continue to decrypt our cube asset tag hash][:"asset system" :"entity system" :run]
[1:43:39][Note that our grass assets work][:"asset system" :"entity system" :run]
[1:44:56][Traverse the untextured orphanage in -O2][:"asset system" :"entity system" :run]
[1:45:53][Change GenerateRoom() to use the Asset_Block tag for cubes, inspired by GenerateApron()][:"asset system" :"entity system"]
[1:46:50][See our wall and floor textures, but no bodies and heads or :lighting][:"asset system" :"entity system" :run]
[1:47:42][Relaunch without triggering the :lighting bug][:"asset system" :"entity system" :run]
[1:48:33][Begin to investigate our bodies / heads bug][:"asset system" :"entity system" :research]
[1:51:38][Consider removing Tag_BasicCategory][:"asset system" :research]
[1:53:11][Step in to AddPlayer() and inspect the HeroTags][:"asset system" :"entity system" :run]
[1:56:47][See the glove, with facing direction mostly working][:"asset system" :"entity system" :run]
[1:57:37][Seek the player asset files for clues][:admin :"asset system" :"entity system"]
[1:58:13][Prevent ImportBody() from adding Tag_Idle][:"asset system" :"entity system"]
[2:00:26][See the body][:"asset system" :"entity system" :run]
[2:00:53][Prevent ImportHead() from adding Tag_Idle][:"asset system" :"entity system"]
[2:01:12][See the head][:"asset system" :"entity system" :run]
[2:01:26][Trigger the load-time :lighting bug][:"asset system" :"entity system" :run]
[2:02:15][Investigate our orphan assets bug][:"asset system" :"entity system" :research]
[2:05:39][Break in to AddOrphan() and inspect the asset tags][:"asset system" :"entity system" :run]
[2:08:31][Q&A][:speech]
[2:08:53][@nick_19992][Q: Hi, I'm waiting for your Star Code Galaxy[ref
    site="Star Code Galaxy"
    url=https://starcodegalaxy.com/], but meanwhile, reading K&R.[ref
        author="Brian Kernighan and Dennis Ritchie"
        title="The C Programming Language, 2nd Edition"
        url=https://archive.org/details/CProgrammingLanguage2ndEditionByBrianW.KernighanDennisM.Ritchie] Do you think I should be able to solve all exercises one by one or I could skip them and continue with the text and get back to them later? For example, before chapter one there's an exercise to remove comments from a C program and I'm having trouble to solve it at this stage. Thank you][:language]
[2:10:47][@vironacorus][Q: Do you think that (possibly optional) :memory safety features are desirable to have in languages? Or should it be the programmer's job?][:language]
[2:14:10][@iostream21][Would you like to participate in our regular competition for JavaScript and TypeScript developers? Prize fund: $100]
[2:15:32][@exp_ix][Q: Do you think that using void * as some blank is data good practice? For example, if you have a somewhat generic struct called item, and then based on what item type it is its void * data points to a different struct that describes that item type][:language]
[2:19:58][@recursivechat][Q: Do game engines use a common library to import assets from, say, Maya / Blender?[ref
    site="RAD Game Tools"
    page="Granny 3D"
    url=http://www.radgametools.com/granny.html]]
[2:21:50][@gumboatdiplomat][Q: Watched your design chat with [@naysayer88 Jon], which was really cool. Are you moving into designing the gameplay of [~hero Handmade Hero]?]
[2:22:27][@vironacorus][Q: If I wanted to make a game with a :modding interface or a lot of items, how should I go about it? In both cases union-based polymorphism that you just described don't seem the best solution]
[2:24:54][@nick_19992][Q: Do you recommend reading a book about Win32 :API to begin the course (like Petzold's[ref
    title="Code: The Hidden Language of Computer Hardware and Software"
    author="Charles Petzold"
    publisher="Microsoft Press"
    isbn=0-7356-0505-X
    url=http://www.charlespetzold.com/code/])?]
[2:25:07][@svemirkovic][Q: Do you already have something on your agenda after you finish [~hero Handmade Hero]?]
[2:25:47][That looks like about it, with a glimpse into the future cleaning the :"asset system"][:speech]
[2:26:39][Plug the Episode Guide[ref
    site="Handmade Hero"
    page="Episode Guide"
    url=https://handmadehero.org/#EpisodeGuide]][:research]
[/video]
