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

43 lines
2.7 KiB
Plaintext

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Matching Periodic Tags" vod_platform=youtube id=gVOuBzVC20g annotator=Miblo annotator=debiatan]
[1:48][Demo a bug in the asset system]
[3:05][Blackboard: Periodic Tag Matching]
[7:21][Blackboard: "Neighbourhood operator"]
[10:20][Blackboard: "Neighbourhood distance"]
[13:30][Blackboard: Changing the sign of a point in the negative range in order to compute the distance of it from a point in the positive range]
[15:23][Blackboard: Moving a positive number into the negative]
[16:21][Blackboard: The whole equation for doing this neighbourhood calculation]
[20:11][handmade_asset.h: Add HalfTagRange to game_assets]
[21:08][handmade_asset.cpp: Set the HalfTagRange for each TagType]
[22:11][Use the HalfTagRange in BestMatchAsset]
[23:26][handmade_intrinsics.h: Write a real32 version of SignOf]
[23:37][handmade_asset.cpp: Continue adding (Half)TagRange to BestMatchAsset]
[25:22][Debugger: Step into BestMatchAsset]
[26:11][Play the game and check out our new functionality]
[26:43][We're kind of done]
[28:00][handmade_asset.cpp: Add *FileName\[\] in order to loop over the bitmaps and set TopDownAlign]
[30:19][Debugger: Look at the alignments]
[32:50][handmade_asset.cpp: Bake that calculated alignment into the hero bitmaps]
[33:34][Run the game and check out the correct alignments]
[34:02][Start talking about the asset file format]
[35:36][handmade.h: Add two items to the Asset streaming TODOs, and prioritise Audio]
[37:11][handmade_asset.cpp: Introduce LoadSound]
[43:59][Introduce DEBUGLoadWAV]
[44:57][Internet: Bring up the WAVE specifications]
[45:43][Blackboard: "IFF" file format]
[48:45][handmade_asset.cpp: Introduce WAVE_header]
[50:32][Introduce WAVE_fmt]
[52:38][Introduce WAVE_chunk]
[53:03][#define RIFF_CODE]
[55:12][Parse the WAVE_header for its IDs]
[56:34][Leave it there and glimpse into the future]
[57:58][Q&A][:speech]
[58:30][@cubercaleb][For getting the character sprite couldn't you just do the following? int sprite_to_load = (angle + (180 / sprites)) / (360 / sprites) % sprites]
[59:59][@kelimion][ChronalDragon and I had a combined question about the audio asset struct. Will it need a SoundLoopable, or LoopStart / LoopEnd (with LoopEnd == -1 meaning a one-shot sound)]
[1:00:40][@soysaucethekid][Plans for implementing other audio formats like MP3?]
[1:03:05][@cubercaleb][Wait, how exactly is MP3 patented?]
[1:04:48][@cubercaleb][Yeah, but why would people patent a file extension?]
[1:05:32][@stelar7][FLAC is 50% the size of WAV, so it's useful for lossless compression]
[1:08:36][@cubercaleb][So is that why RAD doesn't patent any of their stuff?]
[1:08:56][Wind things down][:speech]
[/video]