Index hero/code634

This commit is contained in:
Matt Mascarenhas 2021-05-21 21:36:22 +01:00
parent 3f7474aa26
commit 8c3e9f1f4c
1 changed files with 126 additions and 0 deletions

View File

@ -0,0 +1,126 @@
[video output=day634 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Final Collision Resolution Design" vod_platform=youtube id=XoaNOeUB6oY annotator=Miblo]
[0:00][Recap and set the stage for the day][:collision :speech]
[2:10][Determine to switch the :collision detection to use voxel-by-voxel stepping][:speech]
[5:33][Introduce an f32 version of Floor()][:mathematics]
[7:21][Center the FromP around stable :collision voxel bounds in MoveEntityLocally()][:geometry]
[11:16][Introduce a v3 version of Floor()][:mathematics]
[13:06][Continue to switch MoveEntityLocally() to use stable voxel-by-voxel stepping][:collision]
[16:29][Thoughts on embedding recovery][:collision :research]
[19:04][Introduce move_result for MoveEntityLocally() to return][:"data structure" :collision]
[20:53][Voxel :collision states: 1) Any legal corners][:research]
[21:59][Voxel :collision states: 2) Where would the entity be placed?][:research]
[22:33][Make MoveEntityLocally() use GetClosestPointInBox() to compute the entity placement][:collision]
[23:01][Deep thoughts on :collision][:research]
[23:43][Consider using GetClosestPointInBox() on repeated subdivisions of the :collision voxel][:research]
[26:35][@immibis][Something I wondered about The Witness is: Why does the player not move on a navmesh? Then you wouldn't have needed that brute force testing thingy][:collision :movement]
[29:39][@tadasv123][Are you and [@naysayer88 Jon Blow] on the same team or something?]
[29:49][Introduce CollidesAtP() for MoveEntityLocally() to call][:collision]
[32:39][@b1dd1e][So, tuned in just in time to witness a [@cmuratori Casey] epiphany?]
[32:56][@b1dd1e][Yup]
[33:39][@b1dd1e][Do I need a code word?]
[34:32][Introduce [@b1dd1e Mike Biddlecombe]]
[34:49][@b1dd1e][In Vancouver]
[35:03][3D :movement realisation: If we could place an entity in a cell, we may then root-find[ref
site=Wikipedia
page="Root-finding algorithms"
url=https://en.wikipedia.org/wiki/Root-finding_algorithms] to pick exactly where][:collision]
[36:26][Introduce a root-finding[ref
site=Wikipedia
page="Root-finding algorithms"
url=https://en.wikipedia.org/wiki/Root-finding_algorithms] RefineVoxelPlacement() for MoveEntityLocally() to call][:collision :movement]
[49:17][Explain RefineVoxelPlacement()][:collision :movement :research]
[50:13][Fix RefineVoxelPlacement() to halve the tStep each iteration][:collision :movement]
[50:23][Explain the root-finding[ref
site=Wikipedia
page="Root-finding algorithms"
url=https://en.wikipedia.org/wiki/Root-finding_algorithms] of RefineVoxelPlacement() (cont.)][:collision :movement :research]
[54:23][Make MoveEntity() call RefineVoxelPlacement() at the end][:collision :movement]
[54:58][Recap the parameters passed to RefineVoxelPlacement()][:collision :movement :research]
[55:39][Handling shifting FromP: 1) Map it into the cell][:collision :movement :research]
[55:47][Handling shifting FromP: 2) Convect it around the centre of voxel faces][:collision :movement :research]
[56:16][Make MoveEntity() and MoveEntityLocally() map the FromP and ToP into the cell][:collision :movement]
[57:40][@haeristudios][I am really confused with the quality of the video and lighting setup. Why is it so good?]
[58:48][Remove the voxel subdivision code from MoveEntity()][:collision :movement]
[59:17][Plan to pathfind to our nearest legal destination][:collision :movement :pathfinding :research]
[1:01:41][@scanberg][What happened to the glasses?]
[1:02:12][@abecderic][Now I need to learn this stuff. StarCinematographyGalaxy when?]
[1:03:25][@kiewi3][You need a red arrow in the thumbnail]
[1:03:42][Setup MoveEntity() to pathfind to our nearest legal destination, welding in MoveEntityLocally()][:collision :movement :pathfinding]
[1:05:18][Consider calling RefineVoxelPlacement() on multiple cells][:collision :movement :research]
[1:05:43][@mallesbixie][The tip professional Cinematographers do not want you to know!]
[1:06:00][Make MoveEntity() pathfind to our nearest legal destination (cont.)][:collision :movement :pathfinding]
[1:09:12][@mallesbixie][Yeah, now I also spot the divide outside the floor somebody mentioned earlier, at VoxelMinCorner]
[1:09:18][Fix the computation of VoxelMinCorner in MoveEntity()][:collision :mathematics :movement]
[1:09:42][Make MoveEntity() pathfind to our nearest legal destination (cont.)][:collision :movement :pathfinding]
[1:12:29][@sgtrumbi][Is there a return statement in the refine function?]
[1:12:56][Make MoveEntity() pathfind to our nearest legal destination (cont.)][:collision :movement :pathfinding]
[1:16:32][Flipped refinement and movement legality][:collision :movement :research]
[1:18:34][Determine to make MoveEntity() handle :movement from a legal place][:collision :pathfinding :research]
[1:22:24][Make MoveEntity() handle :movement from a legal place][:collision :pathfinding]
[1:31:16][Introduce voxel_move for MoveEntity() to use][:collision :"data structure" :movement :pathfinding]
[1:32:09][Make MoveEntity() handle :movement from a legal place (cont.)][:collision :pathfinding]
[1:40:38][Implement UpdateBest()][:collision :movement :pathfinding]
[1:44:02][Consider this okay for one day's work][:collision :movement :pathfinding :speech]
[1:44:33][Step through MoveEntity()][:collision :movement :pathfinding :run]
[1:46:06][Step through MoveEntity() in -Od][:collision :movement :pathfinding :run]
[1:47:06][Set MOTION_DISPLACEMENT_SIZE to 0.125 (as the closest power of 2 to 0.1) in MoveEntity()][:mathematics]
[1:47:40][Step through MoveEntity()][:collision :movement :pathfinding :run]
[1:49:45][Pull out the DeltaP in UpdateBest() for debugging convenience][:collision :movement :pathfinding]
[1:50:23][Step in to UpdateBest()][:collision :movement :pathfinding :run]
[1:51:57][Retain the Best.DistanceSq as the nearest valid distance in MoveEntity()][:collision :movement :pathfinding]
[1:53:31][Step wildly][:collision :movement :pathfinding :run]
[1:54:17][Update ~remedybg from 0.3.3.3 to 0.3.3.5][:admin]
[1:58:28][Step wildly still][:collision :movement :pathfinding :run]
[1:59:27][Try stepping in -O2, unsuccessfully][:collision :movement :pathfinding :run]
[1:59:40][@sori_daijin][[@cmuratori Casey], you might need new glasses]
[1:59:49][This is still in a bad state][:collision :movement :pathfinding :run]
[2:00:03][Compile in -Od][:collision :movement :pathfinding]
[2:00:33][@ezioauditorerevs][@handmade_hero Did you order the glasses from Apple?]
[2:00:40][Fallacious positive arguments for Apple vs consumer rights :law][:rant :speech]
[2:05:42][@hexadecimalinteger][That's where competition comes in][:economics]
[2:07:31][Step through MoveEntity()][:collision :movement :pathfinding :run]
[2:09:40][@ryuukk_][tl;dr I love capitalism when it works for me. Screw other people][:economics :law]
[2:14:37][@ezioauditorerevs][@handmade_hero Can we get Handmade Political as a podcast?]
[2:16:25][Step through MoveEntity()][:collision :movement :pathfinding :run]
[2:16:55][Flip the sense of our Occupied tests in MoveEntity()][:collision :movement :pathfinding]
[2:17:26][Step through MoveEntity()][:collision :movement :pathfinding :run]
[2:20:19][Fix MoveEntity() to reset Best.Moved each iteration][:collision :movement :pathfinding]
[2:20:36][Step through MoveEntity()][:collision :movement :pathfinding :run]
[2:20:53][The glove moves by whole voxel steps][:collision :movement :pathfinding :run]
[2:21:13][Make MoveEntity() use the result of the pathfinding loop in its final position settings][:collision :movement]
[2:21:50][:Collision is getting there, but the glove can still penetrate the wall][:movement :pathfinding :run]
[2:22:25][Q&A][:speech]
[2:22:43][@damnzl][Hey dude! In love with the stream title, definitely stealing next time I play that game]
[2:23:22][@x13pixels][Q: My apologies for the stepping issue you were seeing. I'll take a look and see wtf is going on!]
[2:24:02][@mindmark42][Q: Can you explain how that .125 thing works?][:mathematics]
[2:28:19][Recommend 'What Every Computer Scientist Should Know About Floating-Point Arithmetic'[ref
author="David Goldberg"
title="What Every Computer Scientist Should Know About Floating-Point Arithmetic"
url=https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html]][:mathematics :research]
[2:29:32][@b1dd1e][Check out random ASCII (Bruce Dawson) blog posts on floating point[ref
site="Random ASCII tech blog of Bruce Dawson"
page="Category Archives: Floating Point"
url=https://randomascii.wordpress.com/category/floating-point/]]
[2:29:45][@stelios_tv][@handmade_hero The Floating-Point Guide[ref
site="The Floating-Point Guide"
url=https://floating-point-gui.de/]][:mathematics]
[2:29:57][@mikeryp][But how much of a difference can this minute computation really make in real time?][:mathematics]
[2:30:54][Temporarily set MOTION_DISPLACEMENT_SIZE to 0.1 in MoveEntity()][:mathematics]
[2:31:26][Inspect the ToP][:mathematics :run]
[2:32:01][Revert MOTION_DISPLACEMENT_SIZE to 0.125 in MoveEntity()][:mathematics]
[2:32:40][This was a bad example][:mathematics :run]
[2:32:56][Temporarily set MOTION_DISPLACEMENT_SIZE to 0.1 in MoveEntity()][:mathematics]
[2:33:10][Inspect the values resulting from a MOTION_DISPLACEMENT_SIZE of 0.1][:mathematics :run]
[2:33:25][Revert MOTION_DISPLACEMENT_SIZE to 0.125 in MoveEntity()][:mathematics]
[2:33:39][Inspect the values resulting from a MOTION_DISPLACEMENT_SIZE of 0.125][:mathematics :run]
[2:34:22][@hollowjazz35][How long have you been working on this project?]
[2:36:03][@newtothis11][You look like a render]
[2:36:19][@internationalizationist][We need more codelesthenics, [@cmuratori Casey], and you need it as well]
[2:37:29][@ezioauditorerevs][Q: How does your fancy transparent whiteboard work? Did you learn to write backwards, or is it all just mirrored?]
[2:37:44][@bulmanator][I don't understand why we can't show birthdays on the user profile page]
[2:38:00][@ezioauditorerevs]["et-zio" "ow-dit-or-A"]
[2:38:17][@buljanoff][Everyone needs to say the word dynamically at least once]
[2:39:00][@ezioauditorerevs][Q: Ezio Auditore is the main character from Assassin's Creed 2]
[2:39:17][Reflect on the :collision routine][:speech]
[2:39:35][Thanks, everyone][:speech]
[/video]