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

66 lines
6.4 KiB
Plaintext
Raw Permalink Normal View History

[video output=day444 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Stubbing Out the World Generator" vod_platform=youtube id=-TBSy54d3ZE annotator=Miblo]
2018-04-29 18:32:18 +00:00
[0:06][Recap and set the stage for the day][:speech]
[1:18][:Run the game with a few words on the :art, :camera and world construction][:"procedural generation" :"graph topology"]
[8:02][Explain the existing world struct][:research :"graph topology"]
[10:45][Introduce world_room stuct][:"graph topology"]
2018-04-29 18:32:18 +00:00
[14:31][:Camera Behavior per Room][:blackboard]
[17:16][:Run the game and consider co-op :camera behaviour]
[20:44][Introduce world_room_camera enum for world_room to contain, and add an array of world_room in world][:camera]
[23:33][:Run the game, noting that a :"debug visualisation" of all generated rooms could be helpful][:"procedural generation"]
[25:09][Setup AddStandardRoom() to initialise a WorldRoom][:"procedural generation"]
[31:50][Introduce AddWorldRoom(), with a few words on Asserting even on things that we expect to replace before shipping][:memory]
[34:22][:Run the game with the determination to draw :"debug visualisation" for every generated room][:"procedural generation"]
[35:57][Make UpdateAndRenderWorld() draw :"debug visualisation" lines around all our generated rooms][:"procedural generation"]
[42:13][:Run the game to see that we're nearly correct][:"debug visualisation" :"procedural generation"]
[42:33][Fix typo in the AddWorldRoom() call in AddStandardRoom()][:"procedural generation"]
[43:03][:Run the game to see all our room :"debug visualisation" lines, considering switching to infinite far clip-plane][:"procedural generation" :"graph topology"]
2018-04-29 18:32:18 +00:00
[45:02][Determine to make our current :camera code zoom to rooms better][:run]
[47:03][Create handmade_world_gen.h for all of our existing world generation code][:"procedural generation" :"graph topology"]
2018-04-29 18:32:18 +00:00
[50:48][:Run the game and crash immediately because there's no world][:"procedural generation"]
[51:37][Introduce CreateWorld() for PlayWorld() to call][:"procedural generation"]
[53:22][:Run the game to see our existing world][:"procedural generation"]
[53:35][Determine to build up our world generation code from the usage code backwards][:"procedural generation" :speech]
[55:58][Introduce CreateOrphanage()][:"procedural generation" :"graph topology"]
[58:12][Room][:blackboard :"procedural generation" :"graph topology"]
2018-04-29 18:32:18 +00:00
[1:01:03][Continue to implement CreateOrphanage() calling our fictitious GenRoom() function[ref
site="Molly Rocket"
page="Handmade Hero Orphan Concept Art"
url=https://mollyrocket.com/news_0041]][:"procedural generation" :"graph topology"]
[1:05:03][Room Connectedness, and cycles][:blackboard :"graph topology"]
[1:08:17][Add BackDoorPath and SideAlley in CreateOrphanage(), and connect them up in such a way as to create a cycle][:"graph topology"]
2018-04-29 18:32:18 +00:00
[1:11:02][Introduce the notion of a gen_room_spec for CreateOrphanage() to use][:"entity system" :"procedural generation"]
[1:16:07][Introduce CreateWorld() to call CreateOrphanage() and the currently fictitious Layout(), GenerateWorld() and EndWorldgen(), and gen_orphanage that specifies room connections][:"procedural generation" :"graph topology"]
2018-04-29 18:32:18 +00:00
[1:19:58][Reflect on having constructed our API from the usage code backwards][:speech]
[1:22:31][Implement our world generation types and functions, with an eye on later differentiating between the world's specification and its generation from that spec][:"procedural generation" :"graph topology"]
2018-04-29 18:32:18 +00:00
[1:28:25][Check out our current :memory arena allocation code][:research]
[1:30:41][Consider the sheer amount of memory available these days][:memory :speech]
[1:33:00][Stub out GenSpec(), GenRoom(), Connect(), BeginWorldGen() and EndWorldgen() with :memory management and return values, fixing Clear() to correctly skip the last remaining block[ref
site="HandmadeHero/cpp/Issues"
page="Bug in Clear(memory_arena *)"
url=https://github.com/HandmadeHero/cpp/issues/58]]
[1:39:08][Make CreateWorld() call our new CreateWorld() routine][:"procedural generation"]
[1:39:48][:Run the game and step through our new CreateWorld(), CreateOrphanage(), etc. routine][:memory :"procedural generation"]
[1:42:21][Close "Bug in Clear(memory_arena *)"[ref
site="HandmadeHero/cpp/Issues"
page="Bug in Clear(memory_arena *)"
url=https://github.com/HandmadeHero/cpp/issues/58]][:admin :memory]
[1:42:57][Q&A][:speech]
[1:43:14][@sonoftheright][Q: Any thoughts on Mike Acton joining the Unity dev team?]
[1:46:15][@unknown_20][Q: Is the parenthesis around the returned value used for debugging or just a habit?]
[1:48:08][@kiitos420][Q: Is it a good idea to use events?]
[1:49:22][@frostyninja][Q: Are we going to see the new :art assets soon now? Today was exciting. I cant wait for worldgen. Should be interesting][:"procedural generation"]
[1:49:33][@vtlmks][Q: Off-topic if you run out of other questions. In C, is there a way to make something similar to function overloading?][:language]
[1:50:15][@unknown_20][@handmade_hero I read somewhere you can #define return and log all your returns that happen]
[1:50:29][@suburbanfilth][Q: What do you think of Golang?][:language]
[1:50:46][@vaualbus][Q: Just as side note on that Nvidia fiasco you had. I found out that in my case I can get Nsight graphics to crash in the same way if I use raw input to get PS4 controller data. As soon as I remove the call that registers raw controllers, Nsight work. Any idea on why that could happen? Maybe Nsight is using something to intercept user input?]
[1:52:06][@x13pixels][Q: I know you did a video on interpolation. Do you know of any good resources for cubic B-splines?]
[1:56:00][Bezier curves, and B-spline orders][:blackboard :mathematics]
[2:00:41][Daisy-chaining Bezier curves to produce more complex curves][:blackboard :mathematics]
[2:04:03][Orders of discontinuity][:blackboard :mathematics]
[2:06:05][Cubic B-spline curves][:blackboard :mathematics]
[2:08:06][@krismeld][Q: I really like the look of the :lighting you have implemented. Will the system be working with many light points?][:rendering]
2018-04-29 21:02:51 +00:00
[2:08:41][@longboolean][Q: So if I am on the same page, if we wanted to make sure that two rooms never touch each other we would still use Connect() plus passing a flag of some kind. Or would you do something else?][:"procedural generation" :"graph topology"]
2018-04-29 18:32:18 +00:00
[2:09:36][@schoenhs][Q: Are there any plans to write tools to author rooms or will everything be done in code?]
[2:10:13][Wrap it up for today][:speech]
[/video]