[video output=day495 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Improving the Alignment Editing UI" vod_platform=youtube id=ma6tAZRiDh8 annotator=Miblo] [0:01][Recap and set the stage for the day doing, essentially, skeletal :animation][:"asset system" :speech] [5:14][Set up to snap heads onto bodies and visualise snapping points, considering flexible scaling][:animation :"asset system" :run :ui] [10:51][A few preliminary words on immediate-mode GUI][:speech :ui] [12:33][Make UpdateAndRenderEntities() draw asset alignment points, introducing GetDebugColor3() and GetDebugColor4()][:"asset system" :"entity system" :ui] [26:59][Check out our alignment points in-game][:"asset system" :"entity system" :run :ui] [27:29][Make UpdateAndRenderEntities() negate the AlignmentPercentage of the alignment points][:"asset system" :"entity system" :ui] [29:37][Find that that doesn't peg the alignment point to the asset][:"asset system" :"entity system" :run :ui] [30:54][Make UpdateAndRenderEntities() offset the alignment point by the asset's dimensions rather than its ground position][:"asset system" :"entity system" :ui] [31:26][Find that our alignment point is correctly located][:"asset system" :"entity system" :run :ui] [31:53][Make UpdateAndRenderEntities() draw the alignment points closed to the camera][:"asset system" :"entity system" :ui] [33:21][Check out our pegged alignment points in-game, tweaking their size][:"asset system" :"entity system" :programming :run :ui] [35:29][Enable toggling of coloured alignment points, introducing Buttonf() and EditableBooleanf() for AssetEditor() to call][:"asset system" :ui] [43:28][Try out our alignment point toggling, noting the scarcity of code required for this feature][:"asset system" :"entity system" :run :ui] [45:36][Change AssetEditor() to only permit existing alignment points to be toggled and coloured][:"asset system" :ui] [46:10][Check out our correct alignment point toggling][:"asset system" :"entity system" :run :ui] [46:48][Introduce ShouldDrawAlignPoint() to enable UpdateAndRenderEntities() to draw all existing alignment points][:"asset system" :"entity system" :ui] [50:02][Check out all our alignment points in-game, noting the need to fix the way we're drawing them closer to the camera][:"asset system" :"entity system" :run :ui] [52:47][Make PushCube() take a ZBias which UpdateAndRenderEntities() may use to elevate alignment points above entities][:"asset system" :"entity system" :ui] [54:31][Find that this didn't elevate our alignment points as expected][:"asset system" :"entity system" :run :ui] [56:46][See how CompileZBiasProgram() uses the ZBias][:hardware :rendering :research] [1:00:04][Make UpdateAndRenderEntities() pass a ZBias of 5.0f for alignment points][:"asset system" :"entity system" :ui] [1:00:34][Find that alignment point elevation works fine in debug :camera mode, but not in regular camera mode][:"asset system" :"entity system" :run :ui] [1:01:59][Figure out how the clip planes differ in the different :camera modes][:research] [1:03:13][Make UpdateAndRenderEntities() pass a ZBias of 3.0f for alignment points][:"asset system" :"entity system" :ui] [1:03:32][Find that our alignment points are now always elevated above assets, and visible][:"asset system" :"entity system" :run :ui] [1:04:47][Enable UpdateAndRenderEditor() and EditorInteract() to support asset piece picking, introducing SetActiveAsset()][:"asset system" :ui] [1:13:04][Try out our asset picking functionality][:"asset system" :"entity system" :run :ui] [1:14:58][Make UpdateAndRenderEditor() display bitmaps in our asset picker, introducing BitmapButton()][:"asset system" :ui] [1:27:33][Check out the new bitmap buttons in our :UI][:"asset system" :"entity system" :run] [1:29:01][Make BitmapButton() outline the selected bitmap][:"asset system" :ui] [1:31:15][Check out the outlined bitmaps in our :UI][:"asset system" :"entity system" :run] [1:32:16][Try out our asset alignment editor :UI][:"asset system" :"entity system" :run] [1:33:35][Q&A][:speech] [1:34:41][@filiadelski][Q: How come the near clip plane is at 5, and not closer?][:camera] [1:35:18][@erdomina][Q: Would we be showing linkages between alignment points?][:"asset system" :"entity system" :ui] [1:36:30][@sratke][Q: What would you say is crappy in your current implementation of the IMGUI?][:ui] [1:38:00][@reductum][Q: Do you think it would be useful to add mouse wrapping (like in Blender) so you can drag past the end of the screen when editing values?][:ui] [1:39:00][@pythno][Q: Isn't it an overhead when checking for "if(Button(...))" when doing that every frame?][:ui] [1:40:35][@math_daemon_][Q: Will you ever make an emote, or just steal one of [@naysayer88 Jon]'s?] [1:41:33][@pragmascrypt][Q: What is the reason the :UI loses state when you hot-reload?][:"hot reloading"] [1:43:12][@therealdiego][Q: Can you play around with it a little more?] [1:43:27][Play around with the :UI a little more][:"asset system" :run :"undo / redo"] [1:44:50][@filiadelski][Q: With software rendering you can do hot regions that are redrawn when the user fiddles with the :UI elements. Can anything similar be done with :hardware :rendering?] [1:46:21][@ayn0n_0mus][Q: Will the finished game ship with almond milk?] [1:46:30][@filiadelski][Q: You get [@aerettberg Anna] to draw something cute, like a cat, and then upload the kitty image to twitch] [1:47:58][@tbodt_][Q: You can upload emotes from a page in the twitch dashboard] [1:48:17][@dudeinbasement1][Q: What is the best way to add to an atlas map? Is it costly to "re-update" the image to the GPU (OpenGL)?][:hardware :rendering] [1:49:04][@flyingsolomon][Q: What do you think about a tree-based undo system (where you do not lose the redo state when changing after undo, but create branches)?][:"undo / redo"] [1:50:06][@ayn0n_0mus][Q: Thoughts on ML, will your game use it?][:ai] [1:50:29][@pythno][Q: You said you wouldn't use the internet at work. I'd like to do that but then I am missing MSDN and the OpenGL documentation. What do you do when you don't have this info locally available? Asking because I'd prefer not to have the internet around when coding] [1:51:47][@onebitbrain][Q: You talked about :threading being hard yesterday. Would you use OpenMP if MSVC upgraded, or would you prefer something else?] [1:55:49][We're all done][:speech] [/video]