Index hero/code538

This commit is contained in:
Matt Mascarenhas 2019-06-24 19:22:36 +01:00
parent 7ed6114716
commit ecd17ab968
1 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,49 @@
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Making a Grid-based Layout Helper" vod_platform=youtube id=GcvTZVc4glw annotator=Miblo]
[0:00][Recap and set the stage for the day][:"procedural generation" :speech]
[0:34][Demo the current state of our world apron, with the determination to semantically codify our world tiles to help produce that apron][:"procedural generation" :run]
[6:30][Codifying world tiles such that they may be queried in a more semantic fashion][:geometry :research]
[9:54][Begin to semantically codify world tiles, tentatively introducing gen_tile_volume][:geometry]
[16:13][Work on the semantic codification of world tiles, backwards from the usage code in GenerateApron(), introducing an edit_grid struct, BeginGridEdit() and EndGridEdit()][:geometry :"procedural generation"]
[31:06][Create handmade_edit_grid.h, and introduce MakeRelative(), GetMinZCenterP(), and stubbed out GetVolumeFromMinZ(), IterateTiles(), IsValid() and Advance() for edit grids and tiles][:geometry :"procedural generation"]
[35:57][Implement BeginGridEdit(), augmenting edit_grid as required][:geometry :"procedural generation"]
[46:31][Respecify IterateTiles() as IterateAsPlanarTiles()][:geometry :"procedural generation"]
[49:20][Implement the edit_tile version of IsValid(), introducing a version of IsInVolume() that takes a gen_v3, and IsInArrayBounds()][:geometry :"procedural generation"]
[54:00][Implement the edit_tile version of Advance(), IterateAsPlanarTiles() and GetMinZCenterP()][:geometry :"procedural generation" :searching]
[56:40][Consider our options for codifying the offsetting of room volumes vs their entities][:geometry :"procedural generation" :research :searching]
[58:50][Specify that room volumes are not offset from 0, 0, 0, introducing GetTotalVolume()][:geometry :"procedural generation"]
[1:02:51][#include handmade_edit_grid.cpp and handmade_edit_grid.h, finish up the edit_grid struct and fix compile errors in the new edit_grid code][:geometry :"procedural generation"]
[1:08:59][Port the existing GenerateRoom() code over to the new codified tile edit_grid scheme, introducing a version of GetTile() that takes an edit_tile, IsOnEdge() and GetAbsoluteTileIndex()][:geometry :"procedural generation"]
[1:20:40][Introduce GetRoomVolume(), GetRoomMinWorldP() and GetRoomMaxWorldP() for GenerateRoom() to call][:geometry :"procedural generation"]
[1:24:30][Find that our tile grid codification enables our world apron generation to work perfectly first time, but that rooms are failing to be paged in][:geometry :"procedural generation" :run]
[1:26:25][Change GenerateRoom() to position the :camera in the center of rooms, to enable correct paging in of rooms as we traverse the world][:"entity system"]
[1:26:56][Find that our :camera is now fixed][:camera :"entity system" :run]
[1:27:36][Disable the :collision box :"debug visualisation"]
[1:27:56][Traverse the world, and see gaps in our world's apron][:"procedural generation" :run]
[1:30:34][Make GenerateApron() shrink the test tile when checking for overlapping entities, to try and avoid floating-point precision issues][:mathematics :"procedural generation"]
[1:31:12][Find that those gaps in our apron are now filled][:"procedural generation" :run]
[1:32:45][Relieve GenerateRoom(), GenerateApron() and Layout() of taking a world][:"procedural generation"]
[1:34:25][Make sure that we :run okay, and glimpse into the future implementing ground cover, finishing lighting and cleaning up the tag system][:"procedural generation"]
[1:35:34][Q&A][:speech]
[1:36:03][@vapenir][Q: Do you plan to implement any fancy 3D :audio stuff?]
[1:36:46][@2hstrike][Q: When you code in pure C do you have our own string :library or do you always use a subset of C++ and their std string library?]
[1:37:08][@0lpbm][Q: Will you at any point remove the double walls between rooms?][:"procedural generation"]
[1:38:01][@rationalcoder][Q: See jeffrey's comment]
[1:38:08][@jeffrey_hullekes][@cmuratori your AddWorldRoom() call contains two Mins, not Min and Max!]
[1:38:15][Fix typo in the call to AddWorldRoom() in GenerateRoom()][:"procedural generation"]
[1:38:50][@reductum][Q: Handmade sin / cos?][:mathematics]
[1:39:15][@longboolean][Q: I have a feeling you will find more engine work to do once you start the gameplay stuff]
[1:40:01][@ormone88][Q: What about implementing a tiny :animation tool in the editor? It would delay the part of gameplay programming, at least]
[1:40:26][@sluddytypie][Q: Would you recommend any books for learning C++?][:language]
[1:40:49][@Miblo][Q: Does the apron cover everything we need now? I'm just wondering if there may be any point in using our elevation and camera angle to figure out the necessary extents of the apron for floors far below us][:"procedural generation"]
[1:41:46][@darkenderio][Q: The world apron is meant to make the outside of the world not look so empty. Could there be entities inside the world apron as ambient entities, to make it look like there is life outside of the playing area? They could just wander around][:"procedural generation"]
[1:42:42][@vtlmks][Q: Is the :"particle system" complete?]
[1:44:05][@vapenir][Q: Have you used git, svn or other :VCS's for actual collaboration? What did you think about them?]
[1:48:20][@darkenderio][Q: What about simple ambience, like birds flying from tree to tree?][:"procedural generation"]
[1:48:50][@longboolean][Q: And in theory you could have the composition of elements / theme of the apron be visibly different yet still complimentary so that it is clear that it is in fact an apron][:"procedural generation"]
[1:49:56][@ormone88][Q: Do you consider any :AI-related code as gameplay programming? Is there anything you could implement, engine-wise, in order to ease the coding process of these topics? For example, I could see :pathfinding and world generation as a possible candidate][:"procedural generation"]
[1:50:51][@culdevu][Q: What about rolling fog cloud entities out there? Just a bunch of trees in a large grid sounds kinda weird][:"procedural generation"]
[1:51:04][@2hstrike][Q: How do you write thread safe code in C or do you use C++ std\:\:atomic in that case?][:threading]
[1:51:44][@Miblo][Q: But what if the birds don't fly in a straight line, as the crow flies?]
[1:51:55][@printf_armin][Q: How would you implement a game like Diggles? Like in terms of the structure for the landscape?]
[1:54:05][Close it down][:speech]
[/video]