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

43 lines
3.8 KiB
Plaintext

[video output=day308 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Debugging the Cycle Check" vod_platform=youtube id=trtrBITgktg annotator=Miblo]
[0:13][Recap and set the stage for the day]
[1:19][Run the game and show where we left things]
[2:06][handmade_opengl.cpp: Make OpenGLRenderCommands() draw a black border around the render entries]
[8:21][Run the game and see what our outlines are telling us]
[10:18][handmade_opengl.cpp and handmade_render.cpp: Look through the collision group drawing routines and consider what could be wrong]
[12:15][handmade_render.cpp: Rename RecursiveFromToBack() to RecursiveFrontToBack()]
[13:14][handmade_render.cpp: Make RecursiveFrontToBack() set and check things in the correct order]
[14:20][Run the game, see the cycles in our sort graph and investigate them]
[16:34][handmade_world_mode.cpp: Make AddStandardRoom() only generate one room, run the game and see what happens with cycles]
[21:02][handmade_opengl.cpp: Make OpenGLRenderCommands() draw collision groups lightly, then increase their alpha when they cycle]
[22:02][Run the game and view the cycles]
[23:52][Consider how we're doing the sorting in the first place]
[27:18][Continue to investigate what's happening with the cycles]
[29:34][handmade_render_group.cpp: Change where PushRectOutline() draws the four edge rectangles]
[31:03][Blackboard: Drawing an outline out of non-intersecting rectangles]
[35:14][Blackboard: What RectanglesIntersect() is currently doing]
[37:06][handmade_render_group.cpp: Make PushRectOuline() add an epsilon into the equation]
[37:31][Run the game, see that our outlines no longer cause a cycle, but that our hero still does]
[44:05][handmade_debug.cpp: Make DEBUGEnd() draw one character, run the game and step through SortEntries]
[47:29][handmade_render_group.cpp: Make GetBoundFor() use the SortBias]
[48:51][Run the game and see that the debug text is now correctly sorted]
[51:07][handmade_render.cpp: Look at IsInFrontOf()]
[54:07][Blackboard: How IsInFrontOf() is working]
[55:30][Run the game and illustrate the possibility that we may actually be in okay shape here]
[56:50][handmade_world_mode.cpp: Toggle AddMonstar() and AddFamiliar() back on]
[58:02][Q&A][:speech]
[59:05][@insobot][I couldn't drop that into The Witness, then. FailFish Really. Kappa?]
[59:26][@blah238][It looks like the torso sprite occasionally draws on top of the head sprite, e.g. going up stairs]
[1:00:01][Blackboard: How the hero is constructed]
[1:01:18][@roam00010011][Does collision work between stairs and hero? Because body under and head above the stairs should not happen]
[1:04:09][@bryanwwag][Do you anticipate similar (if not identical) graph sorting would be used for any other game purpose (other than sprite sort)?]
[1:05:40][@thesgmastr][What language is this?]
[1:06:40][@thesgmastr][What are a few pieces of advice you would give to a new programmer?]
[1:09:05][@xendash][What is your estimate time it will take for you to finish Handmade Hero? And how different is it from the original estimate? (I assume you are about halfway)]
[1:12:53][@roam00010011][Off-topic: At the start of the show, you said that every game programmer uses a dev setup similar to what we use: debug with Visual Studio, but code with a different editor. Why?]
[1:15:05][@filiadelski][Are you enjoying this project as a programming challenge or are your efforts mainly put into the teaching part of it?]
[1:17:12][@melg1][What do you think about unit testing and test driven development applied to C++ code? Is this technique really useful and worth trying?]
[1:26:42][@roam00010011][It's because you are the only programmer! When working in a team that will use your code, you need const]
[1:29:24][@sssmcgrath][I programmed in 100% const correct for 5 years. Never again]
[1:29:41][Close it on out][:speech]
[/video]