From 85d419d035a02cbc462decbf852350ea8accfacc Mon Sep 17 00:00:00 2001 From: Miblo Date: Tue, 16 Aug 2022 17:55:32 +0100 Subject: [PATCH] Index hero/code660 --- cmuratori/hero/code/code660.hmml | 104 +++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 cmuratori/hero/code/code660.hmml diff --git a/cmuratori/hero/code/code660.hmml b/cmuratori/hero/code/code660.hmml new file mode 100644 index 0000000..a1b2ba9 --- /dev/null +++ b/cmuratori/hero/code/code660.hmml @@ -0,0 +1,104 @@ +[video output=day660 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Randomized Overworld Layout" vod_platform=youtube id=pNTpHAo5Pxw annotator=Miblo] +[0:00][Recap and set the stage for the day][:speech] +[1:08][Demo our randomly generated dungeon placement][:"procedural generation" :run] +[2:17][Pull up the original Legend of Zelda map[ref + site="Thonky.com" + page="First Quest Map" + url=https://www.thonky.com/legend-of-zelda/zelda-map.png]][:"procedural generation" :research] +[3:20][Note the proximity-ordered placement of dungeons in The Legend of Zelda[ref + site="Thonky.com" + page="First Quest Map" + url=https://www.thonky.com/legend-of-zelda/zelda-map.png]][:"procedural generation" :research] +[4:09][Recap our plan to make each dungeon increase in difficulty as you go deeper into them][:"procedural generation" :research] +[5:21][Consider how to motivate exploration of our overworld][:"procedural generation" :research] +[6:35][Note the Legend of Zelda's difficulty cues that motivate overworld exploration][:"procedural generation" :research] +[8:24][Why would you care about how you are traversing things?][:"procedural generation" :research] +[8:52][@hniojnuoujbnh][If you think C++ is bad and C better, then why don't you just use C instead of C++?][:language] +[9:44][Why would you care about how you are traversing things? (cont.)][:"procedural generation" :research] +[10:50][Exploration motivation ideas: 1) Enemy generators, with overlapping ranges][:"game design" :"procedural generation" :research] +[14:29][Exploration motivation ideas: 2) Temporary destruction of generators, which strengthen upon regenerating][:"game design" :"procedural generation" :research] +[15:39][@radavandar][So what you get in return for taking out a generator should be worth increasing the long-term difficulty][:"game design" :"procedural generation"] +[16:50][@wheeel][Is there a way to tie the overworld difficulty to the dungeon difficulty system, or is it better to keep separate?][:"game design" :"procedural generation"] +[17:04][Consider making multiple and different routes overlap different generators][:"game design" :"procedural generation" :run] +[19:39][Consider using the dungeon generator for enemy generators][:"procedural generation" :research] +[20:12][Augment world_room with a DebugColor for AddWorldRoom() to set][:"data structure" :"procedural generation"] +[22:15][Our orphanage outline is red][:"debug visualisation" :"procedural generation"] +[22:40][Fix CreateOrphanage() to pass green to PlaceDebugMarker()][:"debug visualisation" :"procedural generation"] +[22:55][With our green orphanage and yellow dungeons, plan to place red enemy generators][:"debug visualisation" :"procedural generation"] +[23:52][@tinspin][By the way, is [~hero Handmade Hero] going to get multiplayer?] +[25:14][Set up CreateForest() to generate enemy generators, augmenting world_generator with GeneratorCount and GeneratorLocations][:"procedural generation"] +[29:04][@dandymcgee][Your :"game design" woes are the essence of my existence as a programmer. I feel your pain in my soul] +[29:33][Consider specifying the notion that "these points in the world should have this many overlapping generators"][:"procedural generation" :research] +[31:25][Introduce world_gen_location and world_gen_location_type, to replace DungeonLocations and GeneratorLocations in world_generator][:"data structure" :"procedural generation"] +[35:14][Update CreateDungeon() to use our new world_gen_location, introducing GetLocation()][:"procedural generation"] +[37:47][@ponkkiz][Anyone know if this error highlighting is public or is it [@cmuratori Casey]'s own thing?] +[38:17][Introduce GetClosestLocationTo() and GetClosestDistanceTo() for CreateDungeons() to use][:"procedural generation"] +[43:53][Set up CreateWorld() to call all the location creation functions, respecifying world_gen_location_type as plain ints rather than flags][:"procedural generation"] +[48:36][Rename CreateForest(), CreateOrphanage() and CreateDungeons() to Layout*(), and introduce CreateMonsterGenerator() and CreateItemRoom()][:"procedural generation"] +[51:08][Introduce PushLocation()][:"procedural generation"] +[53:04][Implement GetClosestLocationTo(), and make CreateWorld() push the orphanage location first][:"procedural generation"] +[59:38][Infinitely loop in our location placement code][:"procedural generation" :run] +[59:50][Scour our location placement code for problems][:"procedural generation" :research] +[1:01:34][Enable GetClosestLocationTo() to handle exclusion types, introducing Matches() and FlagOf()][:"procedural generation"] +[1:05:14][Hit a write access violation][:"procedural generation" :run] +[1:05:51][Hit the Gen->LocationCount assertion in PushLocation()][:"procedural generation" :run] +[1:05:59][Fix LayoutOverworld() to increment PlacedDungeonCount(), relieving it of using dungeons as an exclusion type][:"procedural generation"] +[1:06:19][:Run successfully in -Od][:"procedural generation"] +[1:06:35][:Run successfully in -O2][:"procedural generation"] +[1:06:47][Consider generalising our half-annulus point-picking code][:"procedural generation" :research] +[1:09:07][Drop frames][:admin] +[1:10:24][Quick break][:admin] +[1:10:30][:afk] +[1:12:08][Return and eyeball the dropped frames counter][:admin] +[1:13:35][Introduce PickPointInAnnulus() and world_gen_annulus][:"data structure" :"procedural generation"] +[1:22:46][Our dungeons remain dispersed along a half-annulus][:"procedural generation" :run] +[1:22:54][Make LayoutOverworld() generate item rooms using PickPointInAnnulus()][:"procedural generation"] +[1:24:54][Hit our max iteration assertion in PickPointInAnnulus()][:"procedural generation" :run] +[1:24:59][Fix LayoutOverworld() to strew items along a different annulus][:"procedural generation"] +[1:25:34][We now have item rooms, but can still hit our max iteration assertion in PickPointInAnnulus()][:"procedural generation" :run] +[1:26:02][Consider improvements to PickPointInAnnulus()][:"procedural generation" :research] +[1:27:29][Switch PickPointInAnnulus() to use a random angle and distance, to discard fewer points][:"procedural generation"] +[1:30:13][Locations are placed behind the orphanage][:"procedural generation" :run] +[1:30:42][Augment world_generator with an OrphanageYLine for PickPointInAnnulus() to clip to, introducing IsInForest()][:"procedural generation"] +[1:32:54][Hit our max iteration assertion in PickPointInAnnulus()][:"procedural generation" :run] +[1:33:11][Decrease MinDistFromExistingLoc from 40 to 20 for item rooms][:"procedural generation"] +[1:33:17][We successfully place locations][:"procedural generation" :run] +[1:33:46][Establish the notion of min distance from everything / specific, introducing world_gen_filter for world_gen_annulus to contain][:"data structure" :"procedural generation"] +[1:34:59][Enable PickPointInAnnulus() to apply our new world_gen_filter][:"procedural generation"] +[1:39:53][Locations may only be placed far from their same type but near different types][:"procedural generation" :run] +[1:40:33][Determine to add the monster generators][:"procedural generation" :research] +[1:41:49][Make LayoutOverworld() generate enemy generators, augmenting world_gen_location with OverlappingGeneratorCount][:"data structure" :"procedural generation"] +[1:52:45][Hit our max iteration assertion in PickPointInAnnulus()][:"procedural generation" :run] +[1:52:52][Temporarily decrease MinDist from 10 to 0 for the monster generator filter in LayoutOverworld()][:"procedural generation"] +[1:53:02][Hit our max iteration assertion in PickPointInAnnulus()][:"procedural generation" :run] +[1:53:08][Revert MinDist in LayoutOverworld()][:"procedural generation"] +[1:53:27][Try making LayoutOverworld() place monster generators at our annulus-dispersal centroids][:"procedural generation"] +[1:53:56][Crash on PushLocation()][:"procedural generation" :run] +[1:54:03][Scour our monster generator placement code for bugs][:"procedural generation" :research] +[1:54:26][Hit our Gen->LocationCount assertion in PushLocation()][:"procedural generation" :run] +[1:54:44][Count up our locations][:"procedural generation" :research] +[1:55:11][Make LayoutOverworld() add 1 to our MaxLocationCount for the orphanage][:"procedural generation"] +[1:55:21][:Run successfully in -Od][:"procedural generation"] +[1:55:27][In -O2, our monster generators are all placed in the same location][:"procedural generation" :run] +[1:55:52][Try letting LayoutOverworld() place monster generators at the centroid of dungeons and item rooms without overlapping generators][:"procedural generation"] +[1:57:21][Our monster generators are placed better][:"procedural generation" :run] +[1:57:35][Desire random location picking for monster generators][:"procedural generation" :research] +[1:59:34][Let LayoutOverworld() place monster generators along their annuli][:"procedural generation"] +[1:59:53][We have plenty more locations][:"procedural generation" :run] +[2:00:10][Increase MonsterGeneratorCount from between 12 and DungeonCount + ItemRoomCount in LayoutOverworld()][:"procedural generation"] +[2:01:26][Hit our max iteration assertion in PickPointInAnnulus()][:"procedural generation" :run] +[2:01:35][Let LayoutOverworld() place monster generators around other monster generators][:"procedural generation"] +[2:01:51][Successfully place all locations][:"procedural generation" :run] +[2:02:44][Increase MinDist from 10 to 20 for the monster generator filter in LayoutOverworld()][:"procedural generation"] +[2:02:53][Hit our max iteration assertion in PickPointInAnnulus()][:"procedural generation" :run] +[2:03:09][Make PickPointInAnnulus() try 10× more points][:"procedural generation"] +[2:03:20][Successfully place all locations, with the determination to place paths next week][:"procedural generation" :run] +[2:04:29][Plug the [~hero Handmade Hero] pre-order[ref + site="Handmade Hero" + url=https://handmadehero.org] and Molly Movie Club[ref + site="Molly Movie Club" + url=https://www.mollymovieclub.com]][:research] +[2:07:16][That's about it][:speech] +[2:07:30][@technicbeam][Saves me from having to watch Dune] +[2:07:34][Take it easy, everybody][:speech] +[/video]