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

54 lines
5.5 KiB
Plaintext
Raw Permalink Normal View History

[video output=day489 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Implementing Undo and Redo" vod_platform=youtube id=HT7IPuVmzCE annotator=Miblo]
2018-11-26 22:14:41 +00:00
[0:00][Recap and set the stage for the day implementing our asset editor :UI][:"asset system" :speech]
[0:36][:Run the game to see the current :UI capabilities of our :profiling :"debug system"]
[4:16][Review the purpose of AssetEditor(), editing Alignment Points][:"asset system" :research]
[6:05][Dive straight into :"undo / redo" functionality for UpdateAndRenderEditor(), introducing in_game_edit struct, IsEmpty(), UndoAvailable() and RedoAvailable()][:"asset system"]
[16:57][Introduce align_point_edit as one of the types for in_game_edit to contain][:"asset system" :"undo / redo"]
[19:51][Introduce EditAlignPoint() and AlignPointFromAssetAndIndex() for AssetEditor() to call][:"asset system" :"undo / redo"]
[25:24][Introduce ApplyEditChange() as a dual-purpose :"undo / redo" function for UpdateAndRenderEditor() to call][:"asset system"]
[31:08][Introduce IsDirty(), and separate Undo() and Redo() functions for UpdateAndRenderEditor() to use in the "REVERT" case][:"asset system" :ui :"undo / redo"]
[38:19][Create handmade_dev_ui.cpp and .h to separate the game, editor and debug system's :UI]
[54:06][Confirm that the :"debug system" still draws][:run :ui]
[54:42][Get the whole in-game editor compiling with the reorganised code][:"asset system"]
[57:39][Introduce AllocateEditorEdit() using an interesting macro trick][:"asset system" :language :memory]
[1:01:40][Continue to get the in-game editor compiling][:"asset system"]
[1:06:20][Stub out all the :UI functions called by AssetEditor()][:"asset system"]
[1:12:19][Introduce PopFirst(), PushFirst(), Link() and Unlink()][:"asset system" :"undo / redo"]
[1:16:10][Finish cleaning up compile errors, making UpdateAndRenderEditor() initialise a Layout][:"asset system" :ui]
[1:18:45][:Run the game to see that we're working as before][:"asset system" :ui]
[1:19:41][Consider merging almost the entire :"debug system" layout code into the general :UI code][:research]
[1:22:38][Trim away unused parts of the :"debug system"][:ui]
[1:25:20][Try tearing off :UI elements unsuccessfully][:"debug system" :run]
[1:26:13][Change DEBUGEnd() to initiate tear on Alt-Click][:"debug system" :ui]
[1:27:06][Successfully tear off :UI elements][:"debug system" :run]
[1:27:56][Continue to trim away unused parts of the :"debug system" and switch it over from debug_id to a unified dev_id][:ui]
[1:31:04][Spot that our :font baselines are wrong][:"debug system" :run :ui]
[1:32:11][Replace debug_interaction_type with a unified dev_ui_interaction_type][:"debug system" :ui]
[1:35:30][:Run the game to find it working as before][:"debug system" :ui]
[1:36:20][Q&A][:speech]
[1:36:44][@ginger_bill][Q: (For after stream) Do you want the viewer to be able to edit things or just view things?]
[1:40:06][@guybru5h_vi][Q: Hey [@cmuratori Casey], I know this is kind of off-topic but do you have any advice / resources to read on shadow mapping implementations?][:lighting :rendering]
[1:42:53][@mariaberry][Q: Are you still planning on removing the CRT in the game layer?][:language]
[1:43:11][@abarishu][Q: Following up on the pre-stream discussion on executable size. I nuked out the CRT in my project and it reduced its size from 150K to 35K. I did not think it insert so much crud]
[1:43:57][@jmc516][Q: Do you think programming books are worth the effort to read? Or is there a better way to learn?]
[1:44:21][@reductum][Q: Are we still planning to port to Linux and bare-metal Raspberry Pi?]
[1:44:29][@lucid_frost][Q: How useful would it be to get additional :performance information from the CPU? I know Intel provides some stuff for things like branch prediction and cache misses]
[1:46:10][@mariaberry][Q: Will you be avoiding the CRT on Linux in the future. Sorry it's the same topic, but I'm curious!][:language]
[1:46:58][@jmc516][Q: How can you determine the validity of the book and its usefulness?]
[1:48:01][@0lpbm][Q: As a Linux supportr I want my $15 back (to buy a spellchecker, apparently)]
[1:48:39][@areriff][Q: What's that empty space in the thread debug view?][:"debug system" :threading :ui]
[1:48:53][The :"debug system"'s Threads view][:performance :run :threading]
[1:52:49][@xxthebigfoxx][Q: Are you already testing some JAI?][:language]
[1:53:09][@soysaucethekid][Q: When updating the anchor points, does this mean the .hha file has to be recompiled each time that happens?][:"asset system"]
[1:53:26][@joesweeney][Q: How would you change this work scheme for a mobile platform where we are concerned about battery usage?][:performance]
[1:55:10][@areriff][Q: Can new :lighting propagation be computed while the GPU is doing its stuff? Seems like a lot of waiting]
[1:55:54][Traverse the world and look forward to the completed asset editing][:"asset system" :run]
[1:57:09][@uplinkcoder][Q: We can only start to render if the :lighting is done, no?][:rendering]
[1:59:53][@jessef][Q: I read your article on the manipulation tool work you did on The Witness[ref
site="Casey's Blog"
page="A Cliffside Cliffhanger"
url=https://caseymuratori.com/blog_0007] and it helped me debug my problems. Do you have a good way to manipulate rotation? Is it to ray-test on a sphere and then take the dMouse hit and then see how long the delta arc is on a specific axis?][:geometry]
[2:00:53][@easylovingyou][Q: Could you get NSight to work and did it help you with anything?]
[2:01:39][That's all, folks][:speech]
[/video]