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

50 lines
3.0 KiB
Plaintext
Raw Normal View History

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Aligning Ground Buffers to World Chunks" vod_platform=youtube id=TxowSnU2_cQ annotator=dspecht annotator=Miblo]
[3:50][Recap]
[4:14][The Proposal: First, just produce tiles that cover things... but they won't be seamless]
[5:58][Address specifying which ground_buffer we need]
[7:03][Stop doing the test fill for GroundBuffer]
[7:29][Iterate over every place the camera can see and request a GroundBuffer]
[13:03][Blackboard: Offset considerations]
[14:49][Subtract the offset]
[15:45][Consider the size of a Chunk]
[18:43][Brief interlude: See how big those Chunks are]
[27:52][Try to view the results in-game and step through the code]
[29:39][Multiply ChunkDimInMeters by MetersToPixels]
[31:08][Make DrawRectangleOutline]
[38:12][View the results and figure out what's happening with the Chunk location information]
[40:27][DrawRectangle does not take a Width and a Height]
[41:26][...and the Y needs flipping]
[42:11][We're getting there, but the Chunks are drawn too tiny]
[42:46][Assess the size of the Chunks]
[43:08][Try making a Chunk a quarter the size]
[44:10][Set the Chunk size based on the size of a 256*256 block]
[44:56][Make MetersToPixels something integral]
[47:05][Assess where TileSideInMeters gets set and consider doing without it]
[48:20][InitializeWorld without TileSideInMeters and TileDepthInMeters]
[49:40][Pass the ChunkDimInMeters directly in]
[51:31][Introduce TypicalFloorHeight]
[52:08][Set ChunkDimInMeters based on the value of MetersToPixels]
[53:23][Derive WorldChunkDimInMeters from GroundBuffer{Width,Height} and TypicalFloorHeight]
[54:37][Set Tile{Side,Depth}InMeters]
[55:39][Do CameraBounds a little differently]
[56:05][Introduce SimBounds based on the CameraBounds]
[57:35][View the results in-game]
[59:03][Request a particular world_chunk to draw]
[1:03:45][View the results in-game]
[1:05:10][Find out why those chunks aren't getting produced until the Hero walks on them]
[1:07:01][This was working totally perfectly]
[1:07:53][Problem solved]
[1:08:41][Q&A][:speech]
[1:09:27][Q: What is Muratori syntax?]
[1:10:32][Q: Will the random ground splats be based on some seed so that the ground buffer can be regenerated the same as it was after it gets evicted?]
[1:11:13][Q: I'm sure it's been asked a bunch, but any tips for what language to start with and how to start?]
[1:12:56][Someone found a Muratori 'for' statement in the wild]
[1:14:35][Q: Why are you not passing World as an address when calling functions?]
[1:15:01][Q: Are you going to implement Z-buffers and texture scaling?]
[1:16:08][Q: Is there any other possibility for a Z-buffer?]
[1:19:11][@miblo][Couldn't you set the SimBounds expansion from the screen dimensions or CameraBoundsInMeters or something? Hope I'm understanding it correctly]
[1:20:30][Q: Will you be implementing dynamic lighting or any deferred rendering for lots of real lights, etc?]
[1:22:45][Q: Is there anyone you can suggest for a hardcore render guy?]
[1:23:40][Closing remarks][:speech]
[/video]