From 52adce070b02edbe62db8c97c80b9fb588426105 Mon Sep 17 00:00:00 2001 From: Matt Mascarenhas Date: Mon, 20 May 2019 21:35:12 +0100 Subject: [PATCH] Index hero/code533 --- cmuratori/hero/code/code533.hmml | 74 ++++++++++++++++++++++++++++++++ cmuratori/hero/code/code534.hmml | 2 + 2 files changed, 76 insertions(+) create mode 100644 cmuratori/hero/code/code533.hmml create mode 100644 cmuratori/hero/code/code534.hmml diff --git a/cmuratori/hero/code/code533.hmml b/cmuratori/hero/code/code533.hmml new file mode 100644 index 0000000..1f9b778 --- /dev/null +++ b/cmuratori/hero/code/code533.hmml @@ -0,0 +1,74 @@ +[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Importing Particles, Scenery, and Items" vod_platform=youtube id=fxSCbuBRxuc annotator=Miblo] +[0:01][Recap and set the stage for the day sprucing up the :"asset system"][:speech] +[6:38][Crash on the GetFontInfo() call in InitializeUI()][:"asset system" :font :run] +[7:12][Determine to investigate the problem with segoeui.hht][:font :speech] +[9:19][Step in to GetFontInfo() to see that it could not find our :font][:run] +[10:40][Reacquaint ourselves with the tagging of :font assets from ParseFontBlock()][:research] +[14:18][Check out the base_game.hha dump in TabView, to find no :font][:admin] +[17:22][Step in to ParseFontBlock() to find that :parsing fails on encountering a negative floating point kerning value][:font :run] +[19:56][Investigate why we are putting negative values into the HorizontalAdvance table[ref + site="Windows Dev Center" + page="GetKerningPairsW function" + url=https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-getkerningpairsw][ref + site="Windows Dev Center" + page="KERNINGPAIR structure" + url=https://docs.microsoft.com/en-gb/windows/desktop/api/wingdi/ns-wingdi-tagkerningpair]][:font :research] +[25:57][Fix LoadGlyphBitmap() to compute the AlignPercentage and KerningChange in (signed) 32-bit floating point space][:language] +[27:23][Regenerate our Segoe UI assets, to find that SegoeUI.hht contains purely positive Kerning values][:admin :font] +[29:54][Successfully find the :font, and take a close look at its alpha blending and tight kerning][:run] +[34:04][Swap our :font back to Liberation Mono][:admin] +[34:28][Find that Liberation Mono is loaded okay][:font :run] +[34:54][Prevent GAME_UPDATE_AND_RENDER() from playing the music] +[35:27][Determine to address asset tagging, noting that our floors are erroneously stone][:"asset system" :run] +[36:50][Investigate why our stone texture is never getting selected][:"asset system" :research] +[40:38][Add a breakable place in UpdateAndRenderEntities() when matching Tag_Grass][:"asset system"] +[41:34][Break in to UpdateAndRenderEntities() to see how the Grass tag gets matched][:"asset system" :run] +[44:16][Fix GenerateRoom() to only apply the Manmade tag if the room is not outdoors][:"procedural generation"] +[45:23][Find that our grass texture is correctly applied, and determine to furnish the world][:"procedural generation" :run] +[47:11][Peruse our :art and consider respecifying obstacles, splitting them into their own files][:admin] +[51:52][Start to add our obstacles to base_game.hht][:admin :"asset system"] +[53:01][Split out the red armchair into its own file, including a new green variant][:art :drawing] +[1:02:30][Split out the table lamp into its own file][:art :drawing] +[1:04:03][Consider how to categorise the forestry][:art :drawing] +[1:07:12][Split out and arrange the ground cover foliage into separate files][:art :drawing] +[1:15:32][Delete our obsolete :art files, and add our new packs to base_game.hht][:admin :"asset system"] +[1:23:34][Enable ParseTopLevelBlock() to handle "particle" and "scenery" blocks, introducing CreateArtParticleTagGrid(), CreateArtItemTagGrid() and CreateArtSceneryTagGrid()][:"asset system" :parsing] +[1:37:15][Encounter an "unrecognised tag name" :parsing error][:"asset system" :run] +[1:37:46][Add a Hat tag][:"asset system" :parsing] +[1:38:09][Successfully import our assets][:"asset system" :parsing :run] +[1:38:23][Check out the base_game.hha dump in TabView][:admin :"asset system"] +[1:40:11][Make AddPlayer() add a hat][:"asset system"] +[1:41:48][Find that our hero's head sadly lacks a hat][:"asset system" :run] +[1:42:03][Make AddPlayer() connect the hat to the head] +[1:43:21][Find that our hero's head still sadly lacks a hat][:"asset system" :run] +[1:43:35][Add an alignment point for TopOfHead and see the hat appear][:"asset system" :run] +[1:45:58][View the hats to see that their orientations do not match the template][:admin :"asset system"] +[1:46:39][Investigate why the hat is absent when we are facing downwards][:"asset system" :run] +[1:48:11][Note that the FacingDirection is being set the same and that we imported too many assets from item_hat_03.png][:admin :"asset system"] +[1:49:49][Take a close look at item_hat_03.png][:art :drawing] +[1:53:29][Make AddPlayer() add the Cook tag][:"asset system"] +[1:53:54][Check out our cook's appearance and set the alignment points][:"asset system" :run] +[1:57:52][Q&A][:speech] +[1:58:23][@victorn][Q: Was Michael Abrash around during your time at RAD?] +[1:58:41][@frostyninja][Q: Copy pasta snafu with the variant using YIndex instead of XIndex in the scenery tag grid][:"asset system" :parsing] +[1:58:57][Fix typo in CreateArtSceneryTagGrid()][:"asset system" :parsing] +[1:59:05][@thepr1ms][Q: How about "ornaments" for the oriented furniture instead of "scenery"?][:"asset system"] +[1:59:18][@nordicplayer][Q: I'm creating an OpenGL engine in C#. I really enjoy the language and I'm enjoying the process, but should I just go move to C++?][:language] +[2:01:00][@guybru5h_vi][Q: What's your learning method when faced with a new topic? How do you juggle figuring things out yourself vs reading a textbook. My problem is wanting to move quickly but also wanting to learn deeply] +[2:03:40][@theomarest][Q: Do you have an official code style guide anywhere?][:language] +[2:03:56][@alex_deak][Q: Hi from Hungary! I took your advice you gave me last week and started a blog[ref + site=Variables + url=https://sandordeak.home.blog/] to get involved in the game industry. It contains a few posts already, and some description of my earlier projects. Maybe worth reading sometime] +[2:08:30][@frostyninja][Q: Hi from Bulgaria (er UK now)! I’m starting an internship in July at a game studio and I’m super excited and I feel I owe you a lot of gratitude for keeping me excited about game dev!] +[2:09:27][@Brian][Q: Greetings [@cmuratori Casey]! You have a distinct coding style and though I realize you may have evolved into it over the years, I was wondering if there was there something specific that directed you? It could even have been you did not like other styles. I know you appreciate good typography too so I wonder if some of your decisions were based on what you like][:language] +[2:12:20][@xxthebigfoxx][Q: You deleted an X] +[2:12:22][Re-fix typo in CreateArtSceneryTagGrid()][:"asset system" :parsing] +[2:12:28][@theomarest][Q: Are u32, f32, etc. aliases or supported by the :language?] +[2:12:59][Thank [@x13pixels George] for fixing our reported ~remedybg bugs][:speech] +[2:15:17][@alexkelbo][Q: When porting to other platforms, do you have to rewrite all your shaders in HLSL and Metal SL? Is there a way to transpile GLSL?][:language] +[2:17:15][Plug [@naysayer88 Jon]'s talk 'Preventing the Collapse of Civilization' from DevGAMM Moscow 2019[ref + site=YouTube + page="Jonathan Blow - Preventing the Collapse of Civilization (English only)" + url=https://www.youtube.com/watch?v=pW-SOdj4Kkk]][:speech] +[2:22:47][Wrap it up][:speech] +[/video] diff --git a/cmuratori/hero/code/code534.hmml b/cmuratori/hero/code/code534.hmml new file mode 100644 index 0000000..43a2266 --- /dev/null +++ b/cmuratori/hero/code/code534.hmml @@ -0,0 +1,2 @@ +[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Heuristic Alpha Testing for Multi-Tile Import" vod_platform=youtube id=w5uW0yWSsng annotator=] +[/video] \ No newline at end of file