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

69 lines
6.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[video output=day621 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Asset Tags in the World Generator" vod_platform=youtube id=l3018wbTGxY annotator=Miblo]
[0:01][Recap and set the stage for the day][:"asset system" :speech]
[0:54][Consider the order-dependence of the asset tag order][:"asset system" :speech]
[3:13][Consider the :performance of Hash32() in terms of order-independence][:"asset system" :hashing :speech]
[6:59][Consider the point of order-independent asset tagging][:"asset system" :hashing :speech]
[8:08][Sketch out updates to base_game.hht][:admin :"asset system"]
[10:38][Check out our compile errors][:"asset system"]
[11:08][Bind "J" globally][:admin]
[12:30][@ryanfleury][@handmade_hero `fleury_toggle_compilation_expand`]
[12:33][Bind "Insert" to fleury_toggle_compilation_expand][:admin]
[13:02][Try making AddPieceLight() and AddPieceOccluder() pass {} to AddPiece()][:"asset system"]
[14:19][Function parameter lookup and failed namespacing in C++[ref
site="Compiler Explorer"
url=https://godbolt.org]][:language :research]
[20:32][Update AddPlayer() to use GetTagHash()][:"asset system"]
[24:03][Reacquaint ourselves with the GEN_CREATE_ENTITY() macro and its calling sites][:"asset system" :research]
[29:46][Shrink the Tags array in gen_entity from 14 to 4][:"asset system" :"data structure"]
[30:18][Consider how to encode (random) variants in our tag hash][:"asset system" :hashing :research]
[38:16][Consider doing GetAssetFrom() exactly as the old GetBestMatchAssetFrom(),[ref
site="Handmade Hero"
page=day596/code/handmade_asset.cpp
url=https://github.com/HandmadeHero/cpp/blob/day596/code/handmade_asset.cpp#L379] just without the WeightVector][:"asset system" :hashing :research]
[43:26][Make GetAssetFrom() match based on the old GetBestMatchAssetFrom(),[ref
site="Handmade Hero"
page=day596/code/handmade_asset.cpp
url=https://github.com/HandmadeHero/cpp/blob/day596/code/handmade_asset.cpp#L379] just without the WeightVector][:"asset system" :hashing]
[50:12][Reflect on our new asset matching, with :optimisation potential and exact matching on tags][:"asset system" :hashing :research]
[51:01][Change asset_match_vector to be an f32 array and remove TagRange from game_assets][:"asset system" :"data structure"]
[51:55][Consider introducing a Modulus() function for facing direction][:"asset system" :"entity system" :mathematics :research]
[54:45][Embark on updating the picking of FacingDirection in UpdateAndRenderEntities()][:"asset system" :"entity system"]
[57:27][Revert the removal of TagRange from game_assets][:"asset system" :"data structure"]
[59:10][Augment entity_visible_piece with an f32 Variant for UpdateAndRenderEntities() to use][:"asset system" :"data structure" :"entity system"]
[1:00:32][Update AllocateGameAssets() to operate on MatchElement][:"asset system"]
[1:01:48][@ryanfleury][Hmmm I don't know, @handmade_hero… He's online so I will ping him about it]
[1:02:59][Consider making GEN_CREATE_ENTITY() take a tag hash][:"asset system" :"entity system" :research]
[1:03:58][@ryanfleury][Yeah, that is weird… because it's different from the virtual whitespace behavior…]
[1:04:04][Make GEN_CREATE_ENTITY() and all entity generation functions take a BaseHash][:"asset system" :"entity system"]
[1:07:44][Look into updating GenerateRoom() to our new asset matching scheme][:"asset system" :research]
[1:09:24][Delete AddTag() and the Tags array from entity, and propagate this change][:"asset system" :"entity system" :"data structure"]
[1:12:05][Consider providing a source of entropy to AddPiece()][:"asset system" :"entity system" :prng :research]
[1:13:34][Introduce entity_piece_asset for entity_visible_piece to contain][:"asset system" :"data structure" :"entity system"]
[1:17:48][Workaround C++'s ambiguous interpretation of {} in our AddPiece() calls][:"asset system" :language]
[1:19:21][Respecify AddTreeTags() as GetTreeTags() and change GEN_CREATE_ENTITY() to take an entity_piece_asset][:"asset system" :"entity system" :prng]
[1:23:22][Introduce ChangeHash()][:"asset system" :"entity system" :hashing]
[1:25:53][Change the AddPiece() forward-declarations to take an entity_piece_asset, and pass {} to AddPiece() again][:"asset system" :language]
[1:26:33][Introduce GetPieceAsset() for AddPlayer() to call][:"asset system" :"entity system"]
[1:29:35][~4coder feature request: Early scrolling out from behind an on-top window][:admin]
[1:30:05][Make AddPlayer() use GetPieceAsset() and ChangeHash()][:"asset system" :"entity system"]
[1:32:55][Defer our GenerateRoom() update to next time][:"asset system" :"procedural generation" :research]
[1:33:52][Fix the GenEntityAtTraversable() call in GenerateRoom()][:"asset system" :"procedural generation"]
[1:34:59][Q&A][:speech]
[1:35:47][@ryanfleury][@handmade_hero I have alerted [@mr4thdimention the 4th dimension] of the bug]
[1:36:11][@exp_ix][Q: Are asset tags used for something like lister panels?][:"asset system"]
[1:36:33][@darthwutface][Q: The :API you mentioned not existing earlier for bulk sending packets: why doesn't it exist? Is there some hardware limitation?][:networking]
[1:40:22][@vironacorus][Q: Thoughts on Unity / Unreal / Godot (their quality)? How would an engine made by you look like?][:"game engine"]
[1:42:49][@kniffel5][Ori and the Will of the Wisps is done in Unity. Doesn't that count for AAA-quality? Though they had to modify it a bit][:"game engine"]
[1:46:51][@hmartarg][Q: Have you ever explained bit-fields and, if not, can you and is it still useful to use today? I just saw that in an old code base to do flags]
[1:50:35][@miles_gloriosus][@HmartArg @handmade_hero If it matters, bit-fields are nice to use in :networking, because you can pack the booleans in 1 or 2 bytes instead of taking up a byte for each one]
[1:51:04][@yrk_][Q: I didn't see you using any version control. Aren't you using any and are you not afraid of losing something valuable due to the mistake of deleting a bunch of code lines too quickly?[ref
site="Handmade Hero"
page=day596/code/handmade_asset.cpp
url=https://github.com/HandmadeHero/cpp/blob/day596/code/handmade_asset.cpp#L379]][:vcs]
[1:52:30][Using :compression, not bit-fields, to minimise transmission bandwidth for :networking][:speech]
[1:53:23][@centhusiast][Q: Could you explain the downside of the JSON data format?]
[1:55:40][@maquinahumana][Q: Why do you use 32-bit bools bool32 rather than something smaller?]
[1:56:49][@centhusiast][Q: Have you heard about zstandard data :compression developed by facebook?]
[1:57:31][Wrap it up]
[/video]