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

92 lines
8.0 KiB
Plaintext
Raw Permalink Normal View History

2020-11-13 21:50:36 +00:00
[video output=day619 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Adding Asset Tag Hashes" vod_platform=youtube id=5EukiraaNJ0 annotator=Miblo]
[0:01][Welcome to the stream][:speech]
[1:33][Determine to start editing the game, keeping an eye on our ~4coder config][:speech]
[2:04][Demo the "d" key's "delete range" behaviour, describing our desired one][:admin]
[3:29][Update casey_delete_to_end_of_line for the new ~4coder, and bind it to "d"]
[6:30][Find that casey_delete_to_end_of_line deletes one extra character at the start][:admin]
[7:06][Fix casey_delete_to_end_of_line]
[7:25][casey_delete_to_end_of_line now partially works][:admin]
[7:36][Enable casey_delete_to_end_of_line to join the following line with the current one when the cursor is at the latter's end]
[9:56][Find that casey_delete_to_end_of_line deletes the whole line][:admin]
[10:10][Fix casey_delete_to_end_of_line to correctly join lines]
[10:29][casey_delete_to_end_of_line now fully works][:admin]
[10:42][Our parentheses and line highlight colours are the same][:admin]
[11:38][Download 4coder_fleury and ~remedybg 0.3.1.1][:admin]
[16:21][Check out theme_example.4coder from 4coder_fleury][:admin]
[17:12][Rebuild and launch ~4coder][:admin]
[17:44][Modify 4coder_fleury.cpp to include 4coder_fleury_casey.cpp]
[18:07][Hit a compile error in 4coder_fleury_casey.cpp]
[18:42][Merge in our cursor drawing code, with a recommendation of Beyond Compare[ref
site="Scooter Software: Home of Beyond Compare"
url=http://www.scootersoftware.com/]][:admin]
[22:29][Build ~4coder successfully but see a weird purple pane][:admin]
[23:14][Update our theme-casey.4coder based on theme_example.4coder][:admin]
[26:32][Our colours are now working][:admin]
[27:03][Edit our colours][:admin]
[28:56][Our parentheses are now distinguishable from the line highlight, but now there's another mystery][:admin]
[29:16][Continue to edit our colours][:admin]
[30:41][Our parentheses are now fine][:admin]
[31:30][Continue to edit our colours][:admin]
[33:27][The braces now highlight a little bit][:admin]
[34:36][Note our theme issues to deal with off-stream][:admin]
[35:58][Zero out the cursor roundness and dim the line and annotation colours][:admin]
[36:58][Our colours are now tolerable, but the cursor interpolation seems a little broken][:admin]
[37:58][Fix compile error in the cursor roundness and reduce the thickness][:admin]
[38:25][The thickness only gets applied to the start mark][:admin]
[39:56][Try out editing and building our real code][:admin]
[42:04][Determine to remove the idea of entity pieces][:"entity system" :speech]
[43:06][Traverse the orphanage, with the determination to ease the setup of art assets with entities][:"asset system" :"entity system" :run]
[44:02][Describe the complexity both unneeded and necessary of base_game.hht][:admin :"asset system"]
[47:48][Determine to replace manual asset tags with the notion of an indexing scheme][:"asset system" :speech]
[56:39][Sketch out a new set of tags in base_game.hht][:admin :"asset system"]
[1:00:25][Add our new tags to asset_tag_id, noting that token-move skips past semicolons][:"asset system"]
[1:01:46][Continue to sketch out a new set of tags in base_game.hht and asset_tag_id][:admin :"asset system" :programming]
[1:10:38][Revert the new tags][:admin :"asset system" :programming]
[1:11:10][Consider :hashing the asset tags][:"asset system" :speech]
[1:14:24][Introduce asset_hash_entry][:"asset system" :"data structure"]
[1:15:37][Bind word_complete everywhere and disable compilation of the sampling generator and lighting profiler][:admin]
[1:16:56][Augment game_assets with an asset_hash_entry array, noting that it'll be more like a bit field][:"asset system" :"data structure"]
[1:20:10][Introduce GetTagHash()][:"asset system" :hashing]
[1:23:47][Augment entity_visible_piece with TagHash, with a few words on the inefficiency of variable-length data][:"data structure" :"entity system"]
[1:25:55][Make GetTagHash() weld the AssetCategory into the TagHash][:"asset system" :hashing]
[1:32:39][Begin to prepare UpdateAndRenderEntities() to use our new TagHash][:"asset system" :hashing]
[1:34:18][Consider how parameters such as FacingDirection may interact with our TagHash][:speech :"asset system" :hashing]
[1:36:35][Make UpdateAndRenderEntities() simplify the MatchVector as a v4 and pass that and the TagHash to GetBestMatchBitmapFrom()][:"asset system" :hashing]
[1:37:41][~4coder feature request: Unobtrusive function signature placement, maybe in a multipurpose compilation console][:admin]
[1:41:15][@ciansweeney][Or make it a shortcut, like Ctrl-Space or something to pop it up when it's needed?]
[1:43:26][@ryanfleury][I have an idea... maybe a "peek buffer" that you can stick into a panel?]
[1:44:07][@thesandvichmaker][As a vim user, I never found code peek that useful as an idea, because with vim's jump history you can just jump to the definition, look at it, maybe even copy it, and then jump back with minimal effort, and no new UI needed]
[1:45:09][@thebaker__][But what if you only have one pane?]
[1:45:34][@thesandvichmaker][Jump history, you'll never go back!]
[1:45:51][Update GetBestMatchBitmapFrom() and friends to use our new TagHash, introducing asset_tag_hash and GetAssetFrom() to replace GetBestMatchAssetFrom() and GetFirstAssetFrom()][:"asset system" :"data structure" :hashing]
[1:49:38][Allow SSE4.1[ref
site=Valve
page="Steam Hardware & Software Survey"
url=https://store.steampowered.com/hwsurvey]][:research]
[1:52:11][Introduce Hash32() using two rounds of _mm_aesdec_si128()[ref
site=Intel
page="Intel Intrinsics Guide"
url=https://software.intel.com/sites/landingpage/IntrinsicsGuide/] for GetAssetFrom() to call][:"asset system" :hashing]
[1:59:25][Consider the :performance of Hash32()[ref
site=uops.info
url=https://uops.info/table.html]][:"asset system" :hashing :research]
[2:00:37][Make Hash32() set a random Seed from random.org[ref
site="RANDOM.ORG - True Random Number Service"
url=https://random.org/]][:"asset system" :hashing]
[2:02:37][Set up GetAssetFrom() to work with a welded Coordinate, introducing asset_match_vector][:"asset system" :"data structure"]
[2:14:07][Q&A][:speech]
[2:14:40][@catccherguy14][Just put four VMs in front of the code and you get your answer as to why it's so slow][:emulation]
[2:15:22][@thesandvichmaker][Q: Off-topic, feel free to ignore, but someone told me that on PlayStation (didn't specify which PlayStation) games run in a sandbox, and if you forget to free any :memory you allocated when you exit, that sandbox will be kept alive in the background. That sounds like nonsense. Is it true? (If this can be answered without breaking NDA)]
[2:17:54][@rationalcoder][Q: I would like to hear a discussion between you and [@naysayer88 Jon] about :metaprogramming philosophy. On one of his streams, I asked whether he thought Jai would ever satisfy you in terms of metaprogramming, and he said that the way you think of metaprogramming is really different from the way he thinks of it, and he thinks you are very wrong about it. He said it's fine that you disagree, though. Sounds like a good discussion][:language]
[2:21:25][@hexadecimalinteger][Q: Why are new :compression techniques such as Microsoft Direct Storage / PS5 compression needed for instant loading. Why are NVME speeds not enough? What's the bottleneck?[ref
site=Eurogamer
page="PS5 specs and features, including SSD, ray tracing, GPU and CPU for the PlayStation 5 explained"
url=https://www.eurogamer.net/articles/ps5-specs-features-ssd-ray-tracing-cpu-gpu-6300]][:"file io" :performance]
[2:28:14][@roam00010011][Q: So I'm out of touch, where did you move to?]
[2:28:35][@hexadecimalinteger][Q: The thing is, if I go from SSD to NVMe, speeds are not improved 500MB/s to 4GB/s][:"file io" :hardware :performance]
[2:29:28][@hexadecimalinteger][Q: Yes, SATA to NVMe][:"file io" :hardware :performance]
[2:30:31][Wrap it up for today, with a plug of Star Code Galaxy[ref
site="Star Code Galaxy"
url=https://starcodegalaxy.com] and a glimpse into the future][:speech]
[/video]