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

65 lines
7.2 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=day484 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Debugging Multi-tile Import" vod_platform=youtube id=sBp83etTY2s annotator=Miblo]
[0:01][Welcome and set the stage for the day][:speech]
[0:17][Set up to try ~cdbg[ref
site=CDbg
url=https://cdbg.handmade.network/] and ~codeclap[ref
site="c\[ode\]clap"
url=https://codeclap.handmade.network/] debuggers][:speech]
[1:43][A few words on the need for better ways to fund open-source tool development][:speech]
[6:11][On charging for your work, and possible ways to do this][:speech]
[8:06][A few preliminary words on ~cdbg and ~codeclap][:speech]
[11:07][Launch ~cdbg, with initial thoughts on its user interface][:admin :ui]
[13:29][Step through optimised win32_handmade.exe, noting that we don't expect :parsing of this binary to work][:admin]
[15:01][Step through debug win32_handmade.exe, noting that we're missing disassembly, but that it feels way snappier than the debugger we're used to][:admin]
[18:59][Scour ~cdbg's list of keys for "set breakpoint by name"][:admin]
[21:48][Set up to take a look at advanced features of ~cdbg, including linked list viewing][:admin :"data structure"]
[22:50][Try out ~cdbg's fbreak "set breakpoint by function name" command on AcquireAssetMemory()][:admin]
[25:57][List breakpoints in ~cdbg, to see that our AcquireAssetMemory() breakpoint is absent][:admin]
[26:45][Continue to step through AcquireAssetMemory(), and try out ~cdbg's advanced lta "linked-list to array" command][:admin :"data structure"]
[29:11][Try out ~cdbg's advance image "display image" command][:admin]
[31:16][Final notes on our desired functionality of ~cdbg so we can switch: working break point list, F9 to toggle breakpoints, and disassembly][:admin]
[32:37][Launch ~codeclap, with initial thoughts on its user interface, admiring the inline display of variable values][:admin :ui]
[35:10][Step in to Win32LoadXInput() in ~codeclap, triggering the appearance of the floating "Output" pane, and admiring the Expressions pane's command completion][:admin :ui]
[37:16][Continue to step lines in ~codeclap, finding that it's started to struggle with something][:admin :ui]
[38:39][Note nice features of ~codeclap, and our desired increase of usability and reliability][:admin :ui]
[39:16][Try to check out ~codeclap's "Mixed" source and assembly view, which unfortunately crashes][:admin]
[40:46][Final optimistic thoughts and thanks to the developers of both ~cdbg (by [@TastyMuffin Nick Slivca]) and ~codeclap (by @spx)][:admin]
[43:09][:Run the game and set up for today's work on the :"asset system"]
[46:10][Rename our :art asset files using a new set of tags][:admin :"asset system"]
[57:21][Consider splitting the character heads and bodies into separate files][:"asset system" :speech]
[1:01:23][Organise our orphan character asset files into a "pending" directory, and continue to tag our remaining :art asset files][:admin :"asset system"]
[1:04:43][Enable ParsePieces() to parse out and tag both the body and head tiles of character asset files][:"asset system" :parsing]
[1:12:00][Add our new tags to the asset_tag_id enum and NameTags array][:"asset system"]
[1:18:44][:Run the game to find that we are a large, misaligned cat, and that our multi-tile import is a bit buggy][:"asset system"]
[1:21:05][Check out our local.hha in TabView to see that all looks fine][:admin :"asset system"]
[1:23:20][Refamiliarise ourselves with ProcessMultiTileImport()][:"asset system" :research]
[1:29:02][Scrutinise ExtractImage() for any obvious bugs][:"asset system" :research]
[1:31:26][Scrutinise Downsample() for any obvious bugs][:"asset system" :research]
[1:34:28][Fix Downsample() to correctly handle images with an odd number of rows][:"asset system" :rendering]
[1:36:23][][:speech][quote 636]
[1:36:26][:Run the game to find that we have fixed the striding bug, but that we remain to be a large, misaligned cat][:"asset system" :rendering]
[1:39:51][Q&A][:speech]
[1:40:54][@vateferfout][Q: I don't really understand the size bug. Don't you ask for a specific size when you push the hero's sprites?][:"asset system"]
[1:42:46][@macielda][Q: I am having trouble understanding the difference between tag and basic type][:"asset system"]
[1:43:58][@vtlmks][Q: Just wanted to thank you for the link to the "Pseudo band-limited pixel art filter".[ref
site="Themaister's Den"
page="Pseudo-bandlimited pixel art filtering in 3D a mathematical derivation"
url=http://themaister.net/blog/2018/08/25/pseudo-bandlimited-pixel-art-filtering-in-3d-a-mathematical-derivation/] It was exactly what I needed]
[1:44:11][@pulp_user][Q: When I issue an OpenGL / DirectX call (creating a vertex-buffer, for example) that takes a while to complete, will the CPU be busy while the GPU makes it happen, or will the thread be suspended, so that Windows can schedule something else?]
[1:45:41][@vateferfout][Q: If I understand correctly, since the sprites are clamped depending on the space that is actually occupied, doesn't it mean you'll need to adapt the sprite dimensions to the sprite that is being drawn?][:"asset system"]
[1:46:01][@hayai][Q: Can you pet the cats?]
[1:46:09][@0lpbm][Q: Why not make the hha file generator also load the files and generate the tags?][:"asset system"]
[1:46:38][@nordicplayer][Q: OpenGL or Vulkan, for a complete beginner?][:api]
[1:46:53][@Jim0_o][Q: So what would it look like if you activated the snake code now, and made them cats? (Just seeing cats walk around randomly in the rooms will be so cool, just adding random stop_and_lick_your_paw calls and you basically have created life). ((Or I should just deal with having to wait for tomorrow.))][:"asset system"]
[1:47:25][@garryjohanson][Q: Advice on logging events or core dumping in case game crashes on a customer's machine? I guess the question is how to prepare for helping customers who had the game crashed]
[1:48:05][@vateferfout][Q: I mean that the idle body sprite will be smaller (in pixels) than the dodge left, for example, so if the sprite dimensions you send to the graphics card are the same, won't the dodge left sprite be squashed?][:"asset system" :rendering]
[1:49:13][@guybru5h_vi][Q: What's wrong with Vulkan?][:api]
[1:49:22][@xspe][Q: Thank you, [@cmuratori Casey], for giving both debuggers a try even though ~codeclap failed really bad this time. I will give my best to improve windows support, but I don't know about the "VS as a standard" thing"][:ui]
[1:50:05][@macielda][Q: How would you approach a bitmap that needs to be generated frequently on-the-fly? Would you add it to your :"asset system" and reference it through your asset system? Or would you skip the asset system in that case?]
[1:50:38][@nordicplayer][Q: And between DirectX and OpenGL, which one would you recommend for a beginner?][:api]
[1:50:47][@remedialman][Q: (Super off-topic) Can you offer me an explanation as to why there have never been PS/2 based PC controllers since it's a specific input port that sends CPU interrupts?][:peripheral]
[1:52:07][@xxthebigfoxx][Q: How long does the VoD of an episode usually take to come up online?]
[1:52:55][@noxnode][Q: How do you like the progress of [~hero Handmade Hero] so far?]
[1:54:53][Wrap up the stream][:speech]
[/video]